I would like to use Timer0 in unchained mode with period reload on L138. I need to start a task when I get the interrupt signal from timer. Also I need to change period dynamically.
In this configuration (mentioned below), timer works but doesn't generate interrupt signal. If I change configuration to PLUSEN = 0 and ENAMODE12 = 2, it generates interrupt signal.
I couldn't catch what I'm missing. Do I need additional setup when PLUSEN = 1?
----- Timer Configuration -------
CSL_FINST(tmr0Regs->TIM12, TMR_TIM12_TIM12, RESETVAL); CSL_FINST(tmr0Regs->TCR, TMR_TIM12_TIM12, RESETVAL);
tmr0Regs->TGCR = CSL_FMKT(TMR_TGCR_TIMMODE,32BIT_UNCHAIN) | CSL_FMKT(TMR_TGCR_TIM12RS,NO_RESET) | CSL_FMKT(TMR_TGCR_PLUSEN, ENABLE);
tmr0Regs->PRD12 = 10000;
tmr0Regs->REL12 = tmr0Regs->PRD12;
tmr0Regs->INTCTLSTAT = CSL_FMKT(TMR_INTCTLSTAT_PRDINTEN12, ENABLE);
// timer set and start tmr0Regs->TCR = CSL_FMKT(TMR_TCR_CLKSRC12, INTERNAL) | CSL_FMKT(TMR_TCR_ENAMODE12, EN_CONTRELOAD);
------ tcf file ------
/* CONVST switch (timer) hwi configuration */bios.HWI.instance("HWI_INT4").interruptSelectNumber = 4;bios.HWI.instance("HWI_INT4").fxn = prog.extern("isrCONVST");bios.HWI.instance("HWI_INT4").useDispatcher = 1;
------ memory dump ----
0x01C20000 4472020C 00000000 00000000 00000000 00001A3C 00000000 000027100x01C2001C 00000000 000000C0 00000015 00000000 00000290 00000000 000027100x01C20038 00000000 00002710 00000000 00000003 00000000 00000000 000000000x01C20054 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF0x01C20070 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 4472020C 00000000 000000000x01C2008C 00000000 00001A3C 00000000 00002710 00000000 000000C0 000000150x01C200A8 00000000 00000290 00000000 00002710 00000000 00002710 000000000x01C200C4 00000003 00000000 00000000 00000000 00000000 00000000 00000000
Please see if the following post helps
Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.