1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

bootloader: use software reset instead of jump (#5823)

fixes #5627
This commit is contained in:
Raphael Coeffic 2018-04-12 18:49:50 +02:00 committed by Andre Bernet
parent 39c5d65f76
commit 7b12c99a0b

View file

@ -507,9 +507,21 @@ int main()
} }
if (state == ST_REBOOT) { if (state == ST_REBOOT) {
// Jump to proper application address
lcdClear(); lcdClear();
lcdRefresh();
lcdRefreshWait();
#if !defined(EEPROM)
// Use jump on radios with emergency mode
// to avoid triggering it with a soft reset
// Jump to proper application address
jumpTo(APP_START_ADDRESS); jumpTo(APP_START_ADDRESS);
#else
// Use software reset everywhere else
NVIC_SystemReset();
#endif
} }
} }