SPRUJ17H March 2022 – October 2024 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).
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 cleanly i.e. without any glitches on these pads. HSM ROM assumes R5 core is out of reset and halted. HSM clears R5SS0_COREA_HALT register to un-halt R5. IPC between R5 and HSM is established using messages through dedicated Mailbox RAM , Write/Read and ACK are interrupt based.
In 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 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.
HSM and R5F_0 will collectively download the SBL image to internal L2 RAM from the external QSPI/OSPI flash (incase of QSPI/OSPI boot mode) or the external PC (incase of UART 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.
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 is used later to initialize and startup the PLLs and boot peripherals.