Help debugging ptp

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
User avatar
gerrykurz
XCore Addict
Posts: 204
Joined: Sun Jun 01, 2014 10:25 pm

Help debugging ptp

Post by gerrykurz »

Hi,

I need some help debugging why the same application code running on two different platforms will enumerate in one case and not the other on a MAC.

Looking at the ethernet traffic with wireshark, it appears that in one case the ptp protocol completes correctly with the MAC issue a ptp announce message while in the other case it does not.

My application code is based on the AVB endpoint code base and the ptp section has not been modified.

Can someone help me go step by step through the ptp initialization process to see where it is failing?

Here is the wireshark capture of a successful enumeration process:



Image

Here is the unsuccessful one:

Image


voodoosound
Active Member
Posts: 63
Joined: Sat Oct 15, 2011 8:53 pm

Post by voodoosound »

Hi,

try to increase PROPAGATION_DELAY_THRESHOLD_NS. (its not spelled right, I have no code here...)
This can keep the gPTP in reset state, because the threshold is too low.

BR,
Ck
User avatar
gerrykurz
XCore Addict
Posts: 204
Joined: Sun Jun 01, 2014 10:25 pm

Post by gerrykurz »

Thanks, I will try that but why would it work on one platform and not another, running exactly the same code?
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post by Andy »

Do both hardware platforms use the same Ethernet PHY? The timestamps coming from the Ethernet MAC must be corrected for the ingress and egress latency through the PHY and this varies with different PHYs.

gPTP constantly measures the path delay between it and its neighbour - if this measured value is greater than 800 ns it will not enable gPTP on the link.
User avatar
gerrykurz
XCore Addict
Posts: 204
Joined: Sun Jun 01, 2014 10:25 pm

Post by gerrykurz »

Yes both platforms use the same PHY, the Microchip 8710.

One platform is the slice kit board, the other is our design based on the slice kit board.

The ethernet MAC-PHY interface is the same on both designs.

So it sounds like what you are saying is that it is the XMOS gptp that is potentially disabling the gptp link, not the MAC OSX which is the neighbor.

I was under the impression that the MAC OSX was not enabling the gptp link.

This still doesn't explain the hardware platform dependancy...
User avatar
gerrykurz
XCore Addict
Posts: 204
Joined: Sun Jun 01, 2014 10:25 pm

Post by gerrykurz »

I can't find anything even closely like PROPAGATION_DELAY_THRESHOLD_NS in the AVB endpoint code V5.2.1
User avatar
gerrykurz
XCore Addict
Posts: 204
Joined: Sun Jun 01, 2014 10:25 pm

Post by gerrykurz »

gPTP constantly measures the path delay between it and its neighbour - if this measured value is greater than 800 ns it will not enable gPTP on the link.
Where does this happen in the code?
User avatar
gerrykurz
XCore Addict
Posts: 204
Joined: Sun Jun 01, 2014 10:25 pm

Post by gerrykurz »

Is someone available to help me understand and debug the wireshark captures?
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post by Andy »

I recommend you upgrade to firmware >=6.0.7 as this is the AVnu compliant firmware. The gPTP correction mentioned is only applied in this later version of the firmware.