patrick3118
patrick3118

Reputation: 1

Atmel bootloader execution at start-up

I'm using an ATmega328p microcontroller with the optiboot bootloader. Optiboot is configured to flash a "start LED" for 3 times when optiboot is running.

Fuse bits are set for a bootloader section of 256 words and BOOTRST is programmed to jump into the bootloader section at start-up.

With the bootloader installed, I flash the actual firmware via the UART (pin 30 and 31) and that all works fine.

Now to my question:

When my firmware is running and I pull the reset line of the atmel to GND, I can see the "start LED" flash 3 times and then the firmware execution starts. This tells me that the bootloader run right after the reset. However, when I start-up the atmel (supply power to the chip), I do not see the "start LED" flash 3 times and the firmware code seems to be executed right away.

Does anyone have an idea why optiboot flashes the "start LED" after pulling the reset line to GND and not when I power-on the chip?

The reset line is directly connected with a 10k pullup to the supply voltage of the atmel.

I hope someone has an explanation and any help is much appreciated.

Upvotes: 0

Views: 185

Answers (1)

embeddedstack
embeddedstack

Reputation: 387

i think it's relevant ,

"On reset, Optiboot starts and reads the reset reason from MCUSR. For any cause other than "external reset", the application is started immediately. Otherwise, optiboot attempts to download new application software"

Upvotes: 0

Related Questions