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:时钟初始化问题

Guru**** 2552770 points
Other Parts Discussed in Thread: CONTROLSUITE

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1005796/tms320f28035-clock-initialization-problem

器件型号:TMS320F28035
Thread 中讨论的其他器件:controlSUITE

尊敬的团队:

例程路径:

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

使用此例程时、我的客户端看到例程中使用了许多状态机、并且状态机的切换与 cputimer。相关

但他没有看到代码中三个计时器的初始化过程。 原因是什么?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您可能会在  Stepper.c 中找到用于 CPU 定时器初始化的以下代码

    //针对缓慢后台任务的定时同步
    //器件特定 PeripheralHeaderIncludes.h 中的定时器周期定义
    CpuTimer0Regs.PRD.All = mSec1;//任务
    CpuTimer1Regs.PRD.All = mSec5;// B 任务
    CpuTimer2Regs.PRD.All = mSec50;// C 任务

    并检查 CPU 计时器的中断标志、如下所示

    if (CpuTimer0Regs.tcr.bit.TIF = 1)

    CpuTimer0Regs.TCR.bit.TIF = 1;//清除标志