RCM_IRQHandler can't enter when Watchdog IRQ trigger(S32K148)

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

RCM_IRQHandler can't enter when Watchdog IRQ trigger(S32K148)

1,488 Views
shijie_zheng
Contributor III

Dear Technical Supporter:

I have a problem while debugging the RCM IRQHandler,
RCM IRQHandler is not called after the watchdog is triggered. I confirm the RCM Register Settings,the register is correct, verify with GPIO that RCM_IRQHandler has not been executed ,Only WDOG_EWM_IRQHandler was executed. What is the possible reason for this?

 

My debug code as follows:

/****************************/
RCM->SRIE |= 0x2CA3;
INT_SYS_EnableIRQ(RCM_IRQn);
INT_SYS_InstallHandler(RCM_IRQn, &RCM_IRQHandler, NULL);
INT_SYS_SetPriority(RCM_IRQn,1);

INT_SYS_EnableIRQ(WDOG_EWM_IRQn);
INT_SYS_InstallHandler(WDOG_EWM_IRQn, &WDOG_EWM_IRQHandler, NULL);
INT_SYS_SetPriority(WDOG_EWM_IRQn,1);

/****************************/

The interrupt handler is as follows:

void RCM_IRQHandler(void)

{

     /*[14] FLG Watchdog Interrupt Flag*/

     //if(WDOG->CS & 0x4000)

     //{

         GPIO_Port_Lev_Set(PTE,PIN_INDEX_11,PORT_HIGH);

         __asm__("BKPT");

     //}

}

void WDOG_EWM_IRQHandler(void)

{

     /*[14] FLG Watchdog Interrupt Flag*/

     //if(WDOG->CS & 0x4000)

     //{

         //GPIO_Port_Lev_Set(PTE,PIN_INDEX_11,PORT_HIGH);

     //}

}

 

After  Code Running,The value of the RCM Register referenced to RCM.jpg in attach.

0 Kudos
Reply
2 Replies

1,477 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@shijie_zheng

try this way:

Senlent_0-1632474444778.png

  it seems we can’t debug it – the counter counts down even if debug mode is entered, so the device is reset in 514 LPO cycles in any case.

BR!

        Jim,

0 Kudos
Reply

1,479 Views
shijie_zheng
Contributor III

Dear Technical Supporter:
I found the reason why the RCM Handler can't be called,

because"WDOG IRQ will be executed and RCM IRQ will be pending based on the fact that WDOG has lower number".


I disabled WDOG IRQ and keep RCM IRQ enable,RCM IRQHandler can be called ,
but __asm__("BKPT") can't achieve the effect of breakpoint in RCM IRQHandler,
I am trying to find the address of the program that caused the reset when RCM IRQHandler called,
but if it cannot break, I can't find the address of the exception program through debug trace(S32DS,use PE debug).

My goal is not to know that RCM IRQHandler was called,

but to know the address of the program that was executed before RCM IRQHandler was called,

Does anyone know how to get the program address before the RCM IRQHandler was called ?