Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silabs]Fix OnSoftwareFaultDetect chiplock assert occuring on appError() #32713

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions examples/platform/silabs/SoftwareFaultReports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ void OnSoftwareFaultEventHandler(const char * faultRecordString)
softwareFault.id = taskDetails.xTaskNumber;
softwareFault.faultRecording.SetValue(ByteSpan(Uint8::from_const_char(faultRecordString), strlen(faultRecordString)));

SoftwareDiagnosticsServer::Instance().OnSoftwareFaultDetect(softwareFault);
SystemLayer().ScheduleLambda([&softwareFault] { SoftwareDiagnosticsServer::Instance().OnSoftwareFaultDetect(softwareFault); });
// Allow some time for the Fault event to be sent as the next action after exiting this function
// is typically an assert or reboot.
// Depending on the task at fault, it is possible the event can't be transmitted.
vTaskDelay(pdMS_TO_TICKS(1000));
#endif // MATTER_DM_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER
}

Expand Down Expand Up @@ -145,9 +149,6 @@ extern "C" void vApplicationMallocFailedHook(void)
#endif
Silabs::OnSoftwareFaultEventHandler(faultMessage);

// Allow some time for the Fault event to be sent before the chipAbort action
// Depending of the task at fault, it is possible the event can't be transmitted.
vTaskDelay(pdMS_TO_TICKS(1000));
/* Force an assert. */
configASSERT((volatile void *) NULL);
}
Expand All @@ -167,9 +168,6 @@ extern "C" void vApplicationStackOverflowHook(TaskHandle_t pxTask, char * pcTask
#endif
Silabs::OnSoftwareFaultEventHandler(faultMessage);

// Allow some time for the Fault event to be sent before the chipAbort action
// Depending of the task at fault, it is possible the event can't be transmitted.
vTaskDelay(pdMS_TO_TICKS(1000));
/* Force an assert. */
configASSERT((volatile void *) NULL);
}
Expand Down Expand Up @@ -251,9 +249,6 @@ extern "C" void RAILCb_AssertFailed(RAIL_Handle_t railHandle, uint32_t errorCode
#endif // SILABS_LOG_ENABLED
Silabs::OnSoftwareFaultEventHandler(faultMessage);

// Allow some time for the Fault event to be sent before the chipAbort action
// Depending of the task at fault, it is possible the event can't be transmitted.
vTaskDelay(pdMS_TO_TICKS(1000));
chipAbort();
}
#endif // BRD4325A
Expand Down
Loading