Showing results for 
Search instead for 
Did you mean: 

Unable to set STM32U5 RDP password via USB interface

Associate II


The STM32U5 has a password feature to restrict RDP regression from level 1 to level 0. However it seems that STM32CubeProgrammer CLI is unable to activate this via the USB interface of the built-in bootloader. If I do it via STLink then it works fine.

The command I send is:


.\STM32_Programmer_CLI.exe -c port=USB1 -lockRDP1 0x12345678 0xDEADBEEF


Which results in a "Error: Cannot lock RDP level 1." message.

When I do the same with SWD/JTAG interface with the CLI tool then it works fine.

Here is the verbose output. Note cube programmer v2.15.0 and device is current at RDP level 0.


Device name : STM32U575/STM32U585
sending an abort request
setting the address pointer to address: 0x0bfa07a0
receiving packet nbr: 0
sending an abort request
UpLoading data
Flash size  : 2 MBytes
Device type : MCU
Revision ID : --
Device CPU  : Cortex-M33
sending an abort request
setting the address pointer to address: 0x08000000
Error: Cannot lock RDP level 1.


 I can't see anything in the reference manual to indicate that this is not possible via the USB interface. Is there a workaround for this?


ST Employee

Hello @AHugh.2 ,

There is a known issue with the STM32U5 series where the Readout Protection (RDP) level 1 cannot be locked via the USB interface using the STM32CubeProgrammer CLI. This issue has been reported internally

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

Unfortunately, there doesn't seem to be a direct workaround for this issue at the moment. It has been reported to the development team and is expected to be addressed in a future release of the STM32CubeProgrammer. Until then, you may have to use the SWD/JTAG interface for locking RDP level 1.


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.
Jocelyn RICARD
ST Employee

Hello @AHugh.2 ,

yes this is a known issue I already raised internally.

Only workaround I could see would be to use SFI mechanism which may be not what you want.

Best regards