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.

[参考译文] TMS320F280025C:CPU 计时器

Guru**** 2448780 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1214393/tms320f280025c-cpu-timers

器件型号:TMS320F280025C

大家好、大家好

我可以知道如何计算 CPU 定时器的定时器周期吗?

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

    您好!

    CPUTimer_setPeriod (baseperiodCount)函数将 CPUtimer 周期写入 CPUTIMER_O_PRD 寄存器。
    如果我们需要初始化 CPU 定时器、使其具有2s 的定时器周期、或者如果您需要每2秒中断一次、我们需要计算周期计数、如下所示:  
    periodCount = freq * 2
    其中、freq 为  DEVICE_SYSCLK_FREQ (对于 f28002x、为100MHz)
    请仔细阅读 TRM 和 CPU 计时器示例(\driverlib\f28002x\examples\timer)中的32位 CPU 计时器0/1/2部分以了解详情。
    谢谢  
    Aswin