S32K344-How to distinguish ECC error interrupt from HardFault interrupt

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K344-How to distinguish ECC error interrupt from HardFault interrupt

ソリューションへジャンプ
1,321件の閲覧回数
Simon-Liu
Contributor V

Hello

When I was using S32K344 to test the data read and write of DataFlash, I found that if the same ECC area (8 bytes) was programmed multiple times, it would cause ECC errors and trigger HardFault interrupts.
1. How can I distinguish between ECC error interrupts and HardFault interrupts, that is, call another interrupt function when an ECC error occurs
2. Do you have sample software for ECC? I am not sure what kind of processing the software should do after triggering ECC

 

BestRegards,

Simon

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

Hi @Simon-Liu,

Yes, that is correct.

But point 3 is application-dependent.

 

BR, Daniel

 

元の投稿で解決策を見る

3 返答(返信)
1,286件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信
1,274件の閲覧回数
Simon-Liu
Contributor V

Hello, @danielmartynek 

In the sample software, I saw the following operations performed in the HardFault_Handler process:
1. Clear the fault flag and bus fault address register
2. Clear the ECC error flag of the MCRS register
3. Move the stack pointer backward to skip the instruction address where the ECC error occurred

1 and 2 above are to clear the error flag, and 3 is to prevent the error interrupt from being triggered again after the interrupt processing is completed. Is my understanding correct?

 

BestRegards,

Simon

0 件の賞賛
返信
1,261件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu,

Yes, that is correct.

But point 3 is application-dependent.

 

BR, Daniel