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

Hello!

I wanna to measure the speed of the dc motor with eCAP which has Hall Effect encoder. Encoder gives 1 pulse per revolution. I am setting 2 capture events in the eCAP module setting and Enabling Reset Counter After Capture Event 1 time-stamp(and Capture event 2 also).

Do you know what kind of output signal eCAP module gives when TS(time stamp) is the output? is it period expressed in seconds?

And is it Period=CEVT2-CEVT1 (like delta time)?

  • Hi,

    The capture result registers will give you a snapshot of the capture timer at the time of the capture events. The time unit is defined by the capture module clock frequency.

    If your clock is 100MHz, then 1 count is 10ns.

    If you setup your capture events with the same polarity, then Period = k x (CEVT2 - CEVT1), assuming no overflow (k function of clock). If one is rising edge and the other falling, you will get half the period.