2026-05-11 4:38 AM - last edited on 2026-05-11 4:43 AM by mƎALLEm
Hi,
I am using two rotary encoders on an STM32U5G9ZJT.
Currently I have:
- TIM8_CH1 and CH2 available
- TIM3_CH3 and CH4 available
I know that standard encoder mode uses CH1 and CH2.
CubeMX shows options like:
- Encoder Mode (with remap CH1/CH2)
- Encoder Mode + Index (with remap CH1/CH2 + ETR)
My encoders are simple mechanical rotary encoders.
Question:
Should I use "Encoder Mode with remap" to map CH3/CH4 to CH1/CH2,
or is there any benefit to using "Encoder Mode + Index"?
Is there any difference, If I use "TIM8 in encoder mode" or "TIM3 encoder mode from remap"
Thanks!
2026-05-11 7:56 AM
There's no point using the "Encoder+Index" mode if you don't have an encoder with an index output.
You cannot use TIMx_CH3/CH4 for Encoder. Fullstop.
JW