PTP on XCore-200 Topic is solved

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
Experienced Member
Posts: 67
Joined: Fri Oct 05, 2018 4:26 pm

PTP on XCore-200

Postby RedDave » Fri Feb 01, 2019 2:32 pm

For the application that I am working on, I need precise (~1us or better) time synchronisation between my device and a customer device. Communication between devices will either be using USB (in which case a custom synchronisation method would be added - unless anyone has suggestions here) or Ethernet. If the latter option is chosen then PTP seems the natural choice for synchronisation.

Our device uses a xCORE-200, with current development being done on an eXplorerKit.

I have found various design guides for AVB which include PTP implementations. These all target XS1 hardware.
I have no experience with the XS1.

Before (or as) I go down the route of importing and dissecting these AVB solutions is there any advice to be had?
  • Is XS1 code likely to be good to go on the xCORE-200?
    Is there a library that I have missed somewhere that implements PTP?
    Anything else I should be cautious of?
View Solution
Experienced Member
Posts: 67
Joined: Fri Oct 05, 2018 4:26 pm

Postby RedDave » Tue Feb 05, 2019 11:04 am

Since I have no response here, I'll report back on my findings for future readers.

The Time Sensitive Networking has what I need. lib_tsn includes the ptp_server that should give me all the functionality that I need.
User avatar
Respected Member
Posts: 416
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Tue Feb 05, 2019 3:06 pm

lb_tsn has PTP but it's not compatible with every 1588 profile. It is 802.1AS which I guess is a particular profile of 1588? Or something to that effect. It uses raw ethernet frames, not UDP like you (or your customer) might be expecting. So it will work with specific NICs (e.g. Intel I210 with the OpenAvnu gPTP code and Macs with thunderbolt ports).

If you need to use UDP you might need to modify the underlying PTP code to work with xtcp or another udp interface (e.g. if you need lighter weight) rather than using raw ethernet frames like lib_tsn. You will probably want to still make use of the timestamping feature of the real time mac I suppose. Perhaps you could port linux ptp to work?? That might not be too hard to get working with xtcp.

Who is online

Users browsing this forum: No registered users and 6 guests