Best practice for reading EDATA
7.3.4 FLASH read operations
4. If the application reads … high-cycle data not previously written, a double ECC error is reported …
When storing a variable amount of data to high-cycle flash, or dealing with setting up a new/blank MCU, the SW needs to check high-cycle flash which may be empty.
I am looking for a good best-practice for how the flash is meant to be used. One option I am looking at disabled the ECC NMI (ironically) and checks if non-0xffs are present before clearing faults and re-enabling the NMI and reading the data.
This only really works if it can be assumed the data is complete. It will still results in faults if data is not complete for some reason.
Another option I can think of is handling the ECC NMIs and just allow normal reads, catch and clear ECC errors and report failure.
Is there any solid recommendation on what to do? I can’t find any application note with examples.
