Go Down

Topic: Indication for bootloaded ATMEGA328PU (Read 1 time) previous topic - next topic

Hi,

Is there any indication i can get to see if chip is bootloaded or not ? I am using Arduino UNO.

Some indication like LED blink after inserting the chip on UNO board and connecting battery without PC interface ?

Thanks,

Ujjwal Soni

CrossRoads

Yes, usually the L LED will blink with some pattern.
If Optiboot is loaded, the blink is 3 quick flashes, then a longer pause,  and repeats.

Once you load a sketch, the L LED will do whatever your code is programmed for, and you will not see the L LED flashing from the bootloader.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Hi,

Is this the LED that is connected on pin 13 ?

Thanks,

Ujjwal Soni

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

TheGipp

I have a follow up question regarding the bootloader (optiboot) on the UNO.

When I have a sketch loaded, the bootloader still appears to run when I powerup the UNO using the b attery/external power connector (no USB).

Is that supposed to happen?  Or better yet, how is that supposed to happen?
The optiboot source code indicates that the appStart() function is called directly in any reset case except for an external reset (EXTRF).   I understand that after the watchdog timeout, the watchdog reset will result in the bootloader being called again. But, this time the WDRF flag would be set rather than the EXTRF and optiboot would call appStart() right away.

Why is it that on power up, optiboot still flashes the LED as if the bootloader has run, then sketch starts as expected?

I would expect (based on the optiboot source code) that on power-on reset, the bootloader would call appStart() right away and not flash the LED 3 times.

Is there something special about the UNO board that when the board powers up it causes an "external reset" instead of a power-on reset?

TheGipp

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up