hello guys,
I find that during the process of erasing or writing Dflash block(not sure which process exactly) and suddently turn the power down, the data in that Dflash block are all clashed(the whole block show "?" by using Lauterbach,other blocks that not been modifed are not affected. ).When reset the device and the program read that block data again, the program would active an ECC fault and Machine State exception. In the Machine State exception i erase the fault block again and the blcok is readable but the data is lost.
I want to know:
1. is this normal for the Dflash block to show "?" when suddenly turn the power down during the process of erasing or writing,what the "?" mean?
2. what should i do in that exception, am i doing right thing that to erase the blcok again.
3.though i fix this problem by erasing fault blcok in the Machine State exception, but is there any better way that not to lose data?
thanks for your help
解決済! 解決策の投稿を見る。
1) Yes, it is normal. "?" indicates bus error i.e. ECC error.
In fact erase operation consist of 4 sub-operations - Program, Erase, Compaction and Soft Program.
Details you may find in the AN4521, Figure 1:
https://www.nxp.com/docs/en/application-note/AN4521.pdf
Note that this appnote is related to slightly different flash module, but principle will be similar for any internal flash memory.
Turning the power down during any operation (excluding fully erased state) leads ECC errors.
2) Yes, it is correct.
3) Yes, you will loose data. They are methods how to minimize impact of such failures and these are used by EEPROM emulation drivers. Pay attention to (mainly section 3):
1) Yes, it is normal. "?" indicates bus error i.e. ECC error.
In fact erase operation consist of 4 sub-operations - Program, Erase, Compaction and Soft Program.
Details you may find in the AN4521, Figure 1:
https://www.nxp.com/docs/en/application-note/AN4521.pdf
Note that this appnote is related to slightly different flash module, but principle will be similar for any internal flash memory.
Turning the power down during any operation (excluding fully erased state) leads ECC errors.
2) Yes, it is correct.
3) Yes, you will loose data. They are methods how to minimize impact of such failures and these are used by EEPROM emulation drivers. Pay attention to (mainly section 3):
Thanks for your reply and the appnotes you recommended are really helpful. last question i wanna know is, does the ECC error happen if the power suddenly turned down during the operation of Dflash read and program? if ECC error does not happen then what will happen?
If power is suddenly turned down during read operation nothing happens. If it happens during program operation, probably ECC error will be present on the 32-bit data word, its programming has been interrupted. It is programmed word by word, sequentially from lower address to higher.