Constant "reset" under certain power-up conditions
Posted: Mon Dec 12, 2011 9:50 pm
I've noticed (and this may not be new, as I'm peeling the onion on multiple issues) that when I power up the board, if the board has been unpowered for some time (more than 5 seconds), the uploaded application does not run, and pressing RESET has no effect. A scope on pin 13 shows it doing the 3x blink once per second. It also shows that the RESET line at the ATMEGA328P appears to remain high while the blinking is occurring.
If, however, I cycle power on the board (remove power and replace it within a few seconds) the board powers up into the application immediately and the blinking on pin 13 does not occur.
If I then press the RESET button once, pin 13 goes high three times, and then the application starts.
If I press RESET a second time, the board goes into the 3x blink once per second mode and pressing REST again has no effect. Power must be briefly cycled.
When the board is in this "repeated blink" mode, it is possible to upload a sketch to it, and after upload, the sketch runs.
(Note, I do not have an LED hooked up to pin 13, though when I suspect this problem is occurring, I plug an LED with a resistor to ground into pin 13 and I can see it blink.
Recently, I had to use an ISP programmer (an Arduino Uno running ArduinoISP and properly wired) to overwrite a sketch which was preventing uploads. I overwrote the offending sketch with the Bare Minimum example.) Afterwards, I was able to upload normally (via the IDE, not the ISP) successfully.
The only thing I can think of it takes 5-8 seconds for C12 to fully discharge, and wonder if the time required to recharge it delays the rise of the RESET line and the board then behaves differently.
I am wondering if others are seeing this, or if there is a bootloader for this particular board that I can flash with my Arduino ISP, and how I might go about doing that?
If, however, I cycle power on the board (remove power and replace it within a few seconds) the board powers up into the application immediately and the blinking on pin 13 does not occur.
If I then press the RESET button once, pin 13 goes high three times, and then the application starts.
If I press RESET a second time, the board goes into the 3x blink once per second mode and pressing REST again has no effect. Power must be briefly cycled.
When the board is in this "repeated blink" mode, it is possible to upload a sketch to it, and after upload, the sketch runs.
(Note, I do not have an LED hooked up to pin 13, though when I suspect this problem is occurring, I plug an LED with a resistor to ground into pin 13 and I can see it blink.
Recently, I had to use an ISP programmer (an Arduino Uno running ArduinoISP and properly wired) to overwrite a sketch which was preventing uploads. I overwrote the offending sketch with the Bare Minimum example.) Afterwards, I was able to upload normally (via the IDE, not the ISP) successfully.
The only thing I can think of it takes 5-8 seconds for C12 to fully discharge, and wonder if the time required to recharge it delays the rise of the RESET line and the board then behaves differently.
I am wondering if others are seeing this, or if there is a bootloader for this particular board that I can flash with my Arduino ISP, and how I might go about doing that?