Other Parts Discussed in Thread: EK-TM4C1294XL
Hi,
I was Tring to configure timer4 in capture mode .I was expected an interrupt either in rising or falling edge.but unable to get an interrupt, can some one help me out to slove this issue
SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
// Enable the peripherals for Timer 4 and GPIO Port M
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER4);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOM);
// Configure GPIO Port M pin 4 as Timer 4A capture input
GPIOPinTypeTimer(GPIO_PORTM_BASE, GPIO_PIN_4);
GPIOPinConfigure(GPIO_PM4_T4CCP0);
// Configure Timer 4A as a capture timer
TimerConfigure(TIMER4_BASE, TIMER_CFG_A_CAP_TIME_UP);
// Set the load value for Timer 4A
TimerLoadSet(TIMER4_BASE, TIMER_A, 0xFFFF);
// Enable Timer 4A capture events on Falling edges
TimerControlEvent(TIMER4_BASE, TIMER_A, TIMER_EVENT_POS_EDGE);
// Register the interrupt handler for Timer 4A capture event
TimerIntRegister(TIMER4_BASE, TIMER_CAPA_EVENT, Timer4ACaptureIntHandler);
// Enable Timer 4A capture event interrupt
TimerIntEnable(TIMER4_BASE, TIMER_CAPA_EVENT);
// Enable Timer 4A
TimerEnable(TIMER4_BASE, TIMER_A);
// call back function
void Timer4ACaptureIntHandler(void)
{
// Clear the Timer 4A capture event interrupt
TimerIntClear(TIMER4_BASE, TIMER_CAPA_EVENT);
count ++;
}