2012-10-03 09:13 AM
I have demoboard with STM32F417 and ST-Link v2. After some software fault, read out protection was activated. STlink utility print
20:07:57 : Connected via SWD.
20:07:57 : Device ID:0x411 20:07:57 : Device family :STM32F4xx20:07:57 : Cannot read memory! Disable Read Out Protection and retry.What I mast to do to disable read out protection. I can't to do full erase of chip with the same error:ST-LINK_CLI.exe -c SWD UR -OB RDP=0 WRP=0xFFFFFFFF -ME
STM32 ST-LINK CLI v1.3.0STM32 ST-LINK Command Line InterfaceConnected via SWD.Device ID:0x411 Device family :STM32F4xxUpdating option bytes...Could not update the option bytes!Full chip erase...Read out protection is activated2012-10-03 05:39 PM
Classically I'd be using the ST-LINK GUI to remove the RDP settings.
Alternatively there is the System Loader, accessed via the serial port. Finally the Segger J-Link should be able to change things using JLinkSTM32.exe If you got it set to RDP Level 2, then that's irreversible.2012-10-04 01:35 AM
ST-Link utility not shows me current state and not permits me to do any changes
________________ Attachments : ST.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzxP&d=%2Fa%2F0X0000000bS1%2Fezii0wTtmWCfQR8wwOF2PkIXs9DXVHG5vgznB75rRC4&asPdf=false2012-10-04 02:31 AM
I had a similiar problem, which was caused by an older version of the ST-Link utility, and of the STLink firmware. Updating both solved it.
First you need the latest version of ST-Link utility, and use this to update the STLink firmware. It is at least worth a try.2012-10-04 02:46 AM
I use current downloadable version of ST-Link Utility 2.3.0 from 2012-06-01. And firmware in ST-Link is upgraded to ''V2.J15.S4 JTAG+SWIM Debugger''
2012-10-04 03:35 AM
Problem is solved by strange method. I worked by this ST-link with anothe board with STM32F207 processor and it clear ST-Link. After it permit me to clear protection.
2012-10-31 10:01 AM
Is there any other hint available?
I have a STLink/V2 programmer with the latest firmware. Also STM32 ST-Link Utility is in the latest version. It works fine on the STM3220G-EVAL with a STM32F207, but fails with the memory protection issue on my self build hardware with a STM32F407. Since it can read out the Device ID as well as the Flash Size and Family, I am sure the SWD connection is fine.2012-10-31 10:51 AM
All right, I got it solved.
I had a wrong wiring. I connected the device VDD to the STM32 Plug pin 19 instead pin 1. Now it works fine. I think its very strange that it can read aout the ID but not the memory when it is wired wrong. But most likely it has different power supplies internally in the CPU.2015-02-16 07:07 AM
Hey Clivel,
I am facing a similar but a bit complex issue. As I remember I accidentally unplug the connector while flashing STM32F4 board. Now I am unable to program it because of read protection. St-link utility prints19:46:42 : [blinky.bin] opened successfully.
19:46:52 : Read out protection is activated.
19:46:59 : Could not disable Read Out Protection!19:47:02 : Memory-Loader error19:47:02 : Error occured during erase operation!19:47:02 : Programming error @ 0x2000098C!19:47:05 : Can not read memory! Disable Read Out Protection and retry.Any suggestion will be greatly appreciated.2015-02-16 09:41 AM
I think I defined the available options earlier?
You might want to consider hooking up serial connectivity to USART1 or USART3 (depending on the specific STM32F4 board being used), entering the System Loader (BOOT0 = High at Reset). And sending commands to the loader to either Mass Erase the part, or to change the RDP/ROP level.