stm32U5 NonSecure_Init Hard Fault
- February 12, 2024
- 2 replies
- 3149 views
I have a board with an STM32U575CGTx on it and I am trying to execute a simple Trust Zone Enabled program. I have 2 sample projects attached 1.) Trust Zone Disabled, 2.) Trust Zone Enabled. The project with TZ Disabled runs perfectly, toggling a GPIO line. The Trust Zone Enabled project hard faults in NonSecure_Init (). It is trying to read location 0x08100000 while executing the
__TZ_set_MSP_NS((*(uint32_t *)VTOR_TABLE_NS_START_ADDR))
line and hard faults there.
I did this when the TZ=0 as show by the programmer tool.
I tried setting the TZ=1, but now the debugger fails to fully launch when it tried to load the non-secure side with the following message
Error in final launch sequence:
Failed to execute MI command:
load C:\\...\\STM32U5_TZ_Enabled\\NonSecure\\Debug\\STM32U5_TZ_Enabled_NonSecure.elf
I am still able to program the non-secure file with the programmer however. I did add the non-secure side as a 'startup' project in the secure project's debug configuration. That also fails to finish the loading with a similar message.
Any help pointing me to the proper settings to get Trust Zone enabled program to run is greatly appreciated.
Lastly, I've tried setting TZ=0 again, but I don't know how to go through a RDP regression. Any help there is also appreciated.
Thanks in advance.
