-
Notifications
You must be signed in to change notification settings - Fork 514
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
[bootloader] Implement bootloader reset reasons #2773
[bootloader] Implement bootloader reset reasons #2773
Conversation
Just a general question on whether we should be providing a reason for disconnection in the vitals publish as well? I did a button reset and the disconnect reason was "none". I then powered off my msom and got a reason of "unknown". {
"connection": {
"status": "connecting",
"error": 0,
"attempts": 1,
"disconnects": 0,
"disconnect_reason": "none",
"interface": "Cellular"
},
"coap": {
"transmit": 9,
"retransmit": 0,
"unack": 0,
"round_trip": 1526
},
"publish": {
"rate_limited": 0
}
} |
Connection vitals are not very useful. The counters tend to be 0 or 1. I think it's out of scope to rework that to be something more useful right now, but worth considering perhaps as part of ACM work. |
I agree changing it may be out-of-scope of the reason fixes. Just thinking that since we already know that we have reset for OTA or other that it would be easy to determine and report. |
The vitals mostly contain system diagnostics stuff. The "connection" structure you point out is mostly the "Network" diagnostics. There are similar "Cloud" diagnostics (ie connect attempts, disconnects, disconnect reason). I dont know how well the Network disconnect reason diagnostic works These are distinct from the |
Pulling in changes from #2771 |
1. When completing OTA bootloader update 2. When completing DFU update via button hold Minor wdog test for msom platform
9c7a184
to
3852e14
Compare
Problem
The RTL bootloader has not been updated to use the backup register HAL to communicate reset reason to the system part application. This leads to undefined reset reasons in the following scenarios
Solution
The backup register HAL is implemented on RTL platform via retained SRAM, the bootloader just needs to write the "registers"
Steps to Test
Checkout branch, compile bootloader, flash
Flash app via reset button hold and DFU
Log reset reason ie (
Log.info("Last Reset Reason %d", System.resetReason());
)Verify that it is correct (
70
= firmware update,40
= pin/power reset):Without bootloader update, the values are undefined:
Example App
References
See comment here
Completeness