TMS320VC5509的外部中断
1. 外部中断引脚INT0-INT4,INT2-平时是低电平,INT3-平时是高电平
2. 不过中断不支持设置上升沿和下降沿触发,中断就是中断,我估计应该是平时是高电平,然后低电平触发中断,代码比较简单
void INTconfig()
{
/* Temporarily disable all maskable interrupts */
IRQ_setVecs((Uint32)(&VECSTART));
/* Temporarily disable all maskable interrupts */
old_intm = IRQ_globalDisable();
/* Get Event Id associated with External INT1(8019), for use with */
eventId0 = IRQ_EVT_INT2;
eventId1 = IRQ_EVT_INT3;
/* Clear any pending INT1 interrupts */
IRQ_clear(eventId2);
IRQ_clear(eventId3);
/* Place interrupt service routine address at */
/* associated vector location */
IRQ_plug(eventId2,&int2);
IRQ_plug(eventId3,&int3);
/* Enable INT1(8019) interrupt */
IRQ_enable(eventId2);
IRQ_enable(eventId3);
/* Enable all maskable interrupts */
IRQ_globalEnable();
}
其中int2,int3就是中断回调函数