程序始终无法进入中断,不知道为什么。。。求大神解答~~T^T
这是TIMER配置函数,
void InTimer_Init(void)
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_WTIMER0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
//ʹÄÜGPIOB ÍâÉè
GPIOPinTypeTimer(GPIO_PORTC_BASE, GPIO_PIN_4);
GPIOPinTypeGPIOInput(GPIO_PORTC_BASE, GPIO_PIN_4);
GPIOPinConfigure(GPIO_PC4_WT0CCP0);
// IntMasterEnable();//master interrupt enable API for all interrupts
TimerConfigure (InTimer_BASE,TIMER_CFG_A_CAP_COUNT_UP|TIMER_CFG_SPLIT_PAIR);//??????,?????
TimerControlEvent(InTimer_BASE,TIMER_A,TIMER_EVENT_POS_EDGE); TimerLoadSet (InTimer_BASE, TIMER_A,10);
TimerLoadSet (InTimer_BASE,TIMER_A,10000);
TimerMatchSet (InTimer_BASE,TIMER_A,1000);//
IntEnable(INT_TIMER0A);//ʹÄÜ TIMER0A
TimerIntEnable(InTimer_BASE,TIMER_CAPA_EVENT);//¶¨Ê±Æ÷A ²¶»ñʱ¼ä´¥·¢ÖжÏ
TimerEnable(InTimer_BASE, TIMER_A);//TIMER0A ¿ªÊ¼¼ÆÊý,¼ÆÊýÖµ = TimerLoadSet ʱ,´¥·¢ÖжÏ
}
|