This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ANT Time Synchronization Example Understanding

Hello,

could you please explain how the time synchronization works?

What does the function sd_ant_time_sync_broadcast_tx(...) do? Does it include the rtc value of the transmitter into the message that is sent to the receiver when the transmitter sends the message? If this is true, what is the value of the flag byte of the extended data message the receiver receives?

How is the time synchronized? The lower 2 Bytes of the transmitter's rtc is also sent to the receiver as part of the payload and then the receiver does

    comp_chann_val = time_stamp - offset + LED_INVERT_PERIOD;

for what?

Tanks

Parents
  • I think I know what it does, but I think you have to wait for Dynastream to confirm it. It saw that you posted a question on their forum.

    This is what makes sense to me:

    1. sd_ant_time_sync_broadcast_tx() is called with the count of RTC1. When the ANT stack actually sends the packet it will exchange this count with the current count of RTC1 - count = offset.
    2. When the packet is received, the ANT stack will time stamp the count of RTC1, and send it up to the application.
    3. The CC value of RTC1 is set to time stamp - offset + LED_INVERT_PERIOD.

    The flag byte is 0x20, RX time stamp.

    It seems to me that are some (serious) lack in the documentation, but we will see what they say on the Dynastream forum.

    Edit: What they said on the Dynastream forum.

Reply
  • I think I know what it does, but I think you have to wait for Dynastream to confirm it. It saw that you posted a question on their forum.

    This is what makes sense to me:

    1. sd_ant_time_sync_broadcast_tx() is called with the count of RTC1. When the ANT stack actually sends the packet it will exchange this count with the current count of RTC1 - count = offset.
    2. When the packet is received, the ANT stack will time stamp the count of RTC1, and send it up to the application.
    3. The CC value of RTC1 is set to time stamp - offset + LED_INVERT_PERIOD.

    The flag byte is 0x20, RX time stamp.

    It seems to me that are some (serious) lack in the documentation, but we will see what they say on the Dynastream forum.

    Edit: What they said on the Dynastream forum.

Children
Related