diff --git a/libraries/AP_FlashIface/AP_FlashIface_JEDEC.cpp b/libraries/AP_FlashIface/AP_FlashIface_JEDEC.cpp index 0c5030bc5c..e7f3bb04e7 100644 --- a/libraries/AP_FlashIface/AP_FlashIface_JEDEC.cpp +++ b/libraries/AP_FlashIface/AP_FlashIface_JEDEC.cpp @@ -162,6 +162,10 @@ void AP_FlashIface_JEDEC::reset_device() { // Get chip out of XIP mode AP_HAL::QSPIDevice::CommandHeader cmd; +#ifndef HAL_BOOTLOADER_BUILD // this is required in order to run jedec_test with a regular bootloader + _dev->get_semaphore()->take_blocking(); +#endif + /* Single line CMD_RESET_MEMORY command.*/ cmd.cmd = CMD_RESET_ENABLE; cmd.cfg = AP_HAL::QSPI::CFG_CMD_MODE_ONE_LINE;