Skip to main content
Domenico
Associate III
August 5, 2022
Solved

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

  • August 5, 2022
  • 4 replies
  • 1958 views

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

This topic has been closed for replies.
Best answer by Domenico

Hi @Mohamed Aymen HZAMI​,

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

Thanks

4 replies

Mohamed Aymen HZAMI
ST Employee
August 10, 2022

Hello @Domenico​ and welcome to the community,

Can you please share a snapshot with the error message?

Mohamed Aymen

Domenico
DomenicoAuthorBest answer
Associate III
August 10, 2022

Hi @Mohamed Aymen HZAMI​,

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

Thanks

Technical Moderator
August 10, 2022

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 II
March 23, 2023

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 II
March 23, 2023

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