Hello, I'm developing an application with the stellaris launchpad board (LM4F120H5QR uC).
I've successfully used a timer to generate a PWM signal on a TxCCPx pin.
I wanted to generate an interrupt on the reset of the timer, but as far as I checked the datasheet in PWM mode the interrupt it's generated only on compare. (Am I correct on this?)
I ended up using another timer to synchronize to the PWM and use it to generate an interrupt. I can't find any example on how to synchronize timers with stellarisware.
my code basically does the following:
TimerSynchronize(TIMER0_BASE, TIMER_1A_SYNC | TIMER_0B_SYNC);
TimerConfigure(TIMER1_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PWM);
TimerConfigure(TIMER0_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_B_PERIODIC);
TimerLoadSet(TIMER1_BASE, TIMER_A, PERIOD_1);
TimerLoadSet(TIMER0_BASE, TIMER_B, PERIOD_1);
TimerMatchSet(TIMER1_BASE, TIMER_A, DUTY_CYCLE);
I think I'm missing something but I can't understand if I need to use other functions of the API to set it up correctly.
As it is it just freezes, it doesn't execute the interrupt code and PWM doesn't start either.
I've tried to start the timers without synchronization, both the timers start and the ISR Routine it's running properly, but a
bit out on timing because they are started one after the other.