Skip to content

Commit

Permalink
Fix to SiWx917 SoC MCU Reset issue
Browse files Browse the repository at this point in the history
  • Loading branch information
senthilku committed Mar 20, 2023
1 parent 974f620 commit d0e6fe1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/platform/silabs/SilabsConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#include "nvm3_default.h"
#include "nvm3_hal_flash.h"
#include <nvm3_lock.h>
#ifdef BRD4325A
#include "rsi_ccp_common.h"
#endif

// Substitute the GSDK weak nvm3_lockBegin and nvm3_lockEnd
// for an application controlled re-entrance protection
Expand All @@ -43,13 +46,19 @@ static StaticSemaphore_t nvm3_SemStruct;
void nvm3_lockBegin(void)
{
VerifyOrDie(nvm3_Sem != NULL);
#ifdef BRD4325A
__disable_irq();
#endif
xSemaphoreTake(nvm3_Sem, portMAX_DELAY);
}

void nvm3_lockEnd(void)
{
VerifyOrDie(nvm3_Sem != NULL);
xSemaphoreGive(nvm3_Sem);
#ifdef BRD4325A
__enable_irq();
#endif
}

namespace chip {
Expand Down

0 comments on commit d0e6fe1

Please sign in to comment.