I would like to count an external pulse stream with an internal hardware counter. The pulse stream clocks the hardware counter; the hardware counter will be interrogated periodically to calculate an input rate.
The pulse stream is connected to pin GPIO24/ECAP1/EQEP2A/SPISIMOB.
The signal is not quadrature so I don’t see how to use the EQEP module.
I’ve also looked at the ECAP documentation and don’t see how it can be configured to just count pulses in a hardware counter.
Given the signal comes in on this pin, any ideas to count the pulses? Either count one edge, or better yet count both edges: pulse high transition= count++, pulse low transition = count++;
Is taking an interrupt on the pulse edge the only method?
Thanks.