2.9.4 Booting with OTP Emulation Mode
The OTP Emulation mode can be used to test boot configuration options, including the Secure Boot mode (see Secure Boot Strategy), without permanently programming the real OTP memory.
Out of the factory, no Boot Configuration Packet is written in the OTP memory. During the prototyping phase, the Boot Configuration packet and the Secure Boot Configuration packet can be written in a backed-up SRAM instead of the real OTP memory. This is done via the OTP Emulation mode of the OTPC. For more information, refer to the section on OTP Emulation Mode in OTP Memory Controller (OTPC).
To instruct the ROM code to configure the OTPC in Emulation mode at start-up, use the Boot Sequence Controller Configuration (BSC_CR) register: when BSC_CR.EMUL_EN is set, the ROM code sets OTPC_MR.EMUL and then launches a refresh of the User Area. In such a configuration, the ROM code retrieves the required boot-related packets (Boot Configuration Packet, Secure Boot Configuration Packet, Customer Key Packet, etc.) from the emulation SRAM instead of the real OTP. To return to a standard operating mode, clear BSC_CR.EMUL_EN. Then, the ROM code will no longer enable OTPC Emulation mode at start-up and will retrieve the required packets from the real OTP.