看手册没怎么弄明白,谢谢!是事件发生一次(例如来一个上升沿或下降沿)Mod4计数器就加1吗?
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.
看手册没怎么弄明白,谢谢!是事件发生一次(例如来一个上升沿或下降沿)Mod4计数器就加1吗?
是的,就是CAPX寄存器存一次计数器的数就加1,可以选择加到3就停止,也可以选择清零了再计数,只要没有计满,就一直可以抓计数器的计数值。
The continuous/one-shot block controls the start/stop and reset (zero) functions of the Mod4 counter via a
mono-shot type of action that can be triggered by the stop-value comparator and re-armed via software
control.
Once armed, the eCAP module waits for 1-4 (defined by stop-value) capture events before freezing both
the Mod4 counter and contents of CAP1-4 registers (i.e., time-stamps).
Re-arming prepares the eCAP module for another capture sequence. Also re-arming clears (to zero) the
Mod4 counter and permits loading of CAP1-4 registers again, providing the CAPLDEN bit is set.
In continuous mode, the Mod4 counter continues to run (0->1->2->3->0, the one-shot action is ignored,
and capture values continue to be written to CAP1-4 in a circular buffer sequence.
所以叫one shot模式或者contimus 模式