2015-03-12 06:27 AM
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 ? #flash2015-03-12 10:08 AM
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 outcomesa) The part is completely erased.b) The mass erase throws an error, nothing is erased and the part is still locked.2015-03-12 10:31 AM
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 Peacock2015-03-13 05:07 AM
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)