Hi ADI team,
I am using two ADIN2111-based boards connected through the Port 1 10BASE-T1L interface. I am currently trying to bring up a simple IEEE 1588/PTP test over raw Layer-2 Ethernet frames.
I simplified the test to only:
The PTP source sends a PTP Sync frame.
The PTP source reads the ADIN2111 egress timestamp as t1.
The PTP source sends a Follow_Up frame carrying t1.
The PTP receiver receives the Sync frame and obtains the ADIN2111 RX timestamp as t2.
The PTP receiver receives the Follow_Up frame and compares t2 - t1.
There is no Delay_Req/Delay_Resp in this test, and the PTP receiver does not apply any phase correction or frequency correction.
I observed t2 - t1 remains constant between two boards with independent 25 MHz crystals.Here's the details:
Hardware setup
There are two separate boards:
Board A: ADIN2111 used as the PTP source in this test.
Board B: ADIN2111 used as the PTP receiver in this test.
The two boards are connected through ADIN2111 Port 1.
Each ADIN2111 has its own independent 25 MHz crystal source.
The two 25 MHz crystal specifications are approximately ±10 ppm and ±1.5 ppm.
The MCU clocks are also independent from the ADIN2111 25 MHz clock domains.
Because the ADIN2111 25 MHz references are independent, I would expect the free-running 1588 timestamp counters to have a measurable frequency difference over tens or hundreds of seconds, unless some part of the ADIN2111/10BASE-T1L link makes the timestamp counter frequency follow the recovered PHY clock.
Software initialization
Both boards use the ADI ADIN2111 driver with OPEN Alliance SPI.
The initialization flow is approximately:
adin2111_Init(...); adin2111_Open(...); adin2111_SetPortEnabled(...); adin2111_TsEnable(..., ADI_MAC_TS_FORMAT_64B_1588); adin2111_Enable(...);
The PTP clock wrapper only stores the ADIN2111 device handle:
void myPtpClockInit(adin2111_DeviceHandle_t hDevice)
{
ptpClockDevice = hDevice;
}
The timestamp mode is configured as 64-bit 1588 timestamps. During the test, I dump these registers around the timestamp events.
Typical PTP source register dump:
CONFIG0=0x000080c6 TS_CFG=0x00000001 TS_ADDEND=0x85555555
Typical PTP receiver register dump:
CONFIG0=0x000080e6 TS_CFG=0x00000001 TS_ADDEND=0x85555555
So, on both sides:
CONFIG0.FTSE = 1 CONFIG0.FTSS = 1, 64-bit timestamp format CONFIG0.SYNC = 1 TS_CFG.TS_EN = 1 TS_ADDEND = 0x85555555, unchanged default value
The difference between 0x80c6 and 0x80e6 appears to be CONFIG0.PROTE, which I do not expect to affect timestamp frequency.
TX timestamp path on the PTP source
The PTP source sends a raw L2 PTP Sync frame with Ethertype 0x88F7. When queueing the Sync frame, I request egress capture A
I wait for the timestamp-ready callback/event before reading the egress timestamp. After the ready event is observed, I call:
adin2111_TsGetEgressTimestamp( hDevice, ADI_MAC_EGRESS_CAPTURE_A, &ts);
This timestamp is used as t1.
Then I build a Follow_Up frame and put this t1 into the Follow_Up payload. I also print the source-side t1.
RX timestamp path on the PTP receiver
On the PTP receiver, when a PTP L2 frame is received, I check the RX buffer descriptor timestamp fields.
The conversion uses:
adin2111_TsConvert( tsLow, tsHigh, ADI_MAC_TS_FORMAT_64B_1588, &ts);
For a received Sync frame, this converted RX timestamp is used as t2.
For the subsequent Follow_Up frame, the PTP receiver parses t1 from the Follow_Up payload. I verified from logs that the t1 printed by the PTP source and the t1 parsed by the PTP receiver match exactly for all common sequence IDs.
Simplified observation
In this simplified observe-only mode:
Sync is sent once per second.
Follow_Up carries the egress timestamp t1.
The PTP receiver calculates t2 - t1.
The PTP receiver does not send Delay_Req.
The PTP receiver does not call TsSetTimerAbsolute.
The PTP receiver does not modify TS_ADDEND.
No frequency or phase correction is applied.
However, the measured value of t2 - t1 remains essentially constant.
From one log:
106 common Sync/Follow_Up sequence IDs were compared. The t1 value in the receiver-side Follow_Up matched the source-side printed t1 exactly. The observed drift of t2 - t1 was only 0 ns or 1 ns over about 100 seconds. TS_ADDEND remained 0x85555555 on both sides.
This is the surprising part. With two independent 25 MHz crystals, I would expect some visible accumulated phase drift between t1 and t2, for example several microseconds per second for a few ppm difference. But the difference stays constant to around 1 ns.
I also tried heating the receiver-side 25 MHz crystal, but the observed t2 - t1 still did not show meaningful drift.
Questions
1. Is the ADIN2111 1588 timestamp counter always based on the local 25 MHz reference, or can it become frequency-synchronized to the 10BASE-T1L link/PHY recovered clock because of the leader/follower mechanism?
2. Does my TX/RX timestamp usage look correct? The PTP source waits for the Sync egress timestamp-ready event, reads EGRESS_CAPTURE_A as t1, sends t1 in Follow_Up, and the PTP receiver uses the RX buffer descriptor timestamp as t2. If this is the correct method, what could explain t2 - t1 staying constant within about 0/1 ns over ~100 seconds even though the two ADIN2111 devices use independent 25 MHz crystals?
My main concern is that the current result looks too stable for two independent free-running timestamp counters. I would like to understand whether this is expected ADIN2111/10BASE-T1L behavior, or whether I am reading/interpreting the timestamps incorrectly.
Thanks,
GuoNX