I would like to check the whole flash at bootup before executing any further codepiece.
What I currently have is that I enabled:
- Enabled Flash ECC (EDACEN) and tried both modes (EDACMODE)
- Enabled bus Events
- Enabled ECC check in CPU core: ATCM
Then I just read from 0-3Mb the whole flash and I would like to check the FlashWrapper's status and UNC_ERR_ADD register but in case of the ATCM bit is set (core ECC is enabled) I run into a data abort.
If I dont enable th core ECC (just the FlashWrapper's ECC check) I do not see any status or corrupted memory locations (even though the flash is indeed ECC corrupt).
Also tried with using the flash mirror (starting from 0x20000000).
Is there a way to just read the whole flash and check the status bits/values of the flashwrapper registers?