@CHIP-RTOS C Library - Hardware API
hal_get_reboot_reason
Get reboot reason. int hal_get_reboot_reason ( void ); Parameters
- -- none --
Return Value
- reason:
0: REBOOT_UNKNOWN
3: REBOOT_WATCHDOG
4: REBOOT_POWER_FAIL
The constants referred to here are defined in
<HWAPI.H> header file.
Comments
- This function only returns
valid results if the
hal_save_non_volatile_data API
was called from the user's Non-Maskable Interrupt (NMI)
callback or at program exit
and the init/restore
hal_init_non_volatile_data
function was called following the reboot.
This function may also be used from within an NMI
callback
to access the cause of the current shut down interrupt.
In this case the reading will be either REBOOT_WATCHDOG
or REBOOT_POWER_FAIL
.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
Supported since or modified in @CHIP-RTOS version-
| SC12 | SC13 | SC11 | SC1x3 | SC2x |
-
| V1.00 | V1.00 | V1.00 | V0.90 | V1.00 |
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|