Skip to main content
Associate
April 8, 2025
Question

STM32_Programmer_CLI -w16 not working in high-cycle flash with trust zone activated

  • April 8, 2025
  • 1 reply
  • 771 views

If I try to write data to high-cycle flash from command line with the -w16 command when trust zone is activated it says that it succeeded but the data isn't written.

Using -w16 without trust zone works as expected.

Writing data with --download from command line works as expcted

-fillbytes works as expected from both command line and gui (though from command line I get an error saying "The data filling size must be 8, 16 or 32. 8 bit will be used by default." if I set dataWidth to 16)

 

Do I have to do something extra when using the -w16 command?

 

I'm using:

* STM32CubeProgrammer v2.19.0

* STLINK-V3SET FW V3J16M7B5S1

* STM32H56x

1 reply

Maryem
Technical Moderator
April 17, 2025

Hello @Mk4 and welcome to the Community,

 

Apologize for the delay.

Could you share the option bytes configuration and the command used? I'd like to make sure you are using the right address after activating the TrustZone and the eData because the area is now accessible with alias addresses.

You can refer to RM0481 section 7.3.10 "Flash high-cycle data." for further details.

Thank you in advance !

 

Maryem.

Mk4Author
Associate
April 17, 2025

Thank you for the reply.

For trust zone i set the following option bytes:

TZEN=0xB4
NSBOOTADD=0x80000
NSBOOT_LOCK=0xC3
SECBOOTADD=0x0c0184
SECBOOT_LOCK=0xC3
SECWM1_STRT=0x0
SECWM1_END=0xE
for edata I set the following:
EDATA1_EN=1
EDATA1_STRT=7
and I writing to address 0x9000000
also, if I use the download or fillbytes command it works
Maryem
Technical Moderator
April 17, 2025

Thank you for your feedback, I will further investigate from my side and get back to you shortly.

 

Maryem.