Measure frequency of a square wave input without PRU?

127 views
Skip to first unread message

Drew Fustini

unread,
Nov 28, 2017, 12:50:59 AM11/28/17
to BeagleBoard
Any suggestion on how to measure the frequency of a square wave input?

 Signal would be 3kHz or less.  The goal is to use the appropriate AM3358 peripherals from the ARM core, not the PRU.

The eCAP peripheral comes to mind but I'm not sure it that would be appropriate for this use case.

For reference, the question comes from this github issue:
https://github.com/adafruit/adafruit-beaglebone-io-python/issues/204#issuecomment-347415768

Jason Kridner

unread,
Nov 28, 2017, 9:44:53 AM11/28/17
to beagl...@googlegroups.com


On Nov 28, 2017, at 12:50 AM, Drew Fustini <pdp7...@gmail.com> wrote:

Any suggestion on how to measure the frequency of a square wave input?

 Signal would be 3kHz or less.  The goal is to use the appropriate AM3358 peripherals from the ARM core, not the PRU.

The eCAP peripheral comes to mind but I'm not sure it that would be appropriate for this use case.

If you know it is a square wave input, the eCAP pulse counting would work well. 


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/5045e3af-ac56-4d54-9cd2-2188059b55d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

thomasl...@gmail.com

unread,
Dec 20, 2017, 6:29:37 PM12/20/17
to BeagleBoard
I wrote a C program that uses inotify to watch the gpioxx/value file.  It can see changes up to 20kHz, so 3kHz should be no problem at all.

thomasl...@gmail.com

unread,
Dec 20, 2017, 6:29:38 PM12/20/17
to BeagleBoard
As far as I can tell there is no support in the Debian kernel for the eCAP feature.  You can use eCAP to output a PWM signal but I can't find anything that supports the eCAP capture feature.


On Tuesday, November 28, 2017 at 8:44:53 AM UTC-6, Jason Kridner wrote:
Reply all
Reply to author
Forward
0 new messages