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.

Synchronization over Network TM4C129EXL



Hello,

I have some TM4C129EXL devices connected in a local area network. What I would like to achieve is a kind of synchronization between multiple network nodes. For example:

  • I would like to start an ADC conversion on each network node simultaneously and acquire the data in another node. How can I achieve the less delay btw. each node?

I suppose UDP broadcast could be handy and much more better then TCP.

  • Can I get maximum 1ms delay btw. each node using UDP?

But right now I don't have any experience network synchronization I would like to ask you some good idea what tools or algorithm are available for this purpose. I read about SNTP but as I understand it doesn't fit for my need. Is there any tool in TI RTOS that I can use?

Or can you recommend any good sources that I should read first?

Thank you for your info,

  • Hi Daniel,

    I haven't heard about any network synchronization tools or algorithms. We certainly don't ship any in TI-RTOS.

    About UDP and TCP: Yes, UDP is certainly faster than TCP as it has lesser overhead but it is not guaranteed to reach the endpoint. Also, the time it takes depends on the network bandwidth and intermediate routers. So, it is hard to guarantee a max delay.

    Can I know the purpose of the received data? Why should it reach within 1 ms? Are you trying to synchronize the nodes with the data?

    If you are just sending the data from different nodes to a central node for post processing and would like to know the time when the data was sampled, I would recommend setting up time on each node and syncing them to a NTP server using SNTP client. This way the time on all the nodes are same. You could then time-stamp all the acquired ADC data and send it to your central node (or any other node) for post processing.

    Vikram
  • Dear Vikram,

    Thank you for your reply. On each individual node, ADC conversion in done with about 2ms conversion delay. Each node after sampled enough data transfers a small chunk data to a central node for further processing. These "slave" nodes are doing the conversion simultaneously. The central node is responsible for receiving data chunks and make any kind of synchronization that makes the slave nodes to do the conversion as parallel as possible. What I would like to achieve is to guarantee the slave nodes must work together as much as possible.

    I read about NTP,but not in context of TI RTOS. Is it available in RTOS? Is there any detailed description about this service? Or any example of that? 

    Time-stamp sounds good, but only if there is any kind of sync. btw. the nodes.

  • Hi Daniel,

    From your description, I think SNTP and time-stamping are what you are looking for. SNTP is a protocol which can be used by individual nodes to keep the system time in sync with a NTP server (which can be running on the central node or a server on the internet). This is the same protocol that your PC uses to keep the system time in sync. We do have support for SNTP client in TI-RTOS but not for the NTP server.

    There are no specific examples for SNTP but the "httpsget" example in "TI-RTOS for TivaC 2.16.01.14" uses SNTP. You can copy the "startNTP()" function and all its dependent functions from "httpsget" example to your application. The "startNTP()" syncs the system clock in TI-RTOS with the NTP server from "pool.ntp.org".

    For time-stamping your ADC conversions, you can use "Seconds_get()" API. This API is from TI-RTOS Kernel for getting the current time in seconds from the system clock.

    Hope this helps,
    Vikram
  • Hey,

    Happy to read your reply again. Thank you for your support. My question is, how precise the SNTP? I mean, what is the smallest unit of time that I can reach with SNTP? sec? or ms?
  • It's in seconds.

    Vikram

  • Thank you. That should be fine. I will check it out.

    All the best,