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.

[参考译文] DK-TM4C129X:在 T3CCP 输出引脚上生成输出波形

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/584358/dk-tm4c129x-generate-output-waveform-on-t3ccp-output-pin

器件型号:DK-TM4C129X

是否有一个示例演示了如何使用 TI-RTOS/TIVAWare 在计时器 CCP 输出上生成方波?

当然、它应该是有能力的、但我认为我没有正确映射 IO 引脚或正确的计时器配置。

谢谢-

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    TivaWare 中的目录 C:\ti\TivaWare_C_Series-2.1.4.178\examples\peripheral\timer 中提供了一个 TM4C123G 计时器 PWM 示例
    它使用定时器1和 PB5、如果使用 T3CCP1 (Timer_B)、则需要将其更改为定时器3和 PA7、PM1或 PD5;如果使用 T3CCP0 (Timer_A)、则需要更改为 PA6、PM2或 PD4。 当然、您可以去掉该示例中的所有 UART 内容。 对于方波,调用 TimerMatchSet(),其值等于 TimerLoadSet()中值的一半。 如果方波要以恒定频率运行、您可以在调用 BIOS_start 函数之前配置计时器。 如果频率需要更改、您可以在 RTOS 任务中进行更改。