S32K312 ERM double bit error interrupt not called.

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

S32K312 ERM double bit error interrupt not called.

Jump to solution
581 Views
RafalK
Contributor II

I have a problem with triggering SRAM ECC double bit error interrupt. I use EIM to inject error into RAM bus. 

For single bit everything works fine. For double bit the interrupt is not called however I can see that after injection ERM reports it. There is also Hard Fault which is normal behaviour since interrupt is not handled.

doublebitError.PNG

I am setting interrupt :

ERM_1_IRQn    = 37,  /**< Multi bit ECC error */
 
with highest priority.
What am I missing?

0 Kudos
1 Solution
524 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

after some checks, you are actually correct.

This is the communication from design team:

Multibit errors on SRAM will generate a bus fault, so some considerations need to be taken into account in the Bus or Hard fault routine in order to check the cause of the error and attend the ERM routine after it. I am checking to include a note in the RM that advises this behavior.

Seems no note is in RM at this time.

Best regards,

Peter

View solution in original post

0 Kudos
4 Replies
544 Views
RafalK
Contributor II

With further testing I discovered that multi-bit error interrupt (ERM_1_IRQn) is actually working for Flash errors.

I followed instructions for ECC logic check that uses UTest mode to inject ECC errors into flash. It works and interrupt is called. It proves that IRQ is configured correctly. 

However it still fails to call it on RAM multi-bit errors. 

Also, I have found a Application note for different ECU S32K11x that states:

...

S32K11x Error Handling: When the fault occurs, the CPU jumps to the hard fault error interrupt handler first and just after
that, the ERM interrupt flag is set. At this point, the user has to check if the ERM status register is showing a non-correctable
ECC error event. If yes, it is recommended to follow the recommended reaction (system reset).

...

So maybe it is the same on S32K312 when dealing with RAM? But why it works on FLASH then?

0 Kudos
525 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

after some checks, you are actually correct.

This is the communication from design team:

Multibit errors on SRAM will generate a bus fault, so some considerations need to be taken into account in the Bus or Hard fault routine in order to check the cause of the error and attend the ERM routine after it. I am checking to include a note in the RM that advises this behavior.

Seems no note is in RM at this time.

Best regards,

Peter

0 Kudos
479 Views
RafalK
Contributor II

Assuming HardFault is called to handle ECC multibit error, could you please tell me how to return safely to the code that caused corrupted Flash/RAM read and step over it?

It is possible only with PC and stack context editing in runtime or there is some special designed solution for such cases?

0 Kudos
470 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

This would be on your SW implementation.

Identify the address and simply exclude it from the execution / perform reset and branch SW to safe state.

Next would be reprogramming flash to fix error.

Best regards,

Peter

0 Kudos