Hi,
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?
Reagrds,
Serdar
----- 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
http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/p/50722/181435.aspx
Regards
Mukul
Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.