Reset#
Methods to reset from the bootloader to the app.
Functions#
Reset from the bootloader with a reset cause.
Set a reset reason.
Use the lower 4 bits of the reset cause signature to store a reset counter able to count up to 15 before wrapping around.
Clear and disable the reset counter.
Check whether the reset counter is enabled.
Increment the reset counter by one.
Get the reset counter value.
Get the reset reason without verifying it.
Invalidate the reset reason.
Classify reset and get the reset reason.
Function Documentation#
reset_resetWithReason#
void reset_resetWithReason (uint16_t resetReason)
Reset from the bootloader with a reset cause.
N/A | resetReason | A reset reason as defined in the bootloader interface |
Note
This function does not return.
43
of file platform/bootloader/core/btl_reset.h
reset_setResetReason#
void reset_setResetReason (uint16_t resetReason)
Set a reset reason.
N/A | resetReason | A reset reason as defined in the bootloader interface |
51
of file platform/bootloader/core/btl_reset.h
reset_enableResetCounter#
void reset_enableResetCounter (void )
Use the lower 4 bits of the reset cause signature to store a reset counter able to count up to 15 before wrapping around.
N/A |
The value of the counter will be preserved across resets.
58
of file platform/bootloader/core/btl_reset.h
reset_disableResetCounter#
void reset_disableResetCounter (void )
Clear and disable the reset counter.
N/A |
63
of file platform/bootloader/core/btl_reset.h
reset_resetCounterEnabled#
bool reset_resetCounterEnabled (void )
Check whether the reset counter is enabled.
N/A |
Returns
True if reset counter is enabled, else false.
70
of file platform/bootloader/core/btl_reset.h
reset_incrementResetCounter#
void reset_incrementResetCounter (void )
Increment the reset counter by one.
N/A |
Wraps around to 0 if the current counter value is equal to 15.
77
of file platform/bootloader/core/btl_reset.h
reset_getResetCounter#
uint8_t reset_getResetCounter (void )
Get the reset counter value.
N/A |
Note
The reset counter has to be enabled for this value to be valid.
Returns
The reset counter value
86
of file platform/bootloader/core/btl_reset.h
reset_getResetReason#
uint16_t reset_getResetReason (void )
Get the reset reason without verifying it.
N/A |
Returns
The reset reason
93
of file platform/bootloader/core/btl_reset.h
reset_invalidateResetReason#
void reset_invalidateResetReason (void )
Invalidate the reset reason.
N/A |
Note
This will also disable the reset counter if it is in use.
100
of file platform/bootloader/core/btl_reset.h
reset_classifyReset#
uint16_t reset_classifyReset (void )
Classify reset and get the reset reason.
N/A |
Returns
Reset cause or BOOTLOADER_RESET_REASON_UNKNOWN
107
of file platform/bootloader/core/btl_reset.h