Hi,
PIT channel 0 can work in the debug mode, the status of related registers are shown in the attachments. But it can not enter the ISR, my configurations and ISR about INTC like this, the whole codes are in the attachments.
void intc_init(void)
{
/* Initialization of the exception handlers and INTC */
EXCEP_InitExceptionHandlers();
INTC_InitINTCInterrupts();
/* Enable interrupts in INTC:
* PIT channel 0
*
*/
INTC_InstallINTCInterruptHandler(pit_ch0_isr, 59, 0); /* PIT channel 0 priority: 0 */
/* Lower current priority - to enable INTC to process interrupts */
INTC.CPR.R = 0x0;
}
/*
* PIT channel 0 interrupt handler
*/
void pit_ch0_isr(void)
{
PIT.CH[0].TFLG.R = 0x1;
SIU.GPDO[0].B.PDO = ~ SIU.GPDO[0].B.PDO;
}
Please help me to solve the problem,thanks!
Hi,
You have to have PIT interrupt priority other then 0 if you want to trigger IVOR4 (external interrupt).
Peter
Hi Peter,
Thank you! The problem has been solved.