cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to execute my own application without TrustZone on STM32U5 (B-U585I-IOT02A) after executing SBSFU application example

Domenico
Associate III

Hi,

I ran the SBSFU example of STM32CubeU5 following what is in the readme file without any problem. Then I disabled TrustZone but I cannot run the projects made with STM32CubeIDE, verification of the downloaded firmware fails. If I try to erase the flash memory (full chip erase) with STM32CubeProgrammer I get an error message. The error message indicates to check the flash memory protection but I have not set some flash memory protection.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Domenico
Associate III

Hi @Mohamed Aymen HZAMI​,

I solved the problem by running the regression.bat commands that disable memory protection and erase the memory completely.

Thanks

View solution in original post

5 REPLIES 5
Mohamed Aymen HZAMI
ST Employee

Hello @Domenico​ and welcome to the community,

Can you please share a snapshot with the error message?

Mohamed Aymen

Domenico
Associate III

Hi @Mohamed Aymen HZAMI​,

I solved the problem by running the regression.bat commands that disable memory protection and erase the memory completely.

Thanks

CMYL
ST Employee

Hi Domenico,

SBSFU requires TrustZone to be enabled in order to boot in a secure zone (root of trust).

The settings is described in Readme of SBSFU project, section 2. Initialize the device

  • Please ensure with STM32CubeProgammer the following Option bytes configuration for the device:
    • RDP = 0xAA (RDP Level 0)
    • DBANK = 1 (Dual bank mode enabled)
    • SWAP_BANK = 0 (Bank1 and Bank2 are not swapped)
    • nSWBOOT0 = 1 (BOOT0 taken from BOOT0 pin)
    • TZEN = 1 (TrustZone security enabled)
    • NSBOOTADD0 = 0x100000 (User flash address 0x08000000)
    • NSBOOTADD1 = 0x17F200 (System bootloader address 0x0BF90000)
    • SECBOOTADD0 = 0x180080 (boot entry point address 0xc004000)
    • SRAM2_RST = 0 (SRAM2 erased at each reset)

BR,

Younes

mr.1
Associate III

Hi @Domenico​ ,

I have flashed the SBSFU application with by mistake write protection enabled for flash address 0x08000000. I am unable to erase using jlink commander.exe as well as by IAR->project->Download->erase. Please suggest me how to erase the flash of STM32H743II.

mr.1
Associate III

0693W00000aJZ1VQAW.png@Domenico​ This is the error i am getting from the IAR IDE.