Обработчик прерывания нужно на вектор установить и обработать в прерывании vic
typedef void (*PFNCT)(void);
volatile __no_init unsigned long VICVectAddr @ 0xFFFFF030;
#pragma vector = 0x18
void IRQ_Handler (void)
{
PFNCT pfnct;
pfnct = (PFNCT)VICVectAddr; /* Read the interrupt vector from the VIC */
while (pfnct != (PFNCT)0) /* Handle ALL interrupting devices */
{
(*pfnct)(); /* Call ISR for interrupting device */
VICVectAddr = 0; /* update priority hardware */
pfnct = (PFNCT)VICVectAddr; /* Read the interrupt vector from the VIC */
}
}