在使用EQEP用于M/T方法测速时
If the QEPCTL[QCLM] bit is cleared, then the capture timer and capture period values are latched into the
QCTMRLAT and QCPRDLAT registers, respectively, when the CPU reads the position counter
(QPOSCNT).If the QEPCTL[QCLM] bit is set, then the position counter, capture timer, and capture period values are
latched into the QPOSLAT, QCTMRLAT and QCPRDLAT registers, respectively, on unit time out.根据数据手册给说明,将QEPCTL[QCLM]设置为0,在通过CPU连续读4次读取QPOSCNT的值,发现第三次读取的值,比别的3次数据值小于1,不知道怎么回事?请问说明原因导致的
mangui zhang:除了溢出外应该都是后面的比前面的数大
在使用EQEP用于M/T方法测速时
If the QEPCTL[QCLM] bit is cleared, then the capture timer and capture period values are latched into the
QCTMRLAT and QCPRDLAT registers, respectively, when the CPU reads the position counter
(QPOSCNT).If the QEPCTL[QCLM] bit is set, then the position counter, capture timer, and capture period values are
latched into the QPOSLAT, QCTMRLAT and QCPRDLAT registers, respectively, on unit time out.根据数据手册给说明,将QEPCTL[QCLM]设置为0,在通过CPU连续读4次读取QPOSCNT的值,发现第三次读取的值,比别的3次数据值小于1,不知道怎么回事?请问说明原因导致的
guang long1:
回复 mangui zhang:
GlobM_T_Calc.QposcntNumBuf1=EQep1Regs.QPOSCNT;GlobM_T_Calc.QposcntNumBuf2=EQep1Regs.QPOSCNT;GlobM_T_Calc.QposcntNumBuf3=EQep1Regs.QPOSCNT;GlobM_T_Calc.QposcntNumBuf4=EQep1Regs.QPOSCNT;
但是我是连续读取四次QPOSCNT的值,结果是第三次读取的数字都比其它的小于1