Reset InformationApplication Interface > Common Application Interface

Description

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 .

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.

Data Structures

struct BootloaderResetCause_t
Reset cause of the bootloader.

Macros

#define BOOTLOADER_RESET_REASON_UNKNOWN 0x0200u
Unknown bootloader cause (should never occur)
#define BOOTLOADER_RESET_REASON_GO 0x0201u
Bootloader caused reset telling app to run.
#define BOOTLOADER_RESET_REASON_BOOTLOAD 0x0202u
Application requested that bootloader runs.
#define BOOTLOADER_RESET_REASON_BADIMAGE 0x0203u
Bootloader detected bad external upgrade image.
#define BOOTLOADER_RESET_REASON_FATAL 0x0204u
Fatal Error or assert in bootloader.
#define BOOTLOADER_RESET_REASON_FORCE 0x0205u
Forced bootloader activation.
#define BOOTLOADER_RESET_REASON_OTAVALID 0x0206u
OTA Bootloader mode activation.
#define BOOTLOADER_RESET_REASON_DEEPSLEEP 0x0207u
Bootloader initiated deep sleep.
#define BOOTLOADER_RESET_REASON_BADAPP 0x0208u
Application verification failed.
#define BOOTLOADER_RESET_REASON_UPGRADE 0x0209u
Bootloader requested that first stage upgrades main bootloader.
#define BOOTLOADER_RESET_REASON_TIMEOUT 0x020Au
Bootloader timed out waiting for upgrade image.
#define BOOTLOADER_RESET_SIGNATURE_VALID 0xF00Fu
Reset signature is valid.
#define BOOTLOADER_RESET_SIGNATURE_INVALID 0xC33Cu
Reset signature is invalid.