I'm toying with the idea to design/implement some kind of EEPROM simulation for the LPC824 and therefore trying to understand the concept of page erases - especially regarding flash wear.
Since the according command only exists in the IAP API and the concept of erasing pages inside a sector seems to contradict the idea of flash, I wonder if the page erase command just performs a sector erase internally but reads/restores all other pages with some embedded 1kB buffer. If this should be the case, consecutive page erasing wouldn't help to reduce the flash wear and I'd go for a 2 sector approach.
So is my assumption true or does the page erase command really only affect the page (and not the whole sector)?
Hi Volker Oth,
1. We need know the page, sector and write size:
Page size is:64Bytes.
Sector size is : 1KB.
sector size = 16 Page size.
each write is 4Bytes.
each page can have 16 times writes, it is 16*4=64Bytes.
2. Page erase is not sector erase
1 page erase is just 64 Bytes, 1 sector erase is 1K Bytes.
Please note, the User manual for LPC824 have bugs, before you do the page erase, you need to call Prepare sector(s) for write operation command, this command is also used to page erase.
In the same sector, if you just want to erase small part address, you can use the page erase, the other part in the sector won't be erased, I think it will minimize the flash wear.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------