You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a custom board I cannot relay on a hardware reset. The running application will reset the MCU when receives a specific string.
My need is to enter the bootloader not only at power on, but also on software reset.
I looked at the options here, but I can't find nothing about.
Is there anything ready (perhaps undocumented) or it's like a "feature request" and I have to change the code?
The text was updated successfully, but these errors were encountered:
Can this still be confirmed working by someone?
I tried it on an ATmega328P
void reset() {
typedef void (*do_reboot_t)(void);
const do_reboot_t do_reboot = (do_reboot_t)((FLASHEND - 511) >> 1);
cli(); TCCR0A = TCCR1A = TCCR2A = 0; // make sure interrupts are off and timers are reset.
MCUSR = 0;
do_reboot();
}
but with no joy. The system seems to hang with a flickering LED (Uno Board).
I wanted to run avrdude after a remotely triggered software reset.
I tried FLASHEND - 1023 and also 2047 - too lazy to read the fuses at the moment :-)
Hmm. Doesn't work here either. I'm using a modified ASCIITable sketch for testing, and there are some signs that perhaps the UART ISR is getting called before things are fully initialized, but even with added code that should be making sure that the UART is disabled before the do_reboot(), it still fails.
For a custom board I cannot relay on a hardware reset. The running application will reset the MCU when receives a specific string.
My need is to enter the bootloader not only at power on, but also on software reset.
I looked at the options here, but I can't find nothing about.
Is there anything ready (perhaps undocumented) or it's like a "feature request" and I have to change the code?
The text was updated successfully, but these errors were encountered: