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

QDEC missing sample

Hello:

I am using the nRF52832 DK, QDEC peripheral. We are developing an encoder for a customer and are using the DK for development. Since our encoder is not ready yet, I am using the encoder simulator in the QDEC example to generate a forward movement. I modified the example to generate an event on every sample. I set the pulses on the encoder simulator to 4 to generate the following AB states: 00 01 11 10 00. I expected to see 4 samples with a value of one each as follows:

00->01 - SAMPLE=1 (increment)

01->11 - SAMPLE=1 (increment)

11->10 - SAMPLE=1 (increment)

10->00 - SAMPLE=1 (increment)

Instead, for the last sample, I am seeing SAMPLE=0. When I reviewed the documentation for the SAMPLE register, it states that all the above state changes should be increments, but the last one is no change.

My settings are:

QDEC_CONFIG_REPORTPER=NRF_QDEC_REPORTPER_DISABLED

QDEC_CONFIG_SAMPLEPER=512us

QDEC_CONFIG_LEDPRE=100us

The scope trace is:

Thanks!

Parents Reply
  • Hi, Kenneth:

    I increased the sampling to 256 us and left the LEDPRE at the same value of 100 us and the expected A pulse was not generated, so I am not sure why. If anybody has seen missing pulses with the original settings that I stated in the original posting, please let me know. Also, if anybody sees an error in the settings or if I need to post more information, please let me know.

    Thanks all.

Children
Related