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.

[参考译文] MSPM0G1507:查找当前比较器事件与上一个事件之间的周期

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1453988/mspm0g1507-find-the-period-between-the-current-comparator-event-and-the-previous-one

器件型号:MSPM0G1507

工具与软件:

我想问一下、是否有一种简单的方法可以将比较器与计时器连接起来、以便每当比较器的输出出现上升沿时、计时器上的捕获事件就会被触发、并保存比较器事件的时间戳。

例如、第一个上升沿发生、它触发捕获事件、将计数器的计数器值存储到捕获通道、然后我对该通道进行读取并将其存储到局部变量中。 下一个上升沿触发另一个捕获事件、该事件存储我读取到局部变量的计数器值。 然后、我可以减去这两个值、并找出相对于第一个上升沿发生的第二个上升沿所需的时间。

我找到了这个 例子 、但不确定是否有更好的方法  

谢谢 Calex