Dear Team,
what is the way to do it in Zephyr?
I have a signal up-to 10kHz, what is the best way to keep the counter in the background?
Thank you and best
Oleh
Dear Team,
what is the way to do it in Zephyr?
I have a signal up-to 10kHz, what is the best way to keep the counter in the background?
Thank you and best
Oleh
Hi.
You can use Zephyr's GPIO driver to configure interrupts.
Have a look at the documentation here.
Best regards,
Didrik
Hi Didrik,
thank you, I'm new to Zephyr so trying to map my nrf knowledge to zephyr
To complement and test the counter on gpio, I thought to put the second DevKit board into generation mode. Could you please point on the right track with how can the generation on-off be done in background on Zephyr?
thanks & best
Oleh
Hi Didrik,
thank you! will try all of it
Best regards
Oleh
Hi Didrik,
thank you for the suggestion, It is clear with the pwm part, got it working.
what i am not able to catch is the sensing that frequency on the input part. Tried the gpio to config in input, then reading buffer, seems ok to get bits 0s/1s but somehow to get to the frequency not... i’m stuck.
May I ask you for a snippet?
thank you!
best
Oleh
Hi.
Here is the code I used to count pulses. It does not calculate the frequency, but that should be easy to do if you see how many pulses you get per unit of time.
Best regards,
Didrik
Hi, thank you!
Just a short confirmation question: can I use Gpiote/PPI in Zephyr with nrf91?
Best
Oleh
Yes, you can use GPIOTE and DPPI on the nRF91.
It looks like Zephyr's GPIO driver uses GPIOTE internally.
The PPI trace sample works with both nRF91 and nRF52 and might be a good starting point on how to use DPPI.