cancel
Showing results for 
Search instead for 
Did you mean: 

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

Mk4
Associate

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

6 REPLIES 6
Maryem
ST Employee

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.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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

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

 

Maryem.

 


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hello @Mk4 ,

 

After investigating, it appears that the -w16 command is not currently supported for flash high-cycle data. As a workaround, you can use the -w or --download command instead. 

A ticket has been submitted to the relevant team to address this issue. I will keep you updated on any progress.

Internal ticket number: 208220 (This is an internal tracking number and is not accessible or usable by customers)

Thank you for your understanding and patience.

 

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Maryem 

Unfortunately, using --download hits you with another bug: STM32CubeProgrammer -d erases too many sectors whe... - STMicroelectronics Community So if you are using several sectors of high-cycle count flash it is essential that you issue the download commands in strict sector order.

Best regards, Jesper

 

Hello @JesperEC ,

 

After reviewing, I found that this issue has already been reported. We will keep you informed of any updates.

 

Thank you.

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.