cancel
Showing results for 
Search instead for 
Did you mean: 

Steps to disable the TrustZone® in STM32L5xx devices on STM32L562E-DK using STM32CubeProgrammer

FLapo.2
Associate

Hi,

I'm developing a zephyr application that I want to run on STM32L562E-DK. When my new development Kit arrived, I went through zephyr example samples to test it. I saw a sample that was using Arm TrustZone technology with TF-M, as it was new to me I tried it. So I follow this tutorial and set option bits and flash my board and everything worked right away.

Now I want to disable trust zone to run my project, on STM32L562E-DK. I followed the tutorial "How to disable TrustZone in STM32L5xx devices during development phase" to disable trust zone. But I don’t understand a message of STM32CubeProgrammer when I try to set Read protection option byte (RDP) from AA to DC and I press apply, I got the message :

" Are you sur ?

Your device may be lost FOREVER"

But in my option byte:

  • nSWBOOT0 is set

So the boot is base on BOOT0 pin level, and it is possible to boot from RSS and do the regression.

I guess this message is display to be sure that we flash the device with RSS that is working correctly before we set RDP to level 1 but I would like to be sure before to avoid to lose my device FOREVER …

Thanks in advance,

Fabian

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @FLapo.2​ and welcome to the Community =)

That is correct what you say; the message is displayed just to warn that if the user cannot modify the boot or if he does not have a correct code (S/NS) in the flash, it may lose the device.

If the boot is based on a pin (and not an option bit) then booting from RSS will be possible and there will be no problem.

Please mark my answer as best by clicking on the "Select as Best" button if it helped 😊

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

1 REPLY 1
Imen.D
ST Employee

Hello @FLapo.2​ and welcome to the Community =)

That is correct what you say; the message is displayed just to warn that if the user cannot modify the boot or if he does not have a correct code (S/NS) in the flash, it may lose the device.

If the boot is based on a pin (and not an option bit) then booting from RSS will be possible and there will be no problem.

Please mark my answer as best by clicking on the "Select as Best" button if it helped 😊

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen