Windows shuts down in 30 minutes when i plug the USB

Recently I am facing a problem with my desktop (Windows XP). If I start using a USB device, e.g. a Printer, my computer just shuts off after about 20-30 minutes, and only the green light on my CPU keeps blinking.
