2.9.3 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 programming permanently 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 OTP Emulation Mode in the section OTP Memory Controller (OTPC).
To instruct the ROM code to configure the OTPC in Emulation mode at start-up, use the 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 gets the required boot-related packets (Boot Configuration Packet, Secure Boot Configuration Packet, Customer Key Packet, etc.) from the emulation SRAM and not from 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 get the required packets from the real OTP.
