cancel
Showing results for 
Search instead for 
Did you mean: 

Can't enable PCROP on STM32H7

Moritz1
Associate III

I try to enable the PCROP Feature on a STM32H753

I am using the STM32CubeProgrammer and connect via ST-Link V2

After connecting, I go to the "OB" page and set the PROT_AREA_END1 value to 0xFFF and activate the DMEP1

Then I press the "Apply" button and this happens in the log:

Option byte command : -ob PROT_AREA_END1=0xFFF 
PROGRAMMING OPTION BYTES AREA ...
Bank          : 0x00
Address       : 0x5200201c
Size          : 308 Bytes
UPLOADING OPTION BYTES DATA ...
Bank          : 0x00
Address       : 0x5200201c
Size          : 308 Bytes
OPTION BYTE PROGRAMMING VERIFICATION:
Error: Expected value for Option Byte "PROT_AREA_END1": 0xFFF, found: 0x0
Error: Option Byte Programming failed

And then, I always get the error Message "Option Byte Programming failed"

The RDP has level 0, but the same error occures, if I try to set RDP to level 1 at the same time.

In the documentation I found no hint, that there is any other prerequisite must be met to set the PCROP.

Has anyone an idea what the problem could be?

(In generally the chip works, I can erase and flash it without any problems)

2 REPLIES 2
Jocelyn RICARD
ST Employee

Hello @Moritz1 ,

First a warning: PCROP should be used to protect only part of code that is specifically compiled to avoid any data access. It is not supposed to be used on the whole flash. It will not work and you may have difficulties to remove it.

You should first try enabling it on a small area.

If it still does not work please share result of -ob displ

Best regards

Jocelyn

Hi!

Thanks for the reply. I want to protect the entire application code. That's why I chose 0x0 as the start value and 0xFFF as the end value.

Could you explain why this doesn't work?

What are the areas I should not protect? Which area is causing the problems?