Hi,
we use flash for program memory and for storing resources, like pictures and settings.
With LPC2xxx and LPC17xx this was no problem, if flash region was ff ff ff... it was empty and we were able to write it.
Reading was always no problem.
Now advantage is, we've got smaller pages to erase.
My problem: If I wrote once in an area, I can read it. But if it's empty, I can only check, if the whole area is empty by flash_verify_erase().
Example:
erase area 0x30000 to 0x31000
flash_verify_erase(adr=0x30400, size=0x200), is ok, so we assume region is empty, we must not read.
Write data to 0x30200 to 0x30800
flash_verify_erase(adr=0x30400, size=0x200), fails, so we assume region is full with data
read data from 0x30500 to 0x30600 is ok,
but
flash_verify_erase(adr=0x30700, size=0x200), fails, so we assume region is full with data
read data from 0x30700 to 0x30900 ==> hard fault.
How can I check, if one region is save to read from? Do I have to write my own method, to check every single page?
Thanks for your help in advance
Bernhard
Edit: formatting