Maximum count speed of timer

I am trying to measure the frequency of the square wave on the ARDUINO_6_PIN on the NRF52840 Dev Kit. 



It seems like it works well until the square wave goes above 2MHz. Is this the maximum speed that this method can achieve or is there something else I need to do, (or another method I could use)?










(My function generator cannot go above 6MHz itself so I generated the square wave on ARDUINO_7_PIN on the NRF52840)

To create this program I started with gpiote peripheral example in the nRF5_SDK_17.1.0_ddde560 and edited the sdk_config.h and the main.c linked here.  (Down below because I am an idiot)


Parents
  • Oops I linked the wrong files, I think those are the original example files.
     

    That should be the updated ones, but your reply seems to agree with my findings. “If you have e.g. a 50% duty-cycle then max frequency will be 16 MHz / (3 low periods + 3 high periods) = 2.67 MHz.” Thanks for the response, I think I will have to figure out a different way to measure that signal.

Reply
  • Oops I linked the wrong files, I think those are the original example files.
     

    That should be the updated ones, but your reply seems to agree with my findings. “If you have e.g. a 50% duty-cycle then max frequency will be 16 MHz / (3 low periods + 3 high periods) = 2.67 MHz.” Thanks for the response, I think I will have to figure out a different way to measure that signal.

Children
No Data
Related