AnsweredAssumed Answered

Encoder mode - Prescaler or external trigger filter

Question asked by renaudet.maxime on Aug 21, 2014
Latest reply on Aug 21, 2014 by Clive One
Hi everyone,

I've been working on the STM32F4 and I would like to count pulses from some odometer.

There are two types of odometer, the ones that output two signal in quadrature and the other that output pulse on a signal and a level for the direction (high for forward & low for backward).

I would like to process these 2 types of odometers the same way and that would be possible if the encoder mode of the timers would let me count only on one type of edge (either rising or falling). But it seems that encoder mode always counts rising & falling.

So I tried to use IC-prescaler and had no chance with it.

And even External Trigger Filter does not seem to work. That would have been perfect according to the documentation "The digital filter is made of an event counter in which N events are needed to validate a transition on the output", requiring 2 events to count 1.

Does anyone have an idea ? Otherwise, I would be forced to use interrupts to count pulses and that would take to much CPU time.