eCAP module and interrupts

Has anyone used the built in eCAP modules on the AM3358?

We would like to use all three eCAPs with interrupt driven counters (registers) to measure three (3) different incoming frequencies. This is something we have done in the past many times with Microchips in assembly, but have not found any examples for the Beagle Bone Black.

  • How do you gain access to the eCAP?
  • What programing environment do you use?
  • Where are hardware interrupts handled with the BBB?

Thank you,
Rodney

libpruio can access all eCAP modules. Currently polling values by function CapMod::Value is supported. You can use it to configure the interrupt registers in the PWMSS, but interrupt handling isn’t supported by libpruio yet.

BR

BR,

This looks great. If I understand libpruio correctly, it uses the eCap registers and interrupts to measure frequency (hardware driven counter), but you don’t have direct access to interrupts. This is perfect, as the only reason we would have needed access to the interrupts was to handle the eCap when the counter overflows, etc. But if libpruio handles all of that, then no need for interrupts.

Thank you, RK

libpruio configures the registers of the CAP modules in the PWMSS and starts measurement (IO mode). Then it checks the results and in case of a new value it makes this value available from user space. You can pull the current values whenever you want, validity can get proven by plausibility checks. In case of an overflow the returned frequency is zero. You can specify a minimal frequency.

BTW: On BBB only two CAP modules are connected to the header pins (P9_28 / P9_42). But you can use the PWMSS QEP modules to measure frequency as well (in libpruio-0.2.2, which I’ll upload when I’ve some time to finish it).

BR