TI论坛
直播中

李林

7年用户 1186经验值
私信 关注
[问答]

请问HRCAP是不是只能捕捉一个高/低脉冲?

能不能像eCap那样捕捉一个边沿,然后保持住边沿时刻?
因为我看user manual中对HRCAP讲得很初略,其中说,HRCAP的counter会在任何一个边沿跳变的时候就归零,这样就没办法测量经过n个脉冲后的时间了吧?
不知道我有没有说清楚,谢谢专家解答!

回帖(1)

笪琳琳

2018-11-6 10:14:07
您说的是F2806x么?你的理解是对的,这和eCAP是不一样的。
When a rising edge is detected, the value in HCCOUNTER is captured into the 16-bit HCCAPCNTRISE0
register before the counter resets to 0. When a falling edge is detected, the value in HCCOUNTER is
captured into the 16-bit HCCAPCNTFALL0 register before the counter resets to 0.
The HRCAP capture registers include a 2-deep FIFO buffer to store two pulse widths’ worth of data.
When a rising edge event occurs, HCCAPCNTRISE0 is loaded with the pulse width data from the last
falling edge to the current rising edge (low pulse width). At the next rising edge event, the value in the
HCCAPCNTRISE0 register is loaded into HCCAPCNTRISE1.
When a falling edge event occurs, HCCAPCNTFALL0 is loaded with the pulse width data from the last
rising edge to the current falling edge (high pulse width). For falling edge events, the HRCAP logic
operates such that the HCCAPCNTFALL0 register value is then loaded into the HCCAPCNTFALL1
register at the next rising edge event rather than waiting until the next falling edge event.
                                                                         如果您认为此问题已被解答,请在“这是否解答您的问题” 后,点击“是”按钮! 谢谢您的合作!
举报

更多回帖

发帖
×
20
完善资料,
赚取积分