s32k3

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
5,471件の閲覧回数
luyq
Contributor III

Hello!

  When the D-flash is executing the erase command, if it is powered off, it will cause an ECC check error on the D-flash. In order to avoid this problem, when I detect a power failure, I call the command to terminate the operation. Can this prevent ECC errors? In addition, does the flash hardware continue to operate after calling the flash termination command?

  Looking forward to your reply!

 

0 件の賞賛
返信
1 解決策
5,432件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Yes, if the power is loss during a flash operation, the data record and its ECC checksum cannot be guaranteed to be correct.

 

Regards,

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
7 返答(返信)
5,411件の閲覧回数
ferencvalenta
Contributor III

You can handle the exceptions, but that's somewhat complicated. I use the DMA controller to read from flash that was erased/programmed in the application. No exception, only the error bit is set but that's easy to handle.

0 件の賞賛
返信
5,389件の閲覧回数
luyq
Contributor III
Do you mean to catch the exception by software and then erase the area to recover from the error?
0 件の賞賛
返信
5,305件の閲覧回数
ferencvalenta
Contributor III

Yes that's one option. Actually on another MCU that's what the Tresos Fls driver expects. You have to call the exception handler of the flash driver and then return from the exception or reset the system, and Fls will take care of cleaning up the invalid memory.

I found the DMA solution easier to use.

0 件の賞賛
返信
5,455件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @luyq,

Unfortunately, aborting the operation leaves the flash in an indeterminate state.

 

  • danielmartynek_0-1690373673746.png

 

 

  • danielmartynek_1-1690373681055.png
  • danielmartynek_2-1690373706903.png

 

Regards,

Daniel

0 件の賞賛
返信
5,445件の閲覧回数
luyq
Contributor III
I accept the consequences of data errors after terminating the operation, but if an exception occurs at this time, such as power failure, will it cause ECC errors?
0 件の賞賛
返信
5,433件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Yes, if the power is loss during a flash operation, the data record and its ECC checksum cannot be guaranteed to be correct.

 

Regards,

Daniel

0 件の賞賛
返信
5,418件の閲覧回数
luyq
Contributor III
Is there any processing strategy on the software to avoid this problem after detecting power failure?
0 件の賞賛
返信