53.1.2 Bootloader Entry Mechanisms

Default Entry Mechanism:
  • The Bootloader will run automatically if there is no valid application firmware. The firmware is considered valid if the first word at the application start address is not 0xFFFFFFFF.
  • Normally this word contains the initial stack pointer value, so it will never be 0xFFFFFFFF unless the device is erased

Trigger Entry Mechanism:

  • External trigger:
    • The Boot pin must be used to trigger the Bootloader after reset, refer to the table below.
    • Drive the respective Boot pin to a low state, then reset the device. Upon reset, the Bootloader runs and checks the status of the Boot pin. If the status of the pin is low, the Bootloader enters the firmware upgrade mode.
  • Bootloader Trigger Pattern in SRAM:
    • The application can trigger the Bootloader by writing a Bootloader trigger pattern with a length of four words (1 word = 4 bytes) to the SRAM location 0x20001000, then resetting the device. The Bootloader will not be using the initial 4 KB of SRAM as it will be cleared by the BOOTROM at reset. Therefore, the bootloader trigger pattern has to be stored at 0x20001000 of the SRAM.
    • Upon reset, the Bootloader runs and checks the first four words of the SRAM location 0x20001000 for the presence of the Bootloader trigger pattern. If found, the Bootloader enters the firmware upgrade mode.
    • To invoke the Bootloader, the trigger pattern is 0x5048434D.
Trigger modeTrigger method
Boot pinPB08 = Active-low

(Internal pull-up is enabled. No hardware or software debouncing is implemented.)

SRAM trigger pattern (0x20001000)SRAM Word[0] = 0x5048434D

SRAM Word[1] = 0x5048434D

SRAM Word[2] = 0x5048434D

SRAM Word[3] = 0x5048434D