Skip to main content
YWilk.1
Associate
December 13, 2020
Solved

Write OTP lock bytes using ST-LINK/V2

  • December 13, 2020
  • 11 replies
  • 5580 views

Hi,

i try to write the OTP area lock bytes using the ST-LINK/V2 programmer with the ST STM_Programmer_CLI tool included in the STM32CubeProgrammer software package.

I can successfully write to the OTP area blocks using the -w32 command but if i try to also write the according Lock byte it will fail with the following error message:

Command: STM32_Programmer_CLI.exe -c port=SWD -w32 0x1FFF7AC 0xFFFFFF00

Error: Failed to download data!If it's a Flash memory, it may be not erased or protected

Any idea why the write fails for the Lock bytes while OTP blocks are successfully written ?

This topic has been closed for replies.
Best answer by PZuid.1

I can confirm CubeProgrammer v2.11.0 has finally bug fixed this (writing to OTP lock area for device ID 0x413).

Regards,

Peter

11 replies

Houda GHABRI
ST Employee
March 15, 2022

Hi @PZuid.1​ ,

Yes the fix was not scheduled for CubeProgrammer v2.10.0 because the reporting date for this issue (device ID 0x413) is close to the final release date.

We expect to deliver the fix in next Cubeprogrammer release  if everything goes according to the plan.

Houda

PZuid.1
PZuid.1Best answer
Visitor II
July 19, 2022

I can confirm CubeProgrammer v2.11.0 has finally bug fixed this (writing to OTP lock area for device ID 0x413).

Regards,

Peter