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

Modules#

BootloaderResetCause_t

Macros#

#define

Unknown bootloader cause (should never occur)

#define

Bootloader caused reset telling app to run.

#define

Application requested that bootloader runs.

#define

Bootloader detected bad external upgrade image.

#define

Fatal Error or assert in bootloader.

#define

Forced bootloader activation.

#define

OTA Bootloader mode activation.

#define

Bootloader initiated deep sleep.

#define

Application verification failed.

#define

Bootloader requested that first stage upgrades main bootloader.

#define

Bootloader timed out waiting for upgrade image.

#define

Soft-reset was forced to handle a fault.

#define

Soft-reset was forced to handle a security fault.

#define

Reset signature is valid.

#define

Reset signature is invalid.

Macro Definition Documentation#

BOOTLOADER_RESET_REASON_UNKNOWN#

#define BOOTLOADER_RESET_REASON_UNKNOWN
Value:
0x0200u

Unknown bootloader cause (should never occur)


Definition at line 62 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_GO#

#define BOOTLOADER_RESET_REASON_GO
Value:
0x0201u

Bootloader caused reset telling app to run.


Definition at line 64 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_BOOTLOAD#

#define BOOTLOADER_RESET_REASON_BOOTLOAD
Value:
0x0202u

Application requested that bootloader runs.


Definition at line 66 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_BADIMAGE#

#define BOOTLOADER_RESET_REASON_BADIMAGE
Value:
0x0203u

Bootloader detected bad external upgrade image.


Definition at line 68 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_FATAL#

#define BOOTLOADER_RESET_REASON_FATAL
Value:
0x0204u

Fatal Error or assert in bootloader.


Definition at line 70 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_FORCE#

#define BOOTLOADER_RESET_REASON_FORCE
Value:
0x0205u

Forced bootloader activation.


Definition at line 72 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_OTAVALID#

#define BOOTLOADER_RESET_REASON_OTAVALID
Value:
0x0206u

OTA Bootloader mode activation.


Definition at line 74 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_DEEPSLEEP#

#define BOOTLOADER_RESET_REASON_DEEPSLEEP
Value:
0x0207u

Bootloader initiated deep sleep.


Definition at line 76 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_BADAPP#

#define BOOTLOADER_RESET_REASON_BADAPP
Value:
0x0208u

Application verification failed.


Definition at line 78 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_UPGRADE#

#define BOOTLOADER_RESET_REASON_UPGRADE
Value:
0x0209u

Bootloader requested that first stage upgrades main bootloader.


Definition at line 80 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_TIMEOUT#

#define BOOTLOADER_RESET_REASON_TIMEOUT
Value:
0x020Au

Bootloader timed out waiting for upgrade image.


Definition at line 82 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_FAULT#

#define BOOTLOADER_RESET_REASON_FAULT
Value:
0x020Bu

Soft-reset was forced to handle a fault.


Definition at line 84 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_REASON_TZ_FAULT#

#define BOOTLOADER_RESET_REASON_TZ_FAULT
Value:
0x020Cu

Soft-reset was forced to handle a security fault.


Definition at line 86 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_SIGNATURE_VALID#

#define BOOTLOADER_RESET_SIGNATURE_VALID
Value:
0xF00Fu

Reset signature is valid.


Definition at line 89 of file platform/bootloader/api/btl_reset_info.h

BOOTLOADER_RESET_SIGNATURE_INVALID#

#define BOOTLOADER_RESET_SIGNATURE_INVALID
Value:
0xC33Cu

Reset signature is invalid.


Definition at line 91 of file platform/bootloader/api/btl_reset_info.h