Write OTP lock bytes using ST-LINK/V2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Labels:
-
STM32CubeProgrammer
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-19 2: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-24 6:01 AM
Hi @YWilk.1​ ,
Can you please tell me the MCU and CubeProgrammer version are you using ?
Houda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-24 6:27 AM
Hi @Houda GHABRI​
I use the STM32F407ZG MCU.
The CubeProgrammer version is v2.5.0
Best
Yannic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-24 7: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-26 4: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 5: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-01 6:48 AM
For the record, I found out that it works OK with STM32 ST-LINK Utility / ST-LINK_CLI.exe.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-02 8: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-13 6: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-03 1:57 AM
Any chance this will be solved in the near future?
Regards, Peter
