ERM interrupt is fired but no status flag is set

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

ERM interrupt is fired but no status flag is set

249 Views
szblaci
Contributor III

Hi!

I am using S32K144 MCU and I would like to enable ERM with interrupt for non-correctable memory failure. 

My problem is that after the application init part as soon as I enable the global interrupt (INT_SYS_EnableIRQGlobal)  and the ERM interrupt handler is called immediately. In the handler I try to identify where is the failure but in the status register no event flag is set. 

CR0 = 0x44000000 -> this is Ok but SR0 = 0x00000000.   

The EAR0 contains "valid" address (according to the map file) and with a certain build the address is the same. If I modify the code and rebuild the address can change.

As I experienced this issue occures only in case of cold reset.

This is my ERM init code:

/* Install IRQ handler function for non correctable RAM ECC failures */
INT_SYS_InstallHandler(ERM_double_fault_IRQn, doubleRamEccFaultIrqHandler, (isr_t*) 0);

/* Clear config register */
ErmBase->CR0 = 0x00000000U;

/* Enable non-correctable ECC fault interrupts */
ErmBase->CR0 = (uint32_t) (ERM_CR0_ENCIE0_MASK | ERM_CR0_ENCIE1_MASK);

/* Reset status register */
ErmBase->SR0 = (uint32_t) 0xFFFFFFFFU;

/* Enable global ERM interrupt */
INT_SYS_EnableIRQ(ERM_double_fault_IRQn);

 

 Do you have any idea what can be the problem?

 

Thanks in advance!

Laszlo

 

Tags (3)
0 Kudos
0 Replies