cancel
Showing results for 
Search instead for 
Did you mean: 

Comparator to encoder configuration?

WA
Associate

I want to route the internal comparators on the STM32G0B1 to the inputs of the encoder module. I can't find a way to do this in CubeMX. When I select "Encoder Mode" in the timer configuration, there is no option to route the comparators to the timer. Is this configuration possible?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

They would be listed in the interconnect section of the Reference Manual. There are some pathways from COMP -> TIM, but none that would enable encoder functionality that I can see. You'd need COMP1->CH1 and COMP2->CH2.

TDK_0-1751390845410.png

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Super User

No, they can't be routed internally to a timer input. You can route them externally using two pins to connect DACx_OUT and TIMx_CHx.

If you feel a post has answered your question, please click "Accept as Solution".

Ok, thanks for the reply. Did you find this documented anywhere or do you just know from experience?

TDK
Super User

They would be listed in the interconnect section of the Reference Manual. There are some pathways from COMP -> TIM, but none that would enable encoder functionality that I can see. You'd need COMP1->CH1 and COMP2->CH2.

TDK_0-1751390845410.png

 

If you feel a post has answered your question, please click "Accept as Solution".