This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

maximum QDEC sample frequency

Hi everyone! We're working with the processor nRF51422 with S210 softdevice and we've found an issue about the QDEC sample frequency. In fact, the minimum sample period by configuring SAMPLEPER=0 is 128us, but in our project we have an encoder that reach at its maximum speed, period around 90-100us, and sometimes in this conditions, QDEC can't sample in the correct way. So my question is: is it possible to have a faster sample frequency? For example the half of the current min period of sampling: a period around 64us could be enough for our purpose. Thank you.

  • I see. And the sampling reliability is our initial problem so I think we follow your suggestion and use our external solution, that we have already tested and works good. Thanks again!

  • I'm also wondering about this. Currently working on the nRF52840 and sampling encoder signals from a motor. But since the highest sampling frequency in the QDEC is 128us I can not runt the motor very fast. I would like to see a sampling frequency of at least a few tenths of kHz, that does not seem hard to achieve. Are there any reason for this low frequency limit on the sampling? 

  • Hi 

    The QDEC was designed primarily for handling scroll wheels on mice, which doesn't require a very high sampling frequency. Supporting higher frequencies is not necessarily hard from a design standpoint, but could have implications for power consumption etc. 

    It should be possible to use the TIMER, GPIOTE and PPI modules to sample pulses at higher speeds, but this requires a bit more work on the implementation side to setup the peripherals and decode the results. 

    Best regards
    Torbjørn

Related