cancel
Showing results for 
Search instead for 
Did you mean: 

How ''Disable Read Out Protection'' ?

musatoff
Associate II
Posted on October 03, 2012 at 18:13

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 :STM32F4xx

20: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.0

STM32 ST-LINK Command Line Interface

Connected via SWD.

Device ID:0x411 

Device family :STM32F4xx

Updating option bytes...

Could not update the option bytes!

Full chip erase...

Read out protection is activated

10 REPLIES 10
Posted on October 04, 2012 at 02:39

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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
musatoff
Associate II
Posted on October 04, 2012 at 10:35

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=false
frankmeyer9
Associate II
Posted on October 04, 2012 at 11:31

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.

musatoff
Associate II
Posted on October 04, 2012 at 11:46

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''

musatoff
Associate II
Posted on October 04, 2012 at 12:35

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.

caco3
Associate II
Posted on October 31, 2012 at 18:01

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.
caco3
Associate II
Posted on October 31, 2012 at 18:51

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.
fumer
Associate
Posted on February 16, 2015 at 16:07

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 prints

19: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 error

19: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. 

Posted on February 16, 2015 at 18:41

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..