Hello,
I'm using the TivaTM4C1294.
I'm using Timer5, which is split into two 16 bit timers - TimerA and TimerB. The clock to the timer5 module is the PIOSC.
Both the timers are set to interrupt at rising and falling edges and are configured in Edge-count mode.
If I use either Timer5A or Timer5B as standalone timers, they work well, interrupting as usual. However, if I enable both of them, only Timer5B triggers.
Added code below:
Timer5A config
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOM);
GPIOPinTypeTimer(GPIO_PORTM_BASE, GPIO_PIN_6);
GPIOPinConfigure(GPIO_PM6_T5CCP0);
GPIOPadConfigSet(GPIO_PORTM_BASE, GPIO_PIN_6,
GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
/* Clock the timer using the PIOSC - Precision Internal Oscillator
* @16MHz.
*/
TimerClockSourceSet(TIMER5_BASE, TIMER_CLOCK_PIOSC);
/* Configure the timer in half-width edge time capture that counts up. */
TimerConfigure(TIMER5_BASE, (TIMER_CFG_SPLIT_PAIR \
| TIMER_CFG_A_CAP_TIME_UP));
TimerControlEvent( TIMER5_BASE, \
TIMER_A, \
TIMER_EVENT_POS_EDGE);
IntEnable(INT_TIMER5A);
TimerIntEnable(TIMER5_BASE, TIMER_CAPA_EVENT);
Timer5B config
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOM);
GPIOPinTypeTimer(GPIO_PORTM_BASE, GPIO_PIN_7);
GPIOPinConfigure(GPIO_PM7_T5CCP1);
GPIOPadConfigSet(GPIO_PORTM_BASE, GPIO_PIN_7,
GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
/* Clock the timer using the PIOSC - Precision Internal Oscillator
* @16MHz.
*/
TimerClockSourceSet(TIMER5_BASE, TIMER_CLOCK_PIOSC);
/* Configure the timer in half-width edge time capture that counts up. */
TimerConfigure(TIMER5_BASE, (TIMER_CFG_SPLIT_PAIR \
| TIMER_CFG_B_CAP_TIME_UP));
TimerControlEvent( TIMER5_BASE, \
TIMER_B, \
TIMER_EVENT_POS_EDGE);
IntEnable(INT_TIMER5B);
TimerIntEnable(TIMER5_BASE, TIMER_CAPB_EVENT);
TimerEnable(TIMER5_BASE, TIMER_A);
TimerEnable(TIMER5_BASE, TIMER_B);