You are here

BLE synchronization with phone: Clock skew and Berkeley algorithm | Cypress Semiconductor

BLE synchronization with phone: Clock skew and Berkeley algorithm

Summary: 2 Replies, Latest post by zadek on 21 Jul 2015 09:43 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_460593777's picture
19 posts

Hi guys,

I am looking into how to synchronize multiple clocks running on PSoC 4 BLE devices and one smartphone, where all device are connected to one smartphone which acts as the BLE master. The goal is to minimize phase differences, and from a user experience standpoint, the start time can be delayed by some not noticeable amount if necessary.

I am reaching out to the community because I am not sure what the best approach is to implement such a synchronization with BLE devices. Here are the alternatives I found:

1. CheepSync

To be found here (free PDF download):

CheepSync is a closed source algorithm used to synchronize BLE devices, developed at the Indian Institute of Science by Sridhar et al. Has anyone of you heard of this one or has any experience of how well this would work?

In the paper, it is stated that a one-to-many setting can be synched, and it all looks like they solved the entire problem.

2. Berkeley Algorithm

The Berkeley Algorithm is probably a much simpler approach to the problem: The timestamps of the device clock are sent to the master (smartphone) device in a steady interval. With the assumption that the latency is equal to 1/2 of the roundtrip time, the timestamps are corrected to reflect the actual points in time when they occured.

The corrected timestamp values (including that of the phone) are averaged, and the positive or negative clock skew correction (timestamp – average) is calculated and sent to the devices. The device then applies the correction by gradually slowing or accelerating the clock.

The problem here is that I tried to implement it but got stuck at the part where the clock skew correction is applied by slowing or accelerating the clock in a gradual manner. So I can't actually say if this works. Can you?

3. A totally different approach

Can you think of one?


I'd be very grateful of any insights on how to synchronize BLE devices.

Thanks a lot in advance, I know, this forum is awesome


BMAH's picture
Cypress Employee
189 posts

 Hi Julian,

We would like to clarify one point. Are you expecting to maintain connection with muliple PSoC 4 BLE based devices at the same time with the smartphone? 

At a time, we can only maintain connection with one device. But, you can implement a time multiplexed central. Please check:



user_460593777's picture
19 posts


yes, I plan to connect multiple devices to one smartphone. On iOS this is possible (up to about 10 devices) and already working. The PSoC 4 devices have a peripheral GAP role and are GATT servers. How comes it's still working? I think we're connecting to them in a sequential manner. 

Log in to post new comments.