cancel
Showing results for 
Search instead for 
Did you mean: 

Enable encoder mode on Ch3 & Ch4 of timer?

JAzri.1
Associate

Hello,

I am assigning pins on a STM32F446 micro in cubemx, and I would like to read 2 encoders.

When selecting Encoder Mode under the Combined Channels dropdown of the timer configuration, it automatically selects ch1 & ch2.

0693W000000X6q4QAC.png

Ch1 of the timer conflicts with other pins I have assigned (and can't easily move around).

Is it possible to do encoder mode on a different pair of channels, say ch3 and ch4, or is there something special about ch1 and ch2?

Also, what is encoder mode? I just presume I should use it to connect encoders, but I don't actually know how it works.

1 ACCEPTED SOLUTION

Accepted Solutions
berendi
Principal

Look for Encoder interface mode in the reference manual. There is a detailed description with timing diagrams, and examples showing how to set it directly through the register interface. It is also explained why it is only available on channels 1&2.

View solution in original post

1 REPLY 1
berendi
Principal

Look for Encoder interface mode in the reference manual. There is a detailed description with timing diagrams, and examples showing how to set it directly through the register interface. It is also explained why it is only available on channels 1&2.