1900048_en-US

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

1900048_en-US

1900048_en-US

S32K344-How to distinguish ECC error interrupt from HardFault interrupt

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

Re: S32K344-How to distinguish ECC error interrupt from HardFault interrupt

Hi @Simon-Liu,

Yes, that is correct.

But point 3 is application-dependent.


BR, Daniel


Re: S32K344-How to distinguish ECC error interrupt from HardFault interrupt

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

Re: S32K344-How to distinguish ECC error interrupt from HardFault interrupt

Hello @Simon-Liu,

Have a look at this example:

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-C40-Ip-ECC-Fault-Skip-S32K312-DS34-RTD2211-...


BR, Daniel

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 11:02 PM
更新者: