Reset Information#
Passing information when resetting into and out of the bootloader.
To signal the bootloader to run, the application needs to write the BootloaderResetCause_t structure to the first address of RAM, setting BootloaderResetCause_t::reason to BOOTLOADER_RESET_REASON_BOOTLOAD.
The reset cause is only valid if BootloaderResetCause_t::signature is set to BOOTLOADER_RESET_SIGNATURE_VALID.
BootloaderResetCause_t resetCause = {
.reason = BOOTLOADER_RESET_REASON_BOOTLOAD,
.signature = BOOTLOADER_RESET_SIGNATURE_VALID
}
When the bootloader reboots back into the app, it sets the reset reason to BOOTLOADER_RESET_REASON_GO if the bootload succeeded, or BOOTLOADER_RESET_REASON_BADIMAGE if the bootload failed due to errors when parsing the upgrade image.
Note
The reset information is automatically filled out before reset if the bootloader_rebootAndInstall function is called.
Modules#
Macros#
Unknown bootloader cause (should never occur)
Bootloader caused reset telling app to run.
Application requested that bootloader runs.
Bootloader detected bad external upgrade image.
Fatal Error or assert in bootloader.
Forced bootloader activation.
OTA Bootloader mode activation.
Bootloader initiated deep sleep.
Application verification failed.
Bootloader requested that first stage upgrades main bootloader.
Bootloader timed out waiting for upgrade image.
Soft-reset was forced to handle a fault.
Soft-reset was forced to handle a security fault.
Reset signature is valid.
Reset signature is invalid.
Macro Definition Documentation#
BOOTLOADER_RESET_REASON_UNKNOWN#
#define BOOTLOADER_RESET_REASON_UNKNOWNValue:
0x0200u
Unknown bootloader cause (should never occur)
62
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_GO#
#define BOOTLOADER_RESET_REASON_GOValue:
0x0201u
Bootloader caused reset telling app to run.
64
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_BOOTLOAD#
#define BOOTLOADER_RESET_REASON_BOOTLOADValue:
0x0202u
Application requested that bootloader runs.
66
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_BADIMAGE#
#define BOOTLOADER_RESET_REASON_BADIMAGEValue:
0x0203u
Bootloader detected bad external upgrade image.
68
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_FATAL#
#define BOOTLOADER_RESET_REASON_FATALValue:
0x0204u
Fatal Error or assert in bootloader.
70
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_FORCE#
#define BOOTLOADER_RESET_REASON_FORCEValue:
0x0205u
Forced bootloader activation.
72
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_OTAVALID#
#define BOOTLOADER_RESET_REASON_OTAVALIDValue:
0x0206u
OTA Bootloader mode activation.
74
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_DEEPSLEEP#
#define BOOTLOADER_RESET_REASON_DEEPSLEEPValue:
0x0207u
Bootloader initiated deep sleep.
76
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_BADAPP#
#define BOOTLOADER_RESET_REASON_BADAPPValue:
0x0208u
Application verification failed.
78
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_UPGRADE#
#define BOOTLOADER_RESET_REASON_UPGRADEValue:
0x0209u
Bootloader requested that first stage upgrades main bootloader.
80
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_TIMEOUT#
#define BOOTLOADER_RESET_REASON_TIMEOUTValue:
0x020Au
Bootloader timed out waiting for upgrade image.
82
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_FAULT#
#define BOOTLOADER_RESET_REASON_FAULTValue:
0x020Bu
Soft-reset was forced to handle a fault.
84
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_REASON_TZ_FAULT#
#define BOOTLOADER_RESET_REASON_TZ_FAULTValue:
0x020Cu
Soft-reset was forced to handle a security fault.
86
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_SIGNATURE_VALID#
#define BOOTLOADER_RESET_SIGNATURE_VALIDValue:
0xF00Fu
Reset signature is valid.
89
of file platform/bootloader/api/btl_reset_info.h
BOOTLOADER_RESET_SIGNATURE_INVALID#
#define BOOTLOADER_RESET_SIGNATURE_INVALIDValue:
0xC33Cu
Reset signature is invalid.
91
of file platform/bootloader/api/btl_reset_info.h