2024-10-08 02:01 AM
I am working on STM32U575 to write and read from Secure flash. I referred STM32Cube_FW_U5_V1.4.0\Projects\NUCLEO-U575ZI-Q\Examples\FLASH\FLASH_EraseProgram_TrustZone\
but I was facing following issue
Can you please help me resolving it. Do we have an document/link explaining read/write access to secure flash and memory map for the same.
Regards,
Shafi
Solved! Go to Solution.
2024-10-10 02:57 AM
Hello @Shaffi ,
are you sure you are setting the correct option byte configuration mentinned in the Readme of the project ?
then the view of SECWM programming should be visible
then using IAR set the project secure as active and rebuild it
then rebuild the NS project (this is not done from your side that is why you get this error)
you should be good to go afterwords.
Regards
2024-10-08 10:43 AM
I am able to port the project using stm32cubeIde and able to compile and run on NUCLEO-U575 dev kit. But the example code isn't working as it is not able to read data against the data written into it.
project:STM32Cube_FW_U5_V1.4.0\Projects\NUCLEO-U575ZI-Q\Examples\FLASH\FLASH_EraseProgram_TrustZone\FLASH_EraseProgram_TrustZone_Secure
Data written 0x0102030405060708, 0x1112131415161718
Date Read 0xd1062800fdb9f7ff, 0xf451680106c4f8df.
Any help is highly appreciated.
Regards,
Shafi
2024-10-09 04:42 AM
Hello ST,
The example code doesn't work in NUCLEO U575 board. Can you please help me in resolving this issue.
Regards,
Shafi
2024-10-10 02:57 AM
Hello @Shaffi ,
are you sure you are setting the correct option byte configuration mentinned in the Readme of the project ?
then the view of SECWM programming should be visible
then using IAR set the project secure as active and rebuild it
then rebuild the NS project (this is not done from your side that is why you get this error)
you should be good to go afterwords.
Regards
2024-10-11 04:23 AM
Hello STea,
First of all Thank you for your response, it worked for me after enabling TZEN bit. I am able to Read and write from Secure flash.
But I had an another issue when I wanted to disable Trustzone bit So first I changed the RDP from AA to DC in STM32Programmer software and clicked on Apply then I powercycled the board and pressed connect It showed DEV_TARGET_NOT_HALTED. The settings were mode set to Normal and Reset mode set to Software reset.
Can you please help to progam my board again.
Regards,
Shafi
2024-10-14 02:31 AM
Hello STea,
I am now able to program my device, I resolved it by programming the device using UART mode on STM32programmer by setting BOOT0 pin. I had another question Is there a way to Enable TZEN in the code without using STM32programmer.
Regards,
Shafi
2024-10-15 02:06 AM
Hello @Shaffi ,
there is no way to set Trustzone in your code as it is static isolation and needs to be activated using the option bytes setting.
Regards
2024-10-15 11:06 AM
Hello @STea ,
Even if I've never actually done it, I'm quite sure TrustZone option byte can be set from the code itself.
Then, after restart, the secure areas will also need to be setup.
Best regards
Jocelyn