cancel
Showing results for 
Search instead for 
Did you mean: 

8 timers of 2 Stm32f7 Synchronization

Nmo.1
Associate III

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?

8 REPLIES 8

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

Please elaborate.

JW

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.

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

Are the encoder pulses in your 50/51 ms case actually phase aligned? And at a frequency in sync with the sampling? Are you sure that's not a fence-posting issue?

The same clocks divided down may not be phase aligned, the prescaler isn't guaranteed to be in the same initial state, and can be complicated if the encoder signal can rotate in either direction.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Nmo.1
Associate III

O.K.

Yes, they are Nucleo Boards and I can use HSE.

I try to use an external oscillator and see what happens. Maybe with the same oscillator, they work correctly.

Then I will use common synchronization pulse to synchronize the timers in a board together.

Nmo.1
Associate III

Hi,

I have a Stm32f091rc and 2 F767zi nucleo board. I want to use the f091rc as external clock source. (MCO)

0693W00000HopYWQAZ.pngAs you see in data sheet it is written I need to remove jumpers SB112 and SB149 and solder a jumper on SB148. It is written also : SB8 and SB9 removed. What does it mean? there is nothing on SB8 and SB9.

0693W00000Hope0QAB.jpg0693W00000HopePQAR.jpg0693W00000HopX0QAJ.jpg

Uwe Bonnes
Principal II

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

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.