6.4.2.1 Boot ROM Operation at Startup

The Boot ROM operation at startup can be logically divided into the following functional stages:

  1. Integrity Check of the Program Flash Memory (Optional)

    If the CRCBOOT bit in the User Configuration fuse (BOOTCFG.USERCFG in the Memories chapter) is set, the Boot ROM will perform a CRC-32 scan on the Program Flash Memory. If any integrity violation is detected, the Boot ROM halts further execution, reports the error in the DSU.BCC registers(1), and places the device into a known safe state called Interactive mode (IMODE)(2). Otherwise, the Boot ROM proceeds to the next stage. For more details, see the Hardware CRC of PFM on Boot and the Interactive Mode Commands - Command CRC sections.

  2. Debugger Probe Detection

    The Boot ROM is designed to asynchronously accept a cold-plug-in request from the debugger (i.e. SWD host) at any time during the device's operating life cycle. The Boot ROM automatically detects debugger attachment to the device as soon as the debugger follows the cold-plug-in sequence. Refer to the DSU - Device Service Unit chapter and the Programming Specifications section in this chapter for details on debugger operation.

  3. Application of User Settings and Finalization

    Applies user-selected fuse configurations to the respective peripherals. Refer to the BOOTCFG - Boot Configuration Fuses section of the Memories chapter for more details.

    At the end of the boot process, GCLK0 (and, consequently, MCLK) is set to the default clock. See the Clock System, GCLK and MCLK chapters for details on the default clock after startup.

  4. Transition to User Code

    If the boot operation is successful, the CPU loads the initial Program Counter (PC) and Stack Pointer (SP) values from Flash memory and begins executing the user code. Refer to the CPU and Architecture - Product Mapping and Memories chapters for details.

Note:
  1. If the Enable Boot External Notification Signal (ENABLE) bit in the Boot External Notification I/O Pin fuse (BOOT_GPIOSEL) in the MEMORIES - BOOTCFG section is set, a fault signal is asserted on the configured pin.
  2. When no debugger probe is detected after entering IMODE, the device will reset.