Recovering MCU from read out protection level set to 0xFF
- March 15, 2024
- 3 replies
- 4003 views
Dear all
I’m not able to reset RDP to level 0
Custom board with STM32F732ZET6
Not sure, but something goes wrong and I think the information block was erased only – without programming afterwards
“The value of an option is automatically modified by first erasing the information block and then programming all the option bytes with the values contained in the FLASH_OPTCR register.”
RDP is now 0xFF and cannot be set to level 0 (no protection) again.
After reading a lot of forum entries here I also tried the re-program RDP by the command line interface
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>"C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" --connect port=swd mode=hotplug -r32 0x40023c14 1
0x40023C14 : C0FFFFFD
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>"C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" --connect port=swd mode=hotplug -w32 0x40023c08 0x08192A3B
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>"C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" --connect port=swd mode=hotplug -w32 0x40023c08 0x4C5D6E7F
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>"C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" --connect port=swd mode=hotplug -r32 0x40023c14 1
0x40023C14 : C0FFFFFC
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>"C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" --connect port=swd mode=hotplug -w8 0x40023C15 0xAA
Downloading 8-bit data failed...
If it's a Flash memory, it may be not erased or protected
Retried with a second hardware with RDP level 1. Works great and afterwards RDP was reset to level 0.
Similar problems are descripted here:
OH boy... I bricked my nucleo Error: Expected value for Option Byte "RDP": 0xAA, found: 0xFF
Many thanks in advance,
Franz
