Hi,
I'm trying to run optiboot bootloader on my ATMega328PB with not only external Reset also with Power-On Reset.
I modified the source file like this, and excluded PORF.
Shouldn't start the bootloader now also on POR??
But the bootloader doesn't start with POR, it still starts only with external reset.
Any idea what I am missing ?
Thanks!
int main(void) {
uint8_t ch;
register uint16_t address = 0;
register uint8_t length;
asm volatile ("clr __zero_reg__");
ch = MCUSR;
MCUSR = 0;
if (ch & ((1<<WDRF) | (1<<BORF) /*| (1<<PORF)*/))
appStart(ch);
...