Boot Time and Synchronization

herman_schmit
Posts: 1
Joined: Wed Jul 04, 2018 10:32 pm

Boot Time and Synchronization

Postby herman_schmit » Wed Jul 04, 2018 10:48 pm

My problem: I need to have 2-3 ESP32's be tightly synchronized, but I don't think I can afford a wifi or BT transaction to keep them in sync. I want to get them on the same time, and then run them based on their own timers.

NTP is not sufficiently accurate for this synchronization. I need milliseconds.

The simple solution (I thought): I do intend to have all the ESP32's wired to the same supply. Thus, I just rely on the fact that the same software on the ESP32 should boot at exactly the same time from power on. Should just work.

It doesn't. Not by a long shot. My two ESP32s boot at times about 1 second apart, and it is very consistent. One boots fast, the other boots slow.

Question 1: what would create this variation? Is the FLASH behaving differently? Is there a boot loader or something that might be different between my devices. (I am using the Sparkfun ESP32 Thing.)

Other ideas that don't work:
* I tried to read the CCOUNT register, but even though they boot differently, the count is roughly the same. I don't know when CCOUNT starts. Maybe it gets reset by the OS boot. I was hoping it would just start at the first CPU cycle executed, but that doesn't seem to be the case.
* I keep hoping that 1588/PTP would work, but it doesn't

Anybody else have ideas about synchronizing ESP32s?

raskinfe
Posts: 1
Joined: Fri Jun 02, 2023 8:17 am

Re: Boot Time and Synchronization

Postby raskinfe » Fri Jun 02, 2023 8:20 am

Hi, Mr. Schmit, Have you found a way to solve this issue? I face the same problem and was hoping there is another way.

Thank you :)

Who is online

Users browsing this forum: No registered users and 102 guests