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.

ECAP捕获在分频计脉冲数出现问题



  寄存器设置情况:

SPLK #0000000110101010B,ECCTL11
SPLK #0000000011010000B,ECCTL12

CAP1连续捕获,不分频情况下,计数正常,10分频时,上电复位后第一次发2个脉冲就计1次数,后面正常,发10个脉冲计一次数。

只在上电后第一次发有这种情况,如果第一次发12个脉冲,会计2次数。其他分频倍数也有一样的问题。

计数在通过循环扫描ECFLG.BIT1的标志位来确定的。