Hello all,
After a great deal of effort, I manged to get 3 devices to synchronise using ptpd+lwip.
What I have found out today is that hardware timestamping does not work despite being enabled:
1) the ptp functionality is enabled in the EMAC, i.e., the 64-bit time registers (sec/nsec) are updated just fine
2) the fine adjustment works as it should, i.e., the slaves' PPS signals are as close as 100ns.
3) The master is offset by as much as 1ms from the slaves.
4) After tests to resolve this issue I concluded that there has to be an issue with the timestamps' timing.
After experimenting I found out that the hardware unit is not doing any hardware timestamping! The relevant dma/buf descriptor control bit is set when the packet is to be handled. If I disable software timestamping from the ptpd part then the packets come out without any timestamps; i.e., when examined with wireshark the timestamps are constant, i.e., do not change and the protocol does not work. However if I do software timestamping then it works to the degree mentioned above.
Any ideas are welcome.
Evrps