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.

[参考译文] TMS320C5505:中断的计时器计数

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/665910/tms320c5505-timer-count-for-interrupt

器件型号:TMS320C5505

尊敬的:

我想生成确切的10ms 延迟。我遵循了我们的 CSL 示例代码。通过.gel 文件将频率设置为100MHz。

在示例代码中、他们计算系统时钟来计算计时器计数、但这样我就不会得到确切的延迟。

我 将按以下方法手动设置它

例如

//计时器间隔10msec
//预分频= 0 (2的偏离)
// 100/2 = 50MHz => 20nsec
// 10msec/20nsec = 50000 (0x7A120)

负载进入

hwConfig.autoLoad = GPT_AUTO_ENABLE;//GPT_AUTO_DISABLE
hwconfig.ctrlTim = gp_t_timer_enable;
hwconfig.preScaleDiv = gpt_pre_sc_DIV_1;
//持续10ms
hwconfig.prdLow = 0xA120;
hwconfig.prdHigh = 0x0007;

这是不是 method..plz 建议我的正确答案。我自一周以来一直遇到这个问题。

请解决这个问题