Arduino starts blinking fast 3 times and not working

I have very interesting problem and can't debug it. I've made a shield for my project, connected some leds, buttons and xbee to arduino. It works OK. But then I packed everything in a box and some strange things happen. When I connect a power (shield has its own 5V power source for arduino and 3.3V for xbee) sometimes it works good. But sometimes arduino blinks pin13 LED 3 times very fast. Looks like arduino is waiting for firmware upload from PC.
I suspect that there may be some short circuit on some pins or something similar. Maybe there are some pins on arduino uno that activate bootloader in a "waiting for programming from PC" mode?

Three blinks definitely sounds like a bootloader. It probably thinks it received a byte and then hangs forever waiting for more instructions. Make sure you don't have the RX line floating or shorted to ground. A possible solution is to change the bootloader to a more modern one that will "time out" and then continue booting the loaded sketch.

afremont:
Three blinks definitely sounds like a bootloader. It probably thinks it received a byte and then hangs forever waiting for more instructions. Make sure you don't have the RX line floating or shorted to ground. A possible solution is to change the bootloader to a more modern one that will "time out" and then continue booting the loaded sketch.

Could you please give me some links to those modern bootloaders? Arduino page links only one by lady ada, that was updated 2009 :slight_smile:
I've heard about optiboot, will it help?

I have compiled and installed optiboot successfully. I do believe it will time out like I described. What version of the IDE are you running? You should find a folder named "bootloaders" in the installation tree. Inside that you should find various folders containing different bootloaders.

In a nutshell, you just go into the optiboot folder and adjust the Makefile to build a bootloader containing the fuses you want, the number of blinks and the baud rate it communicates at. You then point to the output from the "boards.txt" file and then you can burn the bootloader into a second board/chip by loading the first one with ArduinoISP.

jarik:
I have very interesting problem and can't debug it. I've made a shield for my project, connected some leds, buttons and xbee to arduino. It works OK. But then I packed everything in a box and some strange things happen. When I connect a power (shield has its own 5V power source for arduino and 3.3V for xbee) sometimes it works good. But sometimes arduino blinks pin13 LED 3 times very fast. Looks like arduino is waiting for firmware upload from PC.
I suspect that there may be some short circuit on some pins or something similar. Maybe there are some pins on arduino uno that activate bootloader in a "waiting for programming from PC" mode?

Are you using pins 0 and 1 for anything other than Rx and Tx?
If so, this may be blocking your upload.