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.

Do you have the same feel as me that the QCAP submodule in the eQEP of Piccolo is " chicken ribs " - tasteless when eaten but a pity to throw away

For a generic motor drive the pulse frequency output from an encoder can vary in a very broad range as both the encoder LPR and the speed of the motor varies. But the 16 bit counter is too short that make the measurable range either too tight or too rough:

  Motor speed range with different encoder LPR
SYSCLKOUT Prescale Position pulse  freq range 256 512 1024 2048
120000000 Min Max Min Hz Max Hz Min Hz Max Hz Min Hz Max Hz Min Hz Max Hz
QCAP Counter Max 1 1831.082628 1200000 1.788166629 1171.88 0.894083 585.9375 0.447042 292.9688 0.223521 146.4844
65535 2 915.5413138 600000 0.894083314 585.938 0.447042 292.9688 0.223521 146.4844 0.11176 73.24219
QCAP Counter Min 4 457.7706569 300000 0.447041657 292.969 0.223521 146.4844 0.11176 73.24219 0.05588 36.62109
100 8 228.8853285 150000 0.223520829 146.484 0.11176 73.24219 0.05588 36.62109 0.02794 18.31055
16 114.4426642 75000 0.111760414 73.2422 0.05588 36.62109 0.02794 18.31055 0.01397 9.155273
32 57.22133211 37500 0.055880207 36.6211 0.02794 18.31055 0.01397 9.155273 0.006985 4.577637

Even the feature that QCAP timer is reset on every position unit is driven me crazy, which mean the interrupt must be enabled to save each position unit period or it will be overwritten. But how to handler a interrupt frequency up to 250KHz or even more?

I personally strongly suggest TI to extend the QCAP timer to 32 bit and add an option to not to reset the timer on position unit event, which will make the eQEP module much more flexible and powerful.

  • Hi,

    I agree with your analysis of timings. If you do not want software interrupts for every edge, but values have to be time stamped and buffered without resetting the counter - then you may need to pass the same signal to ECAP module for capturing the edges.
    Note that ECAP can capture up to 4 edges.

    -Bharathi.