cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to update option bytes

tusharrabadiya3
Associate II
Posted on September 02, 2016 at 11:35

Hi All,

I am working on STM32F429II. Somehow by mistake readout protection is being on. RDP level has set to 1. i am trying to set it 0 by ST-Lint utilities (GUI & CLI both tried). but the message like ''Could not disable Read Out Protection!'' or ''Could not set Option bytes!'' are appeared.

Please Help me out of this.

#option-bytes
6 REPLIES 6
slimen
Senior
Posted on September 02, 2016 at 12:49

Hi rabadiya.tushar,

You need update the latest version of ST-Link utility, and use this to upgrade the STLink firmware (go to ST-LINK>firmware update) or through this Link

http://www.st.com/content/st_com/en/products/embedded-software/development-tool-software/stsw-link009.html

Regards

tusharrabadiya3
Associate II
Posted on September 02, 2016 at 13:54

The problem is still remaining, I have updated both with STM32 ST-Link utility and firmware of ST-Link. While I trying to set option bytes with Target->Option Bytes and select Read Out Protection to Level 0 and selecet ''Apply'' then error is appear like ''Could not set option bytes, Please restart the target and retry!'', screenshot is attached. After doing reset device, problem is same here.

Please help me.

________________

Attachments :

Capture.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I15Y&d=%2Fa%2F0X0000000bi7%2FK_VjZkct8Stgq3EyEcV11VBoB1029H3XmW73ZxAehvQ&asPdf=false
slimen
Senior
Posted on September 02, 2016 at 17:00

Hi,

Try the following and then let me know :

1- Set protection level to Level 0

2- Perform a power on reset

3- Use ST-Link Utility again to update option bytes

Regards

Posted on December 07, 2016 at 08:46

It did not help.

I think I started to have the problem after I updated the software and the hardware to the latest version at this date.

It's also interesting to note despite the error message, the operation completes successfully.

Posted on December 07, 2016 at 10:28

If you suspect something is wrong with the software you have running on the device (ie it is reprogramming the options, or reconfiguring GPIO pins), then pulling BOOT0 High will run the System Loader instead of the User Code, and things might function in a more stable fashion.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on December 08, 2016 at 13:22

Maybe I was not clear enough: 

With ST-Link Utility v4.0: I have the problem

With ST-Link Utility v3.9: I don't have the problem

(Same code running on device)

Here is the output when I set RDP level 1:

13:21:29 : ST-LINK SN : 55FF6A066685485512251767

13:21:29 : ST-LINK Firmware version : V2J27S6

13:21:29 : Connected via SWD.

13:21:29 : SWD Frequency = 4,0 MHz.

13:21:29 : Connection mode : Normal.

13:21:29 : Device ID:0x432

13:21:29 : Device flash Size : 256KBytes

13:21:29 : Device family :STM32F37xx

13:21:38 : Could not set Option bytes!  <<< ERROR REPORTED

Please reset the target and retry.

13:21:40 : Can not read memory! <<<< BUT IT WORKS!

Disable Read Out Protection and retry.