This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DOUBT ABOUT F2812 CPU TIMER

Other Parts Discussed in Thread: TMS320F2812

hi,

   am using TMS320F2812 with XDS 100 USB Emulator, i learn to program with the help TI Teaching CD-ROM, i successfully programmed using CPU TIMER0 by the following Method:

interrupt void Cpu_Timer0_isr(void);

void main

{

............;

..........................;

InitCpuTimers();

PieVectTable.TINT0 = &Cpu_Timer0_isr;

PieCtrlRegs.PIEIER1.bit.INTx7 = 1;

IER = 0x0001;

................................;

................;

}

void Cpu_Timer0_isr()
{
    ....................;

................................................;

    CpuTimer0Regs.TCR.bit.TIF = 1;
    PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;

}
 now my question is : Timer0 is connected with PIE unit hence we using in above method. But Timer1 is not connected with PIE Unit, so i dont know how to use &  how can i use . ? please i need some sample program using CPU TIMER1..........or tell about how to use ?

Many Thanks,

  • Hello S.,

    This E2E post has an example project which shows the process for initializing CPU Timer1 and enabling the interrupt.  The example project is not for your device specifically, but it should be a great starting point for Timer1.  As described by Frank in his post, a major difference which you have noted above is that CPU Timer1 and CPU Timer2 are not part of the PIE unit but instead can be tied to INT13 and INT14 instead.

    Also, a search of the E2E forums for CPU Timer1 examples may lead to more information regarding using the CPU Timers.

    Best Regards,

    Mark-

  • ya i know that ' CPU Timer1 and CPU Timer2 are not part of the PIE unit but instead can be tied to INT13 and INT14 instead ' , but i dont know how to use that Non-Peripheral Interrupts in the program, can u give simple program to understand the Non Peripheral interrupts,

    Thanks Mark,

  • Hello S.,

    The example linked to above should have all the initialization code necessary to use the Timer1 interrupt including setting the IER register.  Brett Larimore also recently responded to a post regarding the IER register for the F2812.  Make sure to get the example code from the F2812 product page which contains the cpu_timer project which was modified for the example project using the Timer1.

    Best Regards,

    Mark-