On Fri, 15 Dec 2017 09:05:30 -0800 (PST),
thomasl...@gmail.com declaimed the
following:
Which "BBIO"? PyBBIO or Adafruit_BBIO?
Based upon the documentation for the latter -- it is not a "frequency"
measurement but a counter (up/down) based upon the transitions of a
quadrature signal (ie; TWO square waves 90 deg out of phase). PyBBIO docs
look to be similar.
A quick Google seems to lean towards either kernel module with
interrupts on GPIO pins, or using the PRU for a tight-loop counter, if
accuracy is needed.
If some irregularity is acceptable, user-mode GPIO loop may be okay --
though probably by memory mapping the GPIO pins rather than using the sys
filesystem access. And both of these will likely not be fast enough if
using interpreted Python.
Unfortunately, the PWM modules in the Python libraries are designed
solely for PWM output -- even though the eCAP hardware is part of the PWM
hardware. cf: TRM SPRUH73P section 15.3.3.1
https://e2e.ti.com/support/embedded/linux/f/354/t/399439 seems to imply the
eCAP could be accessible via the sys filesystem (but may need some work).
That could make the latency issue moot, if you can trigger a one-shot
capture (for four time-stamps?) and then read the time-stamps later to
compute frequency. OTOH,
https://e2e.ti.com/support/arm/sitara_arm/f/791/p/393325/1388948 implies
the kernel doesn't support eCAP...
--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/