2020-12-13 10:15 AM
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 ?
Solved! Go to Solution.
2022-07-19 02:45 AM
I can confirm CubeProgrammer v2.11.0 has finally bug fixed this (writing to OTP lock area for device ID 0x413).
Regards,
Peter
2020-12-24 06:01 AM
Hi @YWilk.1 ,
Can you please tell me the MCU and CubeProgrammer version are you using ?
Houda
2020-12-24 06:27 AM
Hi @Houda GHABRI
I use the STM32F407ZG MCU.
The CubeProgrammer version is v2.5.0
Best
Yannic
2020-12-24 07:03 AM
Hi @YWilk.1,
For STM32F407ZG MCU the correct address of last lock block is 0x1FFF 7A0C not 0x1FFF 7AC as mentioned in your command Line.
Can you please test with this adress and tell me if it works ?
Houda.
2020-12-26 04:33 AM
Hi @Houda GHABRI
I think it was just a copy paste error while writing the question.
I repeated the test with the correct address 0x1FFF 7A0C and the result is the same as last time.
I have attached two screenshots.
The first one shows the write of 0x00000000 to lock block 0x1FFF 7A0C using the ST Link CLI programmer:
The second one shows the readout of the flash memory address 0x1FFF 7A0C after the failed write attempt:
Best
Yannic
2021-06-01 05:24 AM
Hi @YWilk.1 ,
I am having the same issue: I can write the OTP area, but I get that same error when it comes to write the LOCK bytes. Did you find a way to get it to work?
Best regards,
Guillaume
2021-06-01 06:48 AM
For the record, I found out that it works OK with STM32 ST-LINK Utility / ST-LINK_CLI.exe.
2021-06-02 08:39 AM
Hi @GBouc.1 ,@YWilk.1 ,
Thanks for bringing this issue to our attention.
The point is raised internally to CubeProgrammer development team and will be fixed as soon as possible.
Hope this can helps you.
Houda
2021-09-13 06:52 AM
STM32CubeProgrammer v2.8.0 (and patch 2.8.1) has still this problem. Where to look to know this problem is solved?
I can confirm STM32 ST-LINK CLI v3.6.0.0 works correct (as GBouc.1 noted) - on an STM32F407.
Regards, Peter
2022-03-03 01:57 AM
Any chance this will be solved in the near future?
Regards, Peter