2019-08-25 06:07 PM
STM32 timers can decode quadrature signals.
STM32 timers can count external pulses.
can STM32 timers do pulse counting AND take counting direction from a second external input?
my current solution (on an STM32F303CB/CC, but also F103) is to let the timer count rising edges of the step signal and set the timer's counting direction in the handler function to an external interrupt on the direction signal.
to illustrate what a stepdir signal looks like and what it represents, I've taken attached a picture from http://support.motioneng.com/Technology/SynqNet/pulse_logic.htm and put a red rectangle around the step and dir signals (ignore cw/ccw graphs).
2019-08-25 11:32 PM
> can STM32 timers do pulse counting AND take counting direction from a second external input?
No.
JW
2020-10-11 02:05 AM
Hello! Im trying to do the same thing right now.
>my current solution (on an STM32F303CB/CC, but also F103) is to let the timer count rising edges of the step signal and set the timer's counting direction in the handler function to an external interrupt on the direction signal
Could you please explan how you exactly are you doing this? My idea was to use External Clock mode and change the direction UP/DOWN by reconfiguring the Timer.