I am now using Flash data(P/N:S32K144) with the following problems:
When Flash Sector erasing fails or not erased, write to that sector using a write command, and then Reading that sector through a pointer. this progress produces a HardFault, meanwhile register FERSTAT DFDIF bit will be seted to 1(namely This generates an uncorrectable ECC error).
my question is:
1:Is there a better way to deal with the uncorrectable ECC error and DFDIF = 1? or just only erase problematic Flash?
2:Is there any way to get this error state of whole flash quickly after the MCU is powered on?