Skip to content

Commit

Permalink
[nrf noup] Lock thread stack before factory reset
Browse files Browse the repository at this point in the history
This commit fix a problem with thread activity interrupting factory reset.
This activity used to led to “Factory reset fail: -6”.
Writing to cleared nvm flash pages caused the problem.

Signed-off-by: Patryk Lipinski <patryk.lipinski@nordicsemi.no>
  • Loading branch information
LipinskiPNordicSemi committed Jan 22, 2024
1 parent b6a5e9a commit 24d13ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/platform/Zephyr/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ void ConfigurationManagerImpl::RunConfigUnitTest(void)
void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
{
ChipLogProgress(DeviceLayer, "Performing factory reset");
ThreadStackMgr().LockThreadStack();

#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS
void * storage = nullptr;
Expand Down

0 comments on commit 24d13ec

Please sign in to comment.