From 3bded1b4e629d0fdb83698b09a887eccc0ddf756 Mon Sep 17 00:00:00 2001 From: rosahay-silabs Date: Fri, 26 May 2023 10:47:47 +0530 Subject: [PATCH] Adds sl_wfx_host_post_bootloader_spi_transfer in relevant failure outcomes --- src/platform/silabs/efr32/OTAImageProcessorImpl.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/platform/silabs/efr32/OTAImageProcessorImpl.cpp b/src/platform/silabs/efr32/OTAImageProcessorImpl.cpp index bc336ad6ef55f9..750baa7a7aeeb2 100644 --- a/src/platform/silabs/efr32/OTAImageProcessorImpl.cpp +++ b/src/platform/silabs/efr32/OTAImageProcessorImpl.cpp @@ -212,6 +212,9 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context) ChipLogError(SoftwareUpdate, "%s: bootloader_verifyImage() error %ld", __func__, err); // Call the OTARequestor API to reset the state GetRequestorInstance()->CancelImageUpdate(); +#if (defined(EFR32MG24) && defined(SL_WIFI)) + sl_wfx_host_post_bootloader_spi_transfer(); +#endif return; } @@ -221,14 +224,17 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context) ChipLogError(SoftwareUpdate, "%s: bootloader_setImageToBootload() error %ld", __func__, err); // Call the OTARequestor API to reset the state GetRequestorInstance()->CancelImageUpdate(); +#if (defined(EFR32MG24) && defined(SL_WIFI)) + sl_wfx_host_post_bootloader_spi_transfer(); +#endif return; } - // This reboots the device - CORE_CRITICAL_SECTION(bootloader_rebootAndInstall();) #if (defined(EFR32MG24) && defined(SL_WIFI)) sl_wfx_host_post_bootloader_spi_transfer(); #endif + // This reboots the device + CORE_CRITICAL_SECTION(bootloader_rebootAndInstall();) } void OTAImageProcessorImpl::HandleAbort(intptr_t context)