I have a requirement to connect 3+ standard rotary encoders (A/B quadrature) into an STM32 - the STM32L072x is the current choice.
While I could bit-bang it, it would be nice if I can just use the standard STM32 TIMx hardware General Purpose Timer (GPT) counters in encoder mode.
However, the datasheet / programming manual is very vague on anything other than a single encoder connected to TI1/TI2 channels of a timer (EG Timer 2 Channels 1 + 2), the CubeMX software appears to let me hang a 2nd encoder from (for example) Timer 2 Channels 3+4.
This would mean I can (for example) connect;
Encoder 1 --> GPTimer 2 CH1+2
Encoder 2 --> GPTimer 2 CH3+4
Encoder 3 --> GPTimer 3 CH1+2
Is this correct? Has anyone successfully done it?
EDIT: Accepted the correct answer (which is "no you can't"), however it looks like CubeMX actually multiplexed pins, so T2C3/T2C4 are shared with T21C1/T21C2 on the same pins and it was in fact using T21 for the 2nd encoder input.