[Realtek] Add boot reason handling in DiagnosticDataProvider#71467
[Realtek] Add boot reason handling in DiagnosticDataProvider#71467pankore wants to merge 2 commits intoproject-chip:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Realtek FreeRTOS implementation of GetBootReason to use the platform-specific reset_reason_get() API, mapping the results to standard Matter boot reasons. The review feedback suggests caching the boot reason value to prevent redundant hardware access and potential 'clear-on-read' side effects. Additionally, it is recommended to expand the reset reason mapping to include software and hardware resets if supported by the platform API to improve diagnostic accuracy.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #71467 +/- ##
=======================================
Coverage 54.32% 54.32%
=======================================
Files 1577 1577
Lines 108257 108257
Branches 13401 13401
=======================================
Hits 58806 58806
Misses 49451 49451 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
PR #71467: Size comparison from fdb31db to 33645e4 Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71467: Size comparison from cdb458b to f476d44 Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Summary
This PR modifies the GetBootReason() function in the DiagnosticDataProvider implementation. It replaces the previous implementation that relied on ConfigurationMgr().GetBootReason() with a direct hardware read using Realtek's reset_reason_get() API from wdt.h.
Related issues
[TC-SU-2.6] NotifyUpdateApplied Command from DUT to OTA-P
TH reads BootReason in General Diagnostics cluster from the DUT. Verify that the returned value of BootReason is
SoftwareUpdateCompleted.
Testing
Tested by building realtek light-switch app and passing TC-SU-2.6.