cancel
Showing results for 
Search instead for 
Did you mean: 

READ PROTECTION can't be removed

stst9184
Associate II
Posted on February 11, 2015 at 15:44

We've got a new board and we can't flash them. I am sending an output from STVP

> Programming  OPTION BYTE area...

Removing *READ PROTECTION* option, this will ERASE all the device flash memory!

< OPTION BYTE programming completed.

> Verifying OPTION BYTE area...

Error : The device is protected

Operation aborted

Error : < OPTION BYTE verifying failed.

What can I do?

#damaged-flash #stvp #option-bytes
13 REPLIES 13
Posted on February 11, 2015 at 18:05

What can I do?

Review what's actually happening with your hardware, and what the System Loader is doing. This sounds like a communications issue. Start by looking the the loaders protocol, and send commands back and forth through the console to understand what is going on.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jpeacock
Associate II
Posted on February 11, 2015 at 19:31

I've seen this a few times with F2 and F4 series on a stepper controller board.  I asked ST about it but they had no answer.  The read protection byte is set and won't clear, blocking JTAG access.  Using the serial port boot doesn't clear it either.  In one case it happened while checking some lines with a voltmeter while power on, so I suspect it has to do with some kind of transient damaging the option flash memory.  I had to scrap the boards, no solution.

  Jack
stst9184
Associate II
Posted on February 12, 2015 at 11:33

Ok l a little bit more details:

1)We have got  many boards, our own design. Already done several times last years.

2)Now few of them(2 pieces) have this problem.

3)I use a ST Visual Programmer(3.2.9) with ST Link (STM32F415xG) in JTAG mode/SWD mode

4) On the tab ''OPTION BYTE'' I click on the RDP and set ''No protection (Level 0)''

   and with a right click mouse click on ''Program current'', other sequences like programm all etc also have been tried. After that I get the error  message mentioned above.

5) PB2/BOOT1 is pulldown(47k), BOOT0 is pulldown (47k).

    TDI, TMS,TDO have pull up (10k). TCK pull down (10k), /RST has C=100n to GND.

What else shall I check?

stst9184
Associate II
Posted on February 12, 2015 at 11:53

What is ''System Loader''?

stst9184
Associate II
Posted on February 12, 2015 at 15:04

We've compared the SWD signals between a ''healthy'' and an ''unhealthy'' board. Same signal's quality. For what shall we look?

LaurentL
ST Employee
Posted on February 12, 2015 at 16:45

Hello,

Try with the latest STVP version (3.3.2).

Is the Reset pin of STM32F4 device connected to the ST-Link ?

You can also try with STLink Utility software.

Rgds,

Laurent

stst9184
Associate II
Posted on February 12, 2015 at 17:44

My collegue already tried STVP 3.3.1. The same.

I've installed STLink Utility with these results:

17:33:55 : ST-LINK SN : 57FF6D064966505517161667

17:33:55 : ST-LINK Firmware version : V2J23S4

17:33:55 : Connected via SWD.

17:33:55 : SWD Frequency = 1,8 MHz.

17:33:55 : Connection mode : Normal.

17:33:55 : Debug in Low Power mode enabled.

17:33:55 : Device ID:0x413

17:33:55 : Device family :STM32F40xx/F41xx

17:33:55 : Can not read memory!

Disable Read Out Protection and retry.

17:34:16 : Read out protection is activated

17:34:36 : SWV Reception started.

17:34:38 : SWV Reception stopped.

17:36:48 : Could not set Option bytes!

Please reset the target and retry.

In the GUI ''Device Information''

Device: STM32F40xx/F41xx

DeviceId: 0x413

Revision ID : Rev Z

Flash size:

Unknown

I have added a window with option bytes.

________________

Attachments :

OptionBytes.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0zS&d=%2Fa%2F0X0000000bh9%2FMHJSvaLwC4MoVHgtkPGP9i04GpjjHdO53TyNxwgbg9k&asPdf=false
LaurentL
ST Employee
Posted on February 12, 2015 at 18:02

On ST-LINK Utility, try to change the mode in target settings to ''Connect under reset'' (if STM32F4 Reset connected to ST-Link).

Laurent

stst9184
Associate II
Posted on February 12, 2015 at 18:14

Pin /RST goes from 20Pin connector to the STM Pin 7, checked.