2021-10-21 12:17 AM
I am having an issue with the firmware update on STM32F427 MCU by using the ST-Link utility tool and Keil debugging functionality. When I reload the new program on MCU, sporadically flash erase step marking few sectors are write-protected. I used the Option Bytes option to unselect all->Apply command, but the command threw an internal command error.
I tried with ST_Link command utility also, it does not help
ST-LINK_CLI.exe -ME
STM32 ST-LINK CLI v3.6.0.0
STM32 ST-LINK Command Line Interface
ST-LINK SN: 39FF6E064D42343842212543
ST-LINK Firmware version: V2J29S7
Connected via SWD.
SWD Frequency = 4000K.
Target voltage = 1.9 V
Connection mode: Normal
Reset mode: Hardware reset
Device ID: 0x419
Device flash Size: 2048 Kbytes
Device family: STM32F42xxx/F43xxx
Full chip erase...
Internal command error
Read out protection is activated
ST-LINK_CLI.exe -c HOTPLUG -OB RDP=1
2021-10-21 7:48 AM
You can try using STM32CubeProgrammer instead.
If option bytes are getting set to random values, perhaps delve into when/why that's happening in the first place and correct. It is not normal behavior.
2021-10-22 2:00 PM
Thanks for the response, indeed the cube programmer application is able to reset the write-protected flag. I observed this flag resetting issue when I use the Keil debugger, whereas if I use the command line flash erase and reprogramming the MMU does not create any issue. Have you come across any issues with the Keil debugger before?
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.