cancel
Showing results for 
Search instead for 
Did you mean: 

STMCubeProgrammer does not program STM32L55

Murat
Associate III

Hello,

I am working on NUCLEO-L552ZE board which has STM32L55 Cortex M33 MCU.

I can program the device using Keil IDE using ST-Link Debugger option.

But I would like to program the device using ST-Link Utility or STMCubeProgrammer.

ST-Link Utility cannot even connect to the board, I tried different options (Normal, Under reset etc) but failed to connect.

STLink Utility seems deprecated and maybe does not support, so I tried with STMCubeProgrammer.

If I program the device using Keil IDE, I can read the flash content using STMCubeProgrammer, but if I try to program using the STMCubeProgrammer, it says success but the device content is 0xFFs. It seems it erases but cannot program. But there is no error.

Is it something about TrustZone. There is some commands in STMCubeProgrammer like

"-tzenreg" that removes TrustZone protection by disabling TZEN from 1 to 0, but I would expect STMCubeProgrammer to handle it while it does not provide an interface to choose this option.

Any idea on that?

Thanks

Murat

2 REPLIES 2
Imen.D
ST Employee

Hello @Community member​ 

Is TrustZone enabled on your device ?

I advise you to follow this article in ST wiki on How to disable TrustZone in STM32L5xx devices during development phase.

Make sure to use the latest release and upgrade the ST-Link firmware version.

Hope this helps you!

I'll be waiting for your feedback, and when your question is answered, please close this topic by choosing Select as Best.

Imen

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

Hi Imen,

As I see from STMCubeProgrammer, TZEN is already disabled.

And as I read, TrustZone is disabled by default on STM32L55

Maybe I missed to tell this detail; I am not using TrustedFirmware in secure world, I have my own application in secure world (at least I am building code for secure memory range) which does not enable TrustZone. In this case, the CPU state must be already "non-secure".