In cases users do not want to wait for a watchdog to time out,
they can ijmp to bootloaders reset-vector.
However they need to clear MCUCSR.
Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
static inline bool bootLoaderCondition(void)
{
- if (__BOOTLOADERENTRY_FROMSOFTWARE__bootup_MCUCSR & (_BV(WDRF))) {
+ if (__BOOTLOADERENTRY_FROMSOFTWARE__bootup_MCUCSR & (~(_BV(WDRF)))) {
+ } else {
if (__BOOTLOADERENTRY_FROMSOFTWARE__bootup_RAMEND_doesmatch == (__BOOTLOADERENTRY_FROMSOFTWARE__EXPECTEDADDRESS & 0xff)) {
// anything else: match - the firmware is calling the bootloader
return true;