cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F3: Back to Read Protect level 0

laurentwawrzyniak9
Associate II
Posted on March 12, 2015 at 14:27

eg:

The 10 first pages of Flash are write protected.

The read protect level 1 is activated.

What's happen when going back to level 0 ?

According Reference manual, a mass erase is done but what's happen to the write protected pages. I expect that they are not erased. Is is the case ?

#flash
3 REPLIES 3
Posted on March 12, 2015 at 18:08

I expect that they are not erased. Is is the case ?

Surely it wouldn't be that hard to test your hypothesis, then you'd know.

I foresee two outcomes

a) The part is completely erased.

b) The mass erase throws an error, nothing is erased and the part is still locked.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
jpeacock
Associate II
Posted on March 12, 2015 at 18:31

Downgrading read protection for flash must trigger a mass erase or there's no protection against code readout and no purpose in read protection level 1.  If write protection was a higher level than read protection then it's a simple matter to take a competitor's device set at read 1, force write protect on all blocks with the JTAG, and then force read 0 via JTAG to recover the flash intact.

  Jack Peacock

laurentwawrzyniak9
Associate II
Posted on March 13, 2015 at 13:07

I did a test and conclusion is  that going back to Read Protection Level 0 erases all pages even those set as write protected.

I also noticed that if you have previously activated the  write protection on some pages then when activating the read protection level 1, the write protection is removed ! (not documented in reference manual)