Skip to content

Commit 60f0e13

Browse files
vTaskPrioritySet(NULL, 0) doesn't always fix the issue it was trying to address and could even prevent the current task to be run again. Use a vTaskDelay of 500 ms to address the missing response issue and also make sure the task can execute the device reset. (#26585)
1 parent 64bf867 commit 60f0e13

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/platform/silabs/efr32/ConfigurationManagerImpl.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,8 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
295295

296296
// When called from an RPC, the following reset occurs before the RPC can respond,
297297
// which breaks tests (because it looks like the RPC hasn't successfully completed).
298-
// One way to fix this is to reduce the priority of this task, to allow logging to
299-
// complete before the reset occurs.
300-
vTaskPrioritySet(NULL, 0);
298+
// Block the task for 500 ms before the reset occurs to allow RPC response to be sent
299+
vTaskDelay(pdMS_TO_TICKS(500));
301300

302301
NVIC_SystemReset();
303302
}

0 commit comments

Comments
 (0)