Hi,
I am trying to figure out how to set boot modes and the goal is to load the code and be able to debug as well as run in standalone. GPIO 34 and 37 are held high in my PCB design WITH TRSTn=0 default values without JTAG connected.
From a little digging I figured that GPIO 34 and 37 combined with TRSTn PIN is used to evaluate boot modes.
Scenario 1 : when JTAG probe is connected, TRSTn is 1 and driven high.
question 1 : Each document has different explanation for this . The user manual says that EMU_KEY needs to loaded with 0x55AA and EMUBMODE with appropriate values. But the reference manual says that when JTAG is connected then EMU_KEY AND EMU_BMODE are automatically populated. Please explain what is right here and also with JTAG connected does the CPU boot from flash ?
question 2 : for standalone boot, the GPIO pins are considered for setting the boot mode. In my case GPIO34 and GPIO 37 are =1 . When the boot ROM scans for GETMODE() then it checks for OTP_KEY.
I do not set the OTP key to any specific value and yet the system boots from flash.
How or where is this key set to a default invalid state that the CPU boots from flash?
Should I set EMU_KEY , EMUBMODE , OTP_KEY and OTP_BMODE in the C code ? or do these hold default values ?
Any help will be appreciated.
Thanks