I need to count the transitions of a 60MHz binary signal using a BBB. How can I read the value of TIMER (TIMER4, TIMER5 or etc)? How can I retrieve the value of the timer? I’m using the latest Ubuntu Linux for BeagleBone, kernel 4.19.94-ti-r42
60 MHz is not that slow. It seems to be no task for the ARM CPU, which may miss some transitions due to heavy interupt loads.
Instead, it sounds like a task for the PRUSS.
Why do you think you’ll need a TIMER subsystem (controlled over the L3 bus with some latency)? Isn’t a fast PRU-GPIO the better (more flexible) solution?
I am new to the BeagleBone and i don’t know how to use PRU for measure the frequency.
I would be glad to see an example of how to do this.
If you don’t want to
, but want to
then it’s best to use the eCAP module in the PWMSS [0-2] subsystems. Unfortunatelly that’s not well supported in the kernel. Find examples at
https://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/_cha_examples.html#sSecExaPwmCap
and
https://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/_cha_examples.html#sSecExaPruToggle
Or, in order to measure the frequency, you can also use the eQEP module in the PWMSS subsystems [0-2] in single pin input mode, which (AFAIK) isn’t kernel-supported at all. Find details at
https://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/_cha_pins.html#sSecQep
Regards
Thank you. This looks like what I need. But I have problems installing this library (i use this guide https://github.com/DTJF/libpruio/blob/master/src/doc/_2_preparation.md ( GIT #### {#sSecGet_Git}) cmakefbc not working (but i installed FreeBASIC)).
Are there other libraries for working with pru?Are there any other installation guides for libpruio?