BBB fast pulses counter

I want to use BBB as a pulse counter (>50kHz).
Anyone have experience about it?

I haven't done this, but you'd probably need the PRU to do this. There are two Programmable Real-time Units on the BBB SoC; these are smaller 200 MHz processors that you can program directly (no OS), and that run independently of the main processor.

you have two options

  1. Polling from OS using main processor (less accurate and non real time but works fairly good below 1KHz)
  2. Polling with one of the PURs (more accurate and real time)

you can modify the example code at https://github.com/derekmolloy/exploringBB/tree/master/chp13/ultrasonic for your purpose
before using do enable PRU by exporting required device tree provided at https://github.com/derekmolloy/exploringBB/tree/master/chp13/overlay to the slots

Hi Nicola

Oh yeah, that's a good way to do it.