AnsweredAssumed Answered

Shadow flash erase

Question asked by Pontus Hedman on Oct 5, 2017
Latest reply on Feb 8, 2018 by SIBIN THOMAS

I need to programatically implement censorship on a SPC560B60x.  So this would involve unlocking and erasing the shadow sector and immediately writing new values for NVPWDx/NVSCCx.


Unlocking involves LML[TSLK]/SLL[STSLK] but erasing is unclear. According to 30.6.3 Sector erase:


1. Change the value in the MCR[ERS] bit from 0 to 1.
2. Select the block(s) to be erased by writing ‘1’s to the appropriate bit(s) in the LMS register. If the shadow sector is to be erased, this step may be skipped, and LMS is ignored. Note that Lock and Select are independent. If a block is selected and locked, no erase will occur.
3. Write to any address in flash memory. This is referred to as an erase interlock write.



Since LMS is not relevant in step 2, how do I indicate that it's the shadow sector I want erased?