Skip to main content
TCash.1
Associate III
January 15, 2022
Question

STM32H7 Cant Set PROT_AREA Option Bytes

  • January 15, 2022
  • 5 replies
  • 2313 views

Hello All,

I have a certain STM32H7 that I can't erase sector 0 using STM32CubeProgrammer.

I think it is because PROT_AREA_START1 and PROT_AREA_END1 are not correct. I am trying to get back to default values of

PROT_AREA_START1 =0xFF (0x0800ff00)

PROT_AREA_END1 = 0x00 (0x080000ff) to disable the protection.

However I cant Actually change the option bytes through the programmer. I get:

an error: "Expected Value for option byteP: "PROT_AREA_START!: 0xFF, fount 0x00"

RDP is level 0 (AA)

I am using ST-link. Thanks for any help,

Trevor

5 replies

Chloe Meunier
ST Employee
January 17, 2022

Hello Trevor,

could you please share your STLink configuration?

Did you try to disconnect/connect your board?

The Security bit is disabled?

nWRPx = 1?

BR

Chloé

TCash.1
TCash.1Author
Associate III
January 17, 2022

Hi Chloe,

The results are the same after reconnects/resets/power cycling 

All security bits are disabled.

nWRPx = 1

I attached a log, where I connect, and then try a full chip erase.

Thanks,

Trevor

yhak.1
Associate II
March 11, 2024

Hi,

I have the same problem, does someone have a solution?

Y.H

Associate III
January 23, 2025

Hi,

I am Facing Problem please suggest Some solution 

i attached Batch Script running for changing option bytes and stm32cubeprogrammer.

Prakash_Raj1994_0-1737628531831.pngPrakash_Raj1994_1-1737628585505.png

 

Regards,

Prakash

Associate III
February 28, 2025

still No response

Regards,

Raja

edward2
Associate
April 23, 2026

I had a similar problem. The only way I could recover the device was to program RDP back to BB using the command line tool (it wouldn't work in the GUI programmer):

STM32_Programmer_CLI.exe -c port=SWD mode=HOTPLUG -ob RDP=0xBB nWRP0=1 nWRP1=1 nWRP2=1 nWRP3=1 nWRP4=1 nWRP5=1 nWRP6=1 nWRP7=1 BOOT_CM7_ADD0=0x0800 BOOT_CM7_ADD1=0x1FF0 SECURITY=0 -e all -ob displ

... then I went back to the GUI programmer and set RDP back to AA, making sure that before I hit 'apply', I also checked the DMEP1 and DMEP2 in PCROP protection. (This was my problem, with RDP = AA, I was not able to reset the PCPROP end/start fields in the GUI. I needed to get RDP back to BB so that setting it back to AA would reset the PCPROP start/end fields.)

This was a bitch - I spent all morning trying to reset my Nucleo 753 board. Hope this helps someone!