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.

[参考译文] TMS570LS1227:在 TMS5701227上的 ECAP 模块上读取引脚状态

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1366305/tms570ls1227-read-pin-state-on-ecap-module-on-tms5701227

器件型号:TMS570LS1227

工具与软件:

您好!

我目前正在成功地使用 TMS570LS1227上的 ECAP 模块来计算 PWM 信号的频率(我在全部6个 ECAP 引脚上进行此操作)。 有时、PWM 信号将钳位高电平(值永久设置为1)或钳位低电平(设置为0)。

我想能够读取这些情况下的引脚状态、但我无法在 ECAP 模块中通过任何方式实现此目的。 我能想到的唯一解决方案是将该引脚重新编程为 GPIO 以读取值、然后再将其编程回 ECAP。  

有没有更好的方法可以做到这一点? 我还想过可以完全忘记使用 ECAP 模块和使用 HET 模块来计算信号的频率、但对于6个 PWM 信号中的某些信号、无法将引脚配置为 HET、因此这不是选项。

此致、