I am trying to use Timer0 for a series of interrupts. Each time I get an external interrupt I want to program a timer interrupt to occur some programmable time before I think the next external interrupt will occur. The documentation is just not there for what exactly happens when I enable or disable reset, interrupts, etc. All I know is my code doesn't work.
Here is my code to setup the timer for each occurrence:
CSL_FINST(tmr0Regs->TGCR, TMR_TGCR_TIM12RS, RESET);
CSL_FINST(tmr0Regs->INTCTLSTAT, TMR_INTCTLSTAT_PRDINTEN12, ENABLE);
tmr0Regs->TIM12 = 0;
tmr0Regs->PRD12 = ((unsigned)diff + GenICamPrivate.PreTrigger) * 24;
CSL_FINST(tmr0Regs->TCR, TMR_TCR_ENAMODE12, EN_ONCE);
CSL_FINST(tmr0Regs->TCR, TMR_TCR_PWID12, TWO_CLK);
CSL_FINST(tmr0Regs->TGCR, TMR_TGCR_TIMMODE, 32BIT_UNCHAIN);
CSL_FINST(tmr0Regs->INTCTLSTAT, TMR_INTCTLSTAT_PRDINTEN12, ENABLE);
CSL_FINST(tmr0Regs->TGCR, TMR_TGCR_TIM12RS, NO_RESET);
If I set a breakpoint at the last line then I get a timer interrupt. If I run full speed then I do not get a timer interrupt.
Would greatly appreciate some help setting this up.