Skip to main content
omid hamdi
Associate III
September 8, 2022
Question

stm32g431 timer encoder mode master slave

  • September 8, 2022
  • 1 reply
  • 1580 views

any one can help me how to used 2 pcs 16bit timer for make one 32bit on encoder mode

need one example for setup timer

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
September 8, 2022

> any one can help me how to used 2 pcs 16bit timer for make one 32bit on encoder mode

You can't. Encoder changes DIR (direction of counting), and that is not propagated through the TRGO-TRGI mechanism to other timer.

So either use 32-bit timer, or do it software - sample the timer regularly and count over/underflows.

JW