cancel
Showing results for 
Search instead for 
Did you mean: 

Non standard behavior of PCROP area, upon lowering RDP level in STM32G0B1RE

jmir
Visitor

I have the following flash protections requirements:

1) Write protect the last sector (with start address 0x0803F800)
2) Read protect the entire flash with Level 1.
3) If the read protect is lowered, the data in the last sector must be unchanged.

I'm performing the following operations in a chronological order:

1) Program a proprietary bootloader and do a soft reset.
2) Enable single bank operation (DUAL_BANK=0) and do a soft reset.
3) Program the application and do a soft reset.
4) Program the last sector with data and do a soft reset.
5) Write protect the last sector (WRP1A_END=0x7F) and do a soft reset.
6) Set PCROP area that covers the last sector (PCROP1A_STRT=0x1FC and PCROP1A_END=0x1FD) and do a soft reset.
7) Increase read protection level from 0 to 1 (RDP=0xBB)
8) Power cycle the device (POR is performed)

After this, I reduce the RDP level from 0 to 1 and, when checking the data integrity of the last sector, I verify that the entire sector was set to zeros. The sector is not erased, as expected based on the table bellow (reference manual in page 89, table 19) nor maintains its data integrity, which violates my requirement - 3) If the read protect is lowered, the data in the last sector must be unchanged.

jmir_0-1755603728328.png


Notes:
1) PCROP_RDP is set to 0.
2) I tried other PCROP areas where PCROP_START and PCROP_END are in different pages but had the same result (PCROP_START=0x1fb and PCROP_END=0x1ff).




 

0 REPLIES 0