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-03-03 02:37 AM
Hi @PZuid.1 ,
this issue is fixed in last CubeProgrammer version 2.9.0, can you please try?
To be sure that the correct address is used , according to RM0401 Table12.OTP area organization, the lock byte address(for NucleoF410RB) is 0x1FFF 7A00 so the Command line should be :
STM32_Programmer_CLI.exe -c port=SWD -w32 0x1FFF7A00 0xFFFFFF00
Hope this helps you.
Houda
Internal ticket number: 108076 (PS: This is an internal tracking number and is not accessible or usable by customers).
2022-03-04 03:57 AM
I tested it, but it still doesn't work.
STM32F407IG and ST-LINK V2. Verified by reading the lock bytes afterwards - nothing changed.
Kind regards,
Peter
2022-03-04 05:34 AM
Hello @PZuid.1 ,
Ok, I'll check again and come back with updates.
Houda
2022-03-06 10:25 AM
Hello @PZuid.1 ,
You are right ! the issue is fixed in 2.9.0 only for F4 0x458 device ID.
Issue still exist for 0x413 and will be fixed in future release.
Meanwhile I will send you the patch via private message.
Hope this helps you.
Houda
2022-03-07 04:13 AM
I can confirm the lock bytes can now be written in the OTP area of the STM32F407IG (0x413).
Bugfix/change in STM32_Prog_DB_0x413.xml:
<Parameters address="0x1FFF7800" name=" 512 Bytes Data OTP" size="0x210"/>
Regards,
Peter
2022-03-15 04:13 AM
This issue is still not fixed in STM32 CubeProgrammer v2.10.0 (tested the 64-bit version).
Quick fix is to change "Data_Base\STM32_Prog_DB_0x413.xml" manually. But for deployment within our company this is sub-optimal...
2022-03-15 09:12 AM
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
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