-
Notifications
You must be signed in to change notification settings - Fork 3k
Halt to enforce reboot limit once only #9544
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,15 +218,16 @@ mbed_error_status_t mbed_error_initialize(void) | |
//We let the callback reset the error info, so check if its still valid and do the rest only if its still valid. | ||
if (report_error_ctx->error_reboot_count > 0) { | ||
|
||
report_error_ctx->is_error_processed = 1;//Set the flag that we already processed this error | ||
crc_val = compute_crc32(report_error_ctx, offsetof(mbed_error_ctx, crc_error_ctx)); | ||
report_error_ctx->crc_error_ctx = crc_val; | ||
|
||
//Enforce max-reboot only if auto reboot is enabled | ||
#if MBED_CONF_PLATFORM_FATAL_ERROR_AUTO_REBOOT_ENABLED | ||
if (report_error_ctx->error_reboot_count >= MBED_CONF_PLATFORM_ERROR_REBOOT_MAX) { | ||
mbed_halt_system(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we clear all RAM data here before halting? So next reset - which has to be manual since system is in halt will not have impact of this error. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we probably want to preserve the contents of the error RAM, in case someone wants to attach a debugger or something. Setting the "processed" flag should be sufficient to stop anything else happening on next reset. |
||
} | ||
#endif | ||
report_error_ctx->is_error_processed = 1;//Set the flag that we already processed this error | ||
crc_val = compute_crc32(report_error_ctx, offsetof(mbed_error_ctx, crc_error_ctx)); | ||
report_error_ctx->crc_error_ctx = crc_val; | ||
} | ||
} | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.