@ arthuki -
If you want a simple way to count a pulse width, you have another option besides programming the PRUs. The AM335x device includes “eCAP” peripherals that are actually designed for this purpose, without wasting CPU cycles.
The crude documentation for the interface is at:
In Linux, everything is a file, so you’d just read/write these control files to count pulse widths.
Read more about eCAP in the massive AM335x Technical Reference Manual:
You can also note there is an eCAP module WITHIN the PRU subsystem (PRU-ICSS), so you could use hardware to count the pulse width, rather than software, even on the PRU.
Anyway, if there is significant interest in trying this with BeagleBone, I could probably compile this driver into the kernel if someone would test it out. It was tested back against the 3.14 kernel, but we ship with 4.4 now. I doubt there would be a problem, but you never know unless you test it. I’d have to find a free moment to do this and you might have quicker luck bringing it up on the Beagle list (http://beagleboard.org/discuss).