cancel
Showing results for 
Search instead for 
Did you mean: 

Recovering MCU from read out protection level set to 0xFF

Aathee
Associate

We're using STM32F779BIT MCU in our custom board.

After a power cycle, MCU memory was not able to be read/erase/flash.

After checking the option bytes in STMCubeProgrammer, Read out protection is set to 0xFF.

Ideally, it should be 0xAA (L1), 0xBB(L2), 0xCC(L3). But in our case, it is set to 0xFF. ST-Linkv2 was not able to revert the RDP to level 0. In the log messages, it is expecting 0xAA, but only 0xFF is found. 0xFF is not an ideal value in the read out protection bits.

Here's the log messages:

14:46:57 : Option byte command : -ob RDP=170

14:46:57 : PROGRAMMING OPTION BYTES AREA ...

14:46:57 : Bank : 0x00

14:46:57 : Address : 0x40023c14

14:46:57 : Size : 8 Bytes

14:47:13 : UPLOADING OPTION BYTES DATA ...

14:47:13 : Bank : 0x00

14:47:13 : Address : 0x40023c14

14:47:13 : Size : 8 Bytes

14:47:13 : OPTION BYTE PROGRAMMING VERIFICATION:

14:47:13 : Error: Expected value for Option Byte "RDP": 0xAA, found: 0xFF

14:47:13 : Error: Option Byte Programming failed

We tried the J-Link STM32 Unlock utility using J-Link EDU but with no success.

Here the log messages:

Please select the correct device family: 8

Connecting to J-Link via USB...O.K.

Using SWD as target interface.

Target interface speed: 1000 kHz.

VTarget = 3.283V

Reset target...O.K.

Reset option bytes (may take app. 20 seconds)...Resetting option bytes failed.

Press any key to exit.

Also tried latest ST-Link Utility but issue is still the same.

Is the RDP bits got corrupted in the MCU?

Is there any other ways that can recover RDP?

What could be the reason that can alter the RDP bytes? We're not doing anything in the firmware to unlock/lock the memory.

1 REPLY 1
Piranha
Chief II

> 0xAA (L1), 0xBB(L2), 0xCC(L3)

This ir some ********. Read the RM0410 section 3.5.1, update debugger's firmware and do the mass erase operation.