SPRUJ17I March 2022 – August 2025 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
ROM bootloader (or ROM Code) is a multi-core software that resides in a on-chip read-only memory (ROM) to assist the customer in transferring and executing their SBL and application code. The device has two ROM codes operating in tandem – the Public ROM code (run on R5F core), and the HSM ROM code (run on M4 core).
The figure below gives a pictorial representation of the various stages of the Boot flow. The HSM ROM starts after the power-on sequence where PORz/RSTz is provided without any glitches on the pads. HSM ROM assumes the R5 core is out of reset and halted. The HSM then clears the R5SS0_COREA_HALT register to un-halt the R5 core. Interprocessor communication between the R5 core and HSM is established using messages through dedicated Mailbox RAM. Write/Read and ACK signals are interrupt based.
Figure 5-2 Boot FlowIn order to accommodate various system scenarios, the ROM Code supports several boot modes. These boot modes can be broadly classified as:
During a host boot, the device is configured to receive code from a host via the UART interface. ROM Code receives the application code on the UART interface and stores it in the internal L2 memory.
During a memory boot, the device transfers code from non-volatile memory to internal memory for execution.
The HSM and R5F_0 core will collectively download the SBL image to the internal L2 RAM from the external QSPI/OSPI flash (in case of QSPI/OSPI boot mode), the external PC (in the case of UART boot mode), or the USB host in the case of USB DFU boot mode.
In all boot modes, the entire boot operation can be partitioned into two sections:
During initialization, the ROM Code configures the device resources (PLLs, peripherals, pins) as needed to support the boot process. The resources used depend on the boot mode requirements.
During the boot process the boot image can be loaded into device memory and executed. HSM will perform code verification and allow, or forbid, the image execution.
The main configuration source for boot after power-up are the BOOTMODE pins sampled automatically after reset release and stored in device status registers. At ROM Code startup, these pin values are read from the registers to create the boot peripheral list and the boot configuration tables which are used later to initialize and startup the PLLs and boot peripherals.