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.

TMS320F28035: Clock initialization problem

Part Number: TMS320F28035
Other Parts Discussed in Thread: CONTROLSUITE

Dear team:

Routine path:

C:\ti\controlSUITE\development_kits\DRV8412-C2-KIT_v131\Stepper\Stepper.c

When using this routine, my client saw that many state-machines were used in the routine, and the switching of state-machines was related to cputimer。

But he did not see the initialization process of three timers in the code. What is the reason?

  • You might find the below code for CPU timer initialization in Stepper.c

    // Timing sync for slow background tasks
    // Timer period definitions found in device specific PeripheralHeaderIncludes.h
    CpuTimer0Regs.PRD.all = mSec1; // A tasks
    CpuTimer1Regs.PRD.all = mSec5; // B tasks
    CpuTimer2Regs.PRD.all = mSec50; // C tasks

    And checking the interrupt flag of the CPU timer as below

    if(CpuTimer0Regs.TCR.bit.TIF == 1)
    {
    CpuTimer0Regs.TCR.bit.TIF = 1; // clear flag

    }