Add function to reset the reboot count

pull/8561/head
Senthil Ramakrishnan 2018-11-07 10:29:33 -06:00
parent 3ffa78ed41
commit a87043fd74
1 changed files with 8 additions and 1 deletions

View File

@ -133,12 +133,19 @@ mbed_error_status_t mbed_get_reboot_fault_context (mbed_fault_context_t *fault_c
``` ```
The below API can be called by application to reset the error context captured in the Crash-Report RAM. The below API can be called by application to reset the error context captured in the Crash-Report RAM.
The function should MBED_ERROR_NOT_FOUND if there is no error context currently stored. The function should return MBED_ERROR_NOT_FOUND if there is no error context currently stored.
```C ```C
//Reset the reboot error context //Reset the reboot error context
mbed_error_status_t mbed_reset_reboot_error_info() mbed_error_status_t mbed_reset_reboot_error_info()
``` ```
The below API can be called by application to reset(to be set to 0) the error reboot count captured in the Crash-Report RAM.
The function should return MBED_ERROR_NOT_FOUND if there is no error context currently stored.
```C
//Reset the reboot error context
mbed_error_status_t mbed_reset_reboot_count()
```
### Mechanism to report the error data after reboot ### Mechanism to report the error data after reboot
MbedOS initialization sequence should check if the reboot is caused by a fatal error and should report the same to the application using callback mechanism. The system may also print this to terminal if enabled. MbedOS initialization sequence should check if the reboot is caused by a fatal error and should report the same to the application using callback mechanism. The system may also print this to terminal if enabled.