Hi
I need help in how to erase the complete 3MB of the device: NXP SPC5646CCF0MMJ1
When I am doing read after erase it is not getting erased from address 140000h-2FFFFFh.
Can I get any solution on it?
Thanks!
Saista
Hello,
You can for example use debugger scripts.
Most of them have embedded the erase scripts directly.
Or you can use your RAM application to do so following the reference manual (C90FL)
The erase operation consists of the following sequence of events:
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.
4. Write a logic 1 to the MCR[EHV] bit to start the internal erase sequence or skip to step 9 to
terminate.
5. Wait until the MCR[DONE] bit goes high.
6. Confirm MCR[PEG] = 1.
7. Write a logic 0 to the MCR[EHV] bit.
8. If more blocks are to be erased, return to step 2.
9. Write a logic 0 to the MCR[ERS] bit to terminate the erase operation.
Best regards,
Peter