Measuring pulses on a GPIO pin above 2.66MHz. Is it possible?

Hello,

We are currently working on a project where we need to sample a frequency input on a GPIO pin up to 6MHz. I have tried GPIOTE and TIMER with a PPI channel, but can only get readings up to 2.66MHz. I also tried a software interrupt with absolutely nothing else running, but can only get up to 160KHz.

Looking through devzone I've seen others say that 2.66MHz is the limit, but I would like verification from Nordic. Is there any other way to do this?

This is with a 52840 on SDK 17.

Thank you.

  • When someone tried the reverse, That is to get an output pulse as fast as possible on the GPIO using the same GPIOTE+Timer+PPI, I think they managed to get 8 MHz stable pulse on this chip. That was without any interrupts enabled. 

    In your case, when the the pin is Input, then many other factors come into picture as well.

    • Sampling polarity.
    • Different propagation path of the signal as compared to being an output.
    Looking through devzone I've seen others say that 2.66MHz is the limit, but I would like verification from Nordic. Is there any other way to do this?

    I do not think we can give an official answer for this as we have not done any regression test for this specific use case which uses application specific combination of peripherals. The propagation of signal's path might vary between peripheral to peripheral also from instances to instances within the peripherals.

Related