2024-11-06 01:35 AM
Hi all!
I’m starting with secure zone projects using the STM32U575RIT6 microcontroller. First, I want a project with the secure zone active, and that jumps to the non-secure zone to print a message. However, when jumping to the secure zone (NonSecure_ResetHandler();) , it enters to error function (void HardFault_Handler(void)) .
I have created a empty project, with this IOC:
In secure zone, main.c:
#define VTOR_TABLE_NS_START_ADDR 0x08100000UL
And in NonSecure flash:
MEMORY
{
RAM (xrw) : ORIGIN = 0x20040000, LENGTH = 512K /* Memory is divided. Actual start is 0x20000000 and actual length is 768K */
SRAM4 (xrw) : ORIGIN = 0x28000000, LENGTH = 16K
FLASH (rx) : ORIGIN = 0x08100000, LENGTH = 1024K /* Memory is divided. Actual start is 0x08000000 and actual length is 2048K */
}
Does anyone have an idea of what might be happening?
Think you in advance! :)
Solved! Go to Solution.
2024-11-07 02:24 AM
Hello @proyo ,
I would suggest using following example:
STM32Cube_FW_U5_V1.6.0\Projects\NUCLEO-U575ZI-Q\Examples\GPIO\GPIO_IOToggle_TrustZone\
The readme file give you indications how you should proceed.
This example also provides an IOC file so you can compare with what you have done with your project
Best regards
Jocelyn
2024-11-07 02:24 AM
Hello @proyo ,
I would suggest using following example:
STM32Cube_FW_U5_V1.6.0\Projects\NUCLEO-U575ZI-Q\Examples\GPIO\GPIO_IOToggle_TrustZone\
The readme file give you indications how you should proceed.
This example also provides an IOC file so you can compare with what you have done with your project
Best regards
Jocelyn
2024-11-07 05:16 AM
Thanks for responding so quickly.
I had that project active, but I wanted to make the necessary modifications to use secure zones from the .ioc file, following these instructions:
In case anyone else has the same problem, I finally resolved it by configuring the FLASH and SAU settings in the .ioc file.
Thank you!