What I'm looking at here is turning a 16 bit quadrature counter into a 32 bit counter, since ST in their infinite non-wisdom mapped timer2 and timer5 to conflicting I/O such that you can't use both of the 32 bit quadrature counters at the same time. If anyone has other ideas of how to handle the encoder roll-over I'd like to hear them.
[/quote]
would'nt it be possible to use TIM5CH3 and TIM5CH4 instead of TIM5CH1 and TIM5CH2 ?
Quadrature encoder interface callback, does what, exactly?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Quadrature encoder interface callback, does what, exactly?
This repo provides solutions using interrupts: the simple module encoder.py is Pyboard-specific. The hardware solution handles higher frequencies, but the software one allows more channels.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Quadrature encoder interface callback, does what, exactly?
Ok,
I will look to the solution of chaining a second Timer on the overflow signal to keep the HW encoder speed...
I will look to the solution of chaining a second Timer on the overflow signal to keep the HW encoder speed...