This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC1352R1: Clock synchronization between sender and receiver devices over the air

Part Number: LAUNCHXL-CC1352R1

I am working on a "Basic RX and TX lab exercise" which is available at SimpleLink Academy for CC1352R1 under the following link:

https://dev.ti.com/tirex/explore/content/simplelink_academy_cc13x2_26x2sdk_4_30_02_00/modules/prop_rf/prop_01_basic/prop_01_basic.html 

This is a Proprietary RF example for sending and receiving packets between two CC1352R1 devices. In this example I want to enable time synchronization between the transmitter and receiver. I designate the transmitter device as a master and the receiver device as a slave and I want to synchronize the slave clock to the master’s clock. In a SimpleLink Proprietary RF User’s Guide I saw a method of synchronizing the clocks under the following URL:

https://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/3.30.00.03/exports/docs/proprietary-rf/proprietary-rf-users-guide/proprietary-rf/time-synchronization.html#equation-eq-process-offset

This manual provides snippets of the code for both the sending and receiving devices so that the clocks are synchronized. Just want to ask if I should just copy and paste these snippets of code into the firmware of my "Basic RX and TX lab exercise" mentioned above to synchronize the clocks of RX and TX devices? If not, then how can I use the method given in the user manual to synchronize the clocks in my Basic RX and TX lab exercise?

Second, how can I validate the correctness when I have achieved clock synchronization between the devices?

Thanks.

  • Please take a look at:

    https://dev.ti.com/tirex/explore/node?node=AC3gpQ7Tp1sF3-kRi0bI7g__pTTHBmu__LATEST

    You will not be able to receive a packet if the synchronization doesn't work as it should. 

  • Hi TER,

    Thanks for your suggestion.

    The example you mentioned is quite similar to what I need. But in this example, after the synchronization, TX device predicts the wake-up events at the RX device based on the time when synchronization happened so that the TX board sends packet exactly at the same time when the RX board expects to receive a packet. If both clocks have a small drift, then the wake-up time will be incorrect after some time and receiver doesn't able to receive packet. That's why I want the RX device to wake up constantly so that no incoming packet is missed.


    However, through this example I have learned how to call up the current timestamp on the TX device via the radio timer using the command "RF_getCurrentTime();" and send it to the receiver periodically. 

    But on the receiving end, I want the RX to wake up all the time and wait for the message signal that carries the timestamp of the TX device, read the timestamp from it and update its current time accordingly. I think I am able to read the timestamp from the received preamble by using the following instruction:

    packetDataPointer = (uint8_t*)(&currentDataEntry->data + 1);

    But I don't know how to update the timestamp of the RX device. Would you please help me finding any command to update the time at the receiver device?

  • Not sure if I'm following you.

    The aim of the example I sent link to is to keep time sync.

    But what you describe is more sniff mode (https://dev.ti.com/tirex/explore/node?node=AC8dFS1odnrEsX3iaEoaEQ__pTTHBmu__LATEST) where the radio goes up to check if something is on the air at given intervals. What are you going to use the time stamp for in this case?

    Please draw a figure showing both the RX and TX side and how you plan for them to be in sync.