Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinez-silabs committed Nov 11, 2024
1 parent 33bbc4d commit 01e537d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/platform/silabs/efr32/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extern "C" {
CORE_CRITICAL_SECTION(code;) \
}
#else
// series 3 bootloader_ calls use rtos mutex for thread safeness. Cannot be callsed withing a critical sectionß
// series 3 bootloader_ calls uses rtos mutex for thread safety. Cannot be called within a critical section
#define WRAP_BL_DFU_CALL(code) \
{ \
code; \
Expand Down Expand Up @@ -231,8 +231,8 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context)
ChipLogProgress(SoftwareUpdate, "OTA image downloaded successfully");
}

// TODO SE access is not thread safe. Assert if Other task acess it during bootloader_verifyImage or bootloader_setImageToBootload
// steps - MATTER-4155 - PLATFORM_HYD-3235
// TODO: SE access is not thread safe. It assert if other tasks accesses it during bootloader_verifyImage or
// bootloader_setImageToBootload steps - MATTER-4155 - PLATFORM_HYD-3235
void OTAImageProcessorImpl::LockRadioProcessing()
{
#if !SL_WIFI
Expand Down Expand Up @@ -264,7 +264,9 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context)
}
#endif // SL_BTLCTRL_MUX

#if defined(_SILICON_LABS_32B_SERIES_3) && CHIP_PROGRESS_LOGGING
osDelay(100); // sl-temp: delay for uart print before verifyImage
#endif // _SILICON_LABS_32B_SERIES_3 && CHIP_PROGRESS_LOGGING
LockRadioProcessing();
WRAP_BL_DFU_CALL(err = bootloader_verifyImage(mSlotId, NULL))
UnlockRadioProcessing();
Expand All @@ -282,7 +284,7 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context)
#endif // SL_BTLCTRL_MUX
return;
}
ChipLogError(SoftwareUpdate, "Image verified, Set image to bootloader");
ChipLogProgress(SoftwareUpdate, "Image verified, Set image to bootload");
LockRadioProcessing();
WRAP_BL_DFU_CALL(err = bootloader_setImageToBootload(mSlotId))
UnlockRadioProcessing();
Expand Down Expand Up @@ -310,8 +312,10 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context)
}
#endif // SL_BTLCTRL_MUX

ChipLogError(SoftwareUpdate, "Reboot and install new image...");
ChipLogProgress(SoftwareUpdate, "Reboot and install new image...");
#if defined(_SILICON_LABS_32B_SERIES_3) && CHIP_PROGRESS_LOGGING
osDelay(100); // sl-temp: delay for uart print before reboot
#endif // _SILICON_LABS_32B_SERIES_3 && CHIP_PROGRESS_LOGGING
LockRadioProcessing();
// This reboots the device
WRAP_BL_DFU_CALL(bootloader_rebootAndInstall())
Expand Down

0 comments on commit 01e537d

Please sign in to comment.