AP_Bootloader: external flash needs to be initialised before jumping to app

This commit is contained in:
bugobliterator 2023-04-12 14:52:12 +10:00 committed by Andrew Tridgell
parent 105bfe4cbc
commit 1f00b34355
1 changed files with 8 additions and 8 deletions

View File

@ -161,6 +161,14 @@ int main(void)
}
#endif
#if EXT_FLASH_SIZE_MB
while (!ext_flash.init()) {
// keep trying until we get it working
// there's no future without it
chThdSleep(chTimeMS2I(20));
}
#endif
if (try_boot) {
jump_to_app();
}
@ -174,14 +182,6 @@ int main(void)
flash_init();
#if EXT_FLASH_SIZE_MB
while (!ext_flash.init()) {
// keep trying until we get it working
// there's no future without it
chThdSleep(chTimeMS2I(20));
}
#endif
#if AP_BOOTLOADER_FLASH_FROM_SD_ENABLED
if (flash_from_sd()) {
jump_to_app();