S32K344-How to distinguish ECC error interrupt from HardFault interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K344-How to distinguish ECC error interrupt from HardFault interrupt

Jump to solution
1,325 Views
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 Kudos
Reply
1 Solution
1,264 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu,

Yes, that is correct.

But point 3 is application-dependent.

 

BR, Daniel

 

View solution in original post

3 Replies
1,290 Views
danielmartynek
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
1,278 Views
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 Kudos
Reply
1,265 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Simon-Liu,

Yes, that is correct.

But point 3 is application-dependent.

 

BR, Daniel