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

SDK15.3.0: Counting Rising Edges only for 1 ms using the GPIOTE example

I am using the gpiote example in the peripheral folder as a base project which works as is. I can see that the example is counting rising edges properly matching the frequency on my scope in a continuous way; however, I am struggling to change it to satisfy the following requirements:

- Fire the timer_handler_read event on demand from a button press.

- Get count of the rising edges that occurred for 1ms

- Average out 5 sampling counts for accuracy

Thanks

Related