cancel
Showing results for 
Search instead for 
Did you mean: 

What is the way to fix STM32F411RE option bytes 0xFF Error ?

MKIM.3
Associate II

Hello,

I succeeded to download my firmware  on my board at first and it works fine. 

but,  I failed to fuse the firmware at the second and I encountered the problem about option byte 0xFF.

I don't know what happened.  below the error log.

=======================

13:54:16:823 : Disconnected from device.
13:54:17:972 : STLinkUSBDriver.dll loaded
13:54:17:973 : STLinkUSBDriver.dll loaded
13:54:17:973 : ST-LINK SN : 53FF6A068678574840600267
13:54:17:973 : ST-LINK FW : V2J35S7
13:54:17:976 : Voltage : 3.21V
13:54:17:981 : SWD freq : 4000 KHz
13:54:17:981 : Connect mode: Under Reset
13:54:17:981 : Reset mode : Hardware reset
13:54:18:089 : Device ID : 0x431
13:54:18:272 : Reading data...
13:54:18:273 : r ap 0 @0x40023C14 0x00000004 bytes
13:54:18:273 : Reading data...
13:54:18:273 : r ap 0 @0x40023C14 0x00000004 bytes
13:54:18:273 : Database: Config 1 is active.
13:54:18:278 : flash loader C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin/FlashLoader/0x431.stldr is loaded
13:54:18:278 : Reading data...
13:54:18:278 : r ap 0 @0x1FFF7A22 0x00000004 bytes
13:54:18:278 : failed to read the requested memory content
13:54:18:379 : UPLOADING OPTION BYTES DATA ...
13:54:18:379 : Bank : 0x00
13:54:18:379 : Address : 0x40023c14
13:54:18:379 : Size : 8 Bytes
13:54:18:380 : Reading data...
13:54:18:380 : r ap 0 @0x40023C14 0x00000008 bytes
13:54:18:380 : UPLOADING OPTION BYTES DATA ...
13:54:18:380 : Bank : 0x00
13:54:18:380 : Address : 0x40023c14
13:54:18:380 : Size : 8 Bytes
13:54:18:380 : Reading data...
13:54:18:380 : r ap 0 @0x40023C14 0x00000008 bytes
13:54:18:432 : UPLOADING ...
13:54:18:432 : Size : 1024 Bytes
13:54:18:432 : Address : 0x8000000
13:54:18:432 : Read progress:
13:54:18:432 : Reading data...
13:54:18:432 : r ap 0 @0x08000000 0x00000400 bytes
13:54:18:432 : Error: Data read failed
=======================

 

Also, if I try to change the RDP in the option byte then below the error message happens. 

========================

13:55:18:831 : Option byte command : -ob RDP=170
13:55:18:834 : PROGRAMMING OPTION BYTES AREA ...
13:55:18:834 : Reading data...
13:55:18:836 : r ap 0 @0x40023C14 0x00000004 bytes
13:55:18:836 : Reading data...
13:55:18:836 : r ap 0 @0x40023C14 0x00000004 bytes
13:55:18:836 : Database: Config 1 is active.
13:55:18:937 : Bank : 0x00
13:55:18:937 : Address : 0x40023c14
13:55:18:937 : Size : 8 Bytes
13:55:18:938 : OB buffer: edaaff8f00000000
13:55:18:938 : Buffer program...
13:55:19:046 : halt ap 0
13:55:19:046 : w ap 0 reg 15 PC (0x20000000)
13:55:19:048 : w ap 0 reg 17 MSP (0x20000500)
13:55:19:048 : w ap 0 reg 16 xPSR (0x01000000)
13:55:19:051 : w ap 0 @0x20000C00 0x00000200 bytes
13:55:19:053 : w ap 0 @0x20000000 0x00000004 bytes
13:55:19:066 : w ap 0 @0x20000004 0x000007DC bytes
13:55:19:068 : w ap 0 @0x20000C00 0x00000008 bytes
13:55:19:068 : Loader write option bytes...
13:55:19:068 : Init flashloader...
13:55:19:069 : halt ap 0
13:55:19:074 : w ap 0 reg 0 R0 0x00000001
13:55:19:074 : w ap 0 reg 1 R1 0x00000000
13:55:19:074 : w ap 0 reg 2 R2 0x00000000
13:55:19:074 : w ap 0 reg 3 R3 0x00000000
13:55:19:074 : w ap 0 reg 4 R4 0x00000000
13:55:19:074 : w ap 0 reg 5 R5 0x00000000
13:55:19:074 : w ap 0 reg 6 R6 0x00000000
13:55:19:075 : w ap 0 reg 7 R7 0x00000000
13:55:19:075 : w ap 0 reg 8 R8 0x00000000
13:55:19:075 : w ap 0 reg 9 R9 0x00000000
13:55:19:075 : w ap 0 reg 10 R10 0x00000000
13:55:19:075 : w ap 0 reg 11 R11 0x00000000
13:55:19:075 : w ap 0 reg 12 R12 0x00000000
13:55:19:081 : w ap 0 reg 13 SP 0x00000000
13:55:19:088 : w ap 0 reg 14 LR 0x20000001
13:55:19:088 : w ap 0 reg 15 PC 0x20000005
13:55:19:089 : w ap 0 reg 16 xPSR 0x01000000
13:55:19:100 : w ap 0 reg 17 MSP 0x20000BDC
13:55:19:100 : w ap 0 reg 18 PSP 0x00000000
13:55:19:100 : run ap 0
13:55:19:100 : halt ap 0
13:55:19:100 : r ap 0 reg 0 R0 0x00000001
13:55:19:100 : w ap 0 reg 0 R0 0x40023C14
13:55:19:100 : w ap 0 reg 1 R1 0x00000008
13:55:19:100 : w ap 0 reg 2 R2 0x20000C00
13:55:19:100 : w ap 0 reg 3 R3 0x00000002
13:55:19:100 : w ap 0 reg 4 R4 0x00000000
13:55:19:100 : w ap 0 reg 5 R5 0x00000000
13:55:19:100 : w ap 0 reg 6 R6 0x00000000
13:55:19:100 : w ap 0 reg 7 R7 0x00000000
13:55:19:102 : w ap 0 reg 8 R8 0x00000000
13:55:19:102 : w ap 0 reg 9 R9 0x00000000
13:55:19:104 : w ap 0 reg 10 R10 0x00000000
13:55:19:104 : w ap 0 reg 11 R11 0x00000000
13:55:19:104 : w ap 0 reg 12 R12 0x00000000
13:55:19:104 : w ap 0 reg 13 SP 0x00000000
13:55:19:104 : w ap 0 reg 14 LR 0x20000001
13:55:19:104 : w ap 0 reg 15 PC 0x200000AB
13:55:19:105 : w ap 0 reg 16 xPSR 0x01000000
13:55:19:105 : w ap 0 reg 17 MSP 0x20000BDC
13:55:19:105 : w ap 0 reg 18 PSP 0x00000000
13:55:19:105 : run ap 0
13:55:20:853 : UPLOADING OPTION BYTES DATA ...
13:55:20:853 : Bank : 0x00
13:55:20:853 : Address : 0x40023c14
13:55:20:853 : Size : 8 Bytes
13:55:20:853 : Reading data...
13:55:20:860 : r ap 0 @0x40023C14 0x00000008 bytes
13:55:20:863 : OPTION BYTE PROGRAMMING VERIFICATION:
13:55:20:863 : Error: Expected value for Option Byte "RDP": 0xAA, found: 0xFF
13:55:20:901 : Error: Option Byte Programming failed
13:55:20:941 : Reading data...
13:55:20:945 : r ap 0 @0x40023C14 0x00000004 bytes
13:55:20:945 : Reading data...
13:55:20:945 : r ap 0 @0x40023C14 0x00000004 bytes
13:55:20:945 : Database: Config 1 is active.
13:55:21:098 : UPLOADING OPTION BYTES DATA ...
13:55:21:098 : Bank : 0x00
13:55:21:098 : Address : 0x40023c14
13:55:21:098 : Size : 8 Bytes
13:55:21:098 : Reading data...
13:55:21:099 : r ap 0 @0x40023C14 0x00000008 byte
========================
 
Please review above the logs and advice me the action to fix this problem.
 
Thanks in advance
 

 

 

 

 

 

 

 

 

5 REPLIES 5
STOne-32
ST Employee

Dear @MKIM.3 ,

Is this behavior seen on one particular device or it is random or on all many devices?  if possible, to have the Top marking picture of that device where always Options Bytes are set at 0xFF.  A possible hypothesis the device is damaged or power sequence not able set the Options bytes reloading safely.

Let us know

STOne-32.

MKIM.3
Associate II

Hi,

The failed board is one of three boards in my side. The picture of used chip is attached.

I'd like to know whether RDP 0xff  equals to 0xCC. (RDP Level 2 )

I read the information of option byte using "STM32_Programmer_CLI.exe" 

It tells me "Level 1" as the below log. Is correct that ? 

================================

STM32_Programmer_CLI.exe -c port=SWD -ob displ
-------------------------------------------------------------------
STM32CubeProgrammer v1.3.0
-------------------------------------------------------------------

ST-LINK SN : 53FF6A068678574840600267
ST-LINK FW : V2J45S7
Voltage : 3.51V
SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x431
Device name : STM32F411xC/E
Device type : MCU
Device CPU : Cortex-M4


UPLOADING OPTION BYTES DATA ...

Bank : 0x00
Address : 0x40023c14
Size : 8 Bytes

栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢栢 100%


OPTION BYTES BANK: 0

Read Out Protection:

RDP : 0xFF (Level 1, read protection of memories)

PCROP Protection:

SPRMOD : 0x1 (PCROP enabled. nWPRi bits used for PCROP protection on sector i)

BOR Level:

BOR_LEV : 0x3 (BOR OFF reset threshold level from 1.80 to 2.10 V)

User Configuration:

WDG_SW : 0x1 (Software watchdog)
nRST_STOP : 0x1 (No reset generated)
nRST_STDBY : 0x1 (No reset generated)

Write Protection:

WRP0 : 0x1 (PCROP protection active on sector i)
WRP1 : 0x1 (PCROP protection active on sector i)
WRP2 : 0x1 (PCROP protection active on sector i)
WRP3 : 0x1 (PCROP protection active on sector i)
WRP4 : 0x1 (PCROP protection active on sector i)
WRP5 : 0x1 (PCROP protection active on sector i)
WRP6 : 0x1 (PCROP protection active on sector i)
WRP7 : 0x1 (PCROP protection active on sector i)

================================

Regards

TDK
Super User

RDP of 0xFF is not RDP level 2. If it were in RDP level 2, the chip would not connect at all.

Probably the option bytes are corrupted due to a power loss or other issue when programming them.

I suspect a reset of the option bytes to factory values would fix it but STM32CubeProgrammer doesn't have a good way to do this from the GUI. Perhaps writing them via the CLI would work.

If you feel a post has answered your question, please click "Accept as Solution".
STOne-32
ST Employee

Dear @MKIM.3 ,

My recommendation is to contact your distributor or nearest ST office and ask for a local FAE or Quality department to do a failure analysis. I suspect indeed a Failure at power on sequence causing a physical damage to the embedded Flash matrix and so not able to be restored to the expected values , this may happen when a huge damage very far from the Absolute maximum rating of the device accidentally during rework etc.

Regards,

STOne-32

Hi,

Thanks for rapidly responses. 

Is there any methods using STM32_Programmer_CLI.exe to fix this problem ?

I checked the OPTLOCK Bit in the Flash option control register. below is the log.

============================

STM32_Programmer_CLI.exe --connect port=swd mode=hotplug -r32 0x40023c14 1
-------------------------------------------------------------------
STM32CubeProgrammer v2.20.0
-------------------------------------------------------------------

ST-LINK SN : 53FF6A068678574840600267
ST-LINK FW : V2J46S7
Board : --
Voltage : 3.41V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x431
Revision ID : Rev A
Device name : STM32F411xC/E
Flash size : 512 KBytes (default)
Device type : MCU
Device CPU : Cortex-M4
BL Version : 0x0


Reading 32-bit memory content
Size : 4 Bytes
Address: : 0x40023C14

0x40023C14 : 8FFFFFED

============================

The last one byte ED  represents OPTLOCK enabled so I think first of all, this bit should be disabled. 

If possible, let me know how to do this.

Regards.