2024-07-04 02:43 AM
Heyho,
any PTP specialists around here?
I'm currently working with a new board using the H733 with a KSZ8863RLL ethernet PHY, and I have a strange PTP synchronization problem:
If a board with a KSZ8863 is the PTP master, no slave can synchronize.
The slave's filtered "offset from master" is always increasing, whereas when sync is working this value is getting closer to 0.
As soon as the master is one of my other boards using a LAN8742 PHY (H735, H723, F767), all boards sync perfectly.
I have checked and compared the PTP messages from the master in Wireshark, and I can see no difference between the masters' messages.
The thing is that this is hard to debug on that level, as we're talking about timings < 100µs.
I have checked all clocks, settings, played with the filters and the servo, no chance.
What could be the difference between the PHYs which affects the PTP master output?
Thanks in advance.
Solved! Go to Solution.
2024-07-18 08:27 AM
Got it! :smiling_face_with_smiling_eyes:
So the KSZ8863 takes a little longer to transmit data, compared to the LAN8742, about +15 µs.
Combine this with a too low maximum addend adjust value in PTPd and it will never sync.
So the solution was to use a higher maximum addend adjust value.
So simple... and I've been through the complete PTPd. At least I know it much better than before now...
2024-07-08 09:55 AM
Anybody having at least a good guess, at least with some PTPd / lwIP or KSZ8863 experience?
2024-07-08 02:05 PM
There should be some difference. Maybe, KZ adds some trailers to the packets that are invisible in wireshark but break the receiving side.
2024-07-09 04:00 AM
Thanks for the reply!
Well, it shouldn't add any bytes or so in simple PHY state.
The funny thing is, that the receiving part is probably not the problem, because a PTP slave with KSZ syncs perfectly to a PTP master with LAN8742.
But when the PTP master is using the KSZ, then the slaves can't sync, so I assume this should be seen in Wireshark.
2024-07-18 08:27 AM
Got it! :smiling_face_with_smiling_eyes:
So the KSZ8863 takes a little longer to transmit data, compared to the LAN8742, about +15 µs.
Combine this with a too low maximum addend adjust value in PTPd and it will never sync.
So the solution was to use a higher maximum addend adjust value.
So simple... and I've been through the complete PTPd. At least I know it much better than before now...