Hello,
I am attempting to setup up two input captures. Both channels utilize Timer5 CCP. Therefore, I use the split timer and assign Timer A and Timer B, respectively to the appropriate pin. I use edge detection and jump to the appropriate ISR when a single edge is detected. I was able to get my code to work correctly when I configured just T5CCP0 (Timer A). However, when I add in the T5CCP1 (Timer B) configuration to my code, it appears that which ever timer was configured most recently is the one that functions and the other timer no longer captures events. -- I tried swapping the order they are initialized and found this trend. They both work independently. Do I have a bug in my initialization of my timers that is causing one channel to be masked?
Thank you.
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5); ROM_GPIOPinTypeTimer(GPIO_PORTM_BASE, GPIO_PIN_2); ROM_GPIOPinTypeTimer(GPIO_PORTM_BASE, GPIO_PIN_3); ROM_GPIOPinConfigure(GPIO_PM2_T5CCP0); ROM_GPIOPinConfigure(GPIO_PM3_T5CCP1); ROM_IntMasterEnable(); ROM_TimerConfigure(TIMER5_BASE, (TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_CAP_COUNT)); ROM_TimerConfigure(TIMER5_BASE, (TIMER_CFG_SPLIT_PAIR | TIMER_CFG_B_CAP_COUNT)); ROM_TimerLoadSet(TIMER5_BASE, TIMER_A, 1); ROM_TimerMatchSet(TIMER5_BASE, TIMER_A, 0); ROM_TimerLoadSet(TIMER5_BASE, TIMER_B, 1); ROM_TimerMatchSet(TIMER5_BASE, TIMER_B, 0); ROM_TimerControlEvent(TIMER5_BASE, TIMER_A, TIMER_EVENT_NEG_EDGE); ROM_TimerControlEvent(TIMER5_BASE, TIMER_B, TIMER_EVENT_POS_EDGE); ROM_TimerIntEnable(TIMER5_BASE, TIMER_CAPA_MATCH); ROM_TimerIntEnable(TIMER5_BASE, TIMER_CAPB_MATCH); ROM_TimerEnable(TIMER5_BASE, TIMER_A); ROM_TimerEnable(TIMER5_BASE, TIMER_B); ROM_IntEnable(INT_TIMER5A); ROM_IntEnable(INT_TIMER5B);