Skip to main content
Nmo.1
Associate III
December 14, 2021
Question

8 timers of 2 Stm32f7 Synchronization

  • December 14, 2021
  • 2 replies
  • 2122 views

Hello everyone,

I have used 2 Stm32f7 nucleo boards to read the data of 8 incremental encoders.

for this purpose, I have used timers. I can read the data of encoders correctly but there is a little bit time difference between timers. it means I need to Synchronize timers of stm32 boards and also 2 boards together.

could you please help me? How can I do that?

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
December 14, 2021

What is "time difference between timers"? If timers are in encoder mode, they don't measure *time*.

Please elaborate.

JW

Nmo.1
Nmo.1Author
Associate III
December 14, 2021

Thanks for your reply.

I have connected an encoder to the two timers of two separate STM boards. For example, the first one shows the encoder value 20 in time 50ms, and the second one shows this value in time 51ms. Because their clock is not synchrony.

Tesla DeLorean
Guru
December 14, 2021

Can the boards share a common clock (HSE)?

Can the boards share a common synchronization pulse? 1PPS ?

Encoders should be able to latch the CNT value into CCR3 or CCR4 based on a common external input, or some internal sources.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Uwe Bonnes
Chief
December 16, 2021

For an asynchronous measurement, always expect +/- 1 uncertainty!

Nmo.1
Nmo.1Author
Associate III
December 16, 2021

Yes exactly I have 1 ms difference. But it is not allowed in my project. So I wanna synchronize the clock. Maybe it solved the problem.