Page 1 of 1

PTP on XCore-200

Posted: Fri Feb 01, 2019 2:32 pm
by RedDave
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?
Ta,

Re: PTP on XCore-200

Posted: Tue Feb 05, 2019 11:04 am
by RedDave
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.

Re: PTP on XCore-200

Posted: Tue Feb 05, 2019 3:06 pm
by akp
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.