S32K344-How to distinguish ECC error interrupt from HardFault interrupt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K344-How to distinguish ECC error interrupt from HardFault interrupt

跳至解决方案
1,326 次查看
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,265 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu,

Yes, that is correct.

But point 3 is application-dependent.

 

BR, Daniel

 

在原帖中查看解决方案

3 回复数
1,291 次查看
danielmartynek
NXP TechSupport
NXP TechSupport
0 项奖励
回复
1,279 次查看
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,266 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu,

Yes, that is correct.

But point 3 is application-dependent.

 

BR, Daniel