From d0e6fe1629fa1d9160472d2e790b962404bcb340 Mon Sep 17 00:00:00 2001 From: senthil kumar E K Date: Mon, 20 Mar 2023 21:19:51 +0530 Subject: [PATCH] Fix to SiWx917 SoC MCU Reset issue --- src/platform/silabs/SilabsConfig.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/platform/silabs/SilabsConfig.cpp b/src/platform/silabs/SilabsConfig.cpp index 1d5fab99c71e5b..199bfb1c925311 100644 --- a/src/platform/silabs/SilabsConfig.cpp +++ b/src/platform/silabs/SilabsConfig.cpp @@ -34,6 +34,9 @@ #include "nvm3_default.h" #include "nvm3_hal_flash.h" #include +#ifdef BRD4325A +#include "rsi_ccp_common.h" +#endif // Substitute the GSDK weak nvm3_lockBegin and nvm3_lockEnd // for an application controlled re-entrance protection @@ -43,6 +46,9 @@ static StaticSemaphore_t nvm3_SemStruct; void nvm3_lockBegin(void) { VerifyOrDie(nvm3_Sem != NULL); +#ifdef BRD4325A + __disable_irq(); +#endif xSemaphoreTake(nvm3_Sem, portMAX_DELAY); } @@ -50,6 +56,9 @@ void nvm3_lockEnd(void) { VerifyOrDie(nvm3_Sem != NULL); xSemaphoreGive(nvm3_Sem); +#ifdef BRD4325A + __enable_irq(); +#endif } namespace chip {