cancel
Showing results for 
Search instead for 
Did you mean: 

PCROP activation with STM32G0B1

AlexMs
Associate

 

Hello,

My device contains both a bootloader and an application. I’m currently trying to protect the bootloader using PCROP on the STM32G0B1.

As a first approach, I attempted to configure PCROP using STM32CubeProgrammer. However, this failed — once PCROP was activated for the bootloader region, the bootloader was unexpectedly erased.

Here’s what I did:

  1. Flashed the bootloader to address range 0x08000000–0x0800BFFF.
  2. Activated PCROP by setting the start and end addresses for the bootloader region (see screenshot below).

pcrop_activation.PNG

 

After this, the bootloader was erased.

Even when I deactivated PCROP_END, the result remained the same — the bootloader was still erased.

I would greatly appreciate any insights into why this is happening and how to properly activate PCROP without losing the bootloader.

Best regards,
Alexander

 

 

 

 

 

1 REPLY 1
Jocelyn RICARD
ST Employee

Hello @AlexMs ,

The PCROP mechanism brings 2 important points:

1) The code becomes execute only

2) the code cannot access data inside PCROP area

This means you cannot simple set PCROP on your loader. It will not execute properly because it will fail on first data access.

Please check PCROP related application note.

For your information, G0B1 has a secure memory mechanism that protects the bootloader from application.

This mechanism is used in the X-CUBE-SBSFU example

Best regards

Jocelyn