cancel
Showing results for 
Search instead for 
Did you mean: 

The STM32L562E-DK cannot use STM32CubeProgrammer to download user code to flash

MelodyZ
Associate

We encountered an issue with the STM32L562E-DK board when attempting to clear TZEN by changing the RDP level from 0 to 1 and then back to 0. Using the STM32CubeProgrammer, we can connect to the device via ST-LINK. The memory blank check indicates flash is empty, but the first byte verification fails during download. Additionally, the PC register value is 0xFFFF_FFFE, and the SP register value is 0xFFFF_FFFC.

Could you please provide guidance on resolving this issue?

1 REPLY 1
Imen.D
ST Employee

Hello @MelodyZ 

Try performing a regression to RDP Level 0 (option byte value 0xAA) with a full flash erase using STM32CubeProgrammer. 

If the device does not recover, boot from RSS using BOOT0 and ensure correct option bytes. 

For more details, please refer to this AN5347 in section 9 TrustZone deactivation, this may help you.

This article describes the nature of when the lock state occurs and how to best avoid and alleviate the situation.

 

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