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

Frequency Measurement

Hi,

I am relatively new to C coding, and need to use the NRF52832 for a school project. I need to write a program that measures frequency from a GPIO pin. From what I've gathered, I need to create a PPI channel with a GPIOTE event on rising edge linked to TIMER counting task. Which examples would be best to look at to get a grasp of what I need to do? I've been scouring the infocenter and the PPI/GPIOTE/TIMER examples and it's just not clicking. Any advice or direction will be super helpful, I have definitely been thrown into the deep end with this project.

Thanks so much in advance

Parents
  • Take a look at the answer given in this thread, where the frequency is measured by using multiple PPI channels, two TIMER's and the GPIOTE peripheral. I don't think we have any examples doing this in the SDK, but It shouldn't be too difficult to create it yourself.

    I would recommend you to follow this approach:

    • Understand how the PPI works
    • Understand how the GPIO and the GPIOTE works
    • Understand how the TIMER works
    • Take a look at the GPIOTE example and the PPI example and understand how they work
    • Implement the solution based on the drawing and code given in this thread

    If you encounter any problems along the way, please ask! I will assist you till you have a complete solution.

    Best regards,

    Simon

Reply
  • Take a look at the answer given in this thread, where the frequency is measured by using multiple PPI channels, two TIMER's and the GPIOTE peripheral. I don't think we have any examples doing this in the SDK, but It shouldn't be too difficult to create it yourself.

    I would recommend you to follow this approach:

    • Understand how the PPI works
    • Understand how the GPIO and the GPIOTE works
    • Understand how the TIMER works
    • Take a look at the GPIOTE example and the PPI example and understand how they work
    • Implement the solution based on the drawing and code given in this thread

    If you encounter any problems along the way, please ask! I will assist you till you have a complete solution.

    Best regards,

    Simon

Children
No Data
Related