I need a little help figuring out how to setup daisy-chaining timers.
I have an LM4F232 eval kit with a LM4F232H5QD microcontroller, and
I am trying to setup two timers. Timer 0 is setup to timeout at
1us. Timer 1 is setup to wait for Timer 0 trigger and count for 15.682ms.
Timer 1 does not wait for Timer 0 trigger and immediately starts
counting. I purposely disable Timer 0 in code but Timer 1 still
starts counting, so regardless of whether Timer 0 is disabled or
enabled, Timer 1 immediately starts counting. Please offer any
suggestions of my code or anything that I am missing to setup.
I have also checked the errats but no mention of daisy-chaining timers
other than making sure the timers are not in PWM mode.
Thanks in advance.
---------------------------------------------------------------------
//Clocking is set to run from the Main at 16 MHz.
//Enable Timer Peripherals
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1);
//Configure Timer 0 - Periodic Count up for 1us
ROM_TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC_UP);
ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, 16);
ROM_TimerEnable(TIMER0_BASE, TIMER_A);
//Configure Timer 1 - Periodic Count up and wait for Timer 0 trigger
//Timer 1 set to 15.682ms timeout
ROM_TimerConfigure(TIMER1_BASE, TIMER_CFG_PERIODIC_UP);
ROM_TimerLoadSet(TIMER1_BASE, TIMER_A, 15682);
ROM_TimerControlWaitOnTrigger(TIMER1_BASE, TIMER_A, true);
ROM_TimerEnable(TIMER1_BASE, TIMER_A);
---------------------------------------------------------------------