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.
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 ?