Post Go back to editing

ADIN1110 IEEE-1588 PTPv2 Ethernet received packet timestamp

Category: Hardware
Product Number: ADIN1110

Hi,

I am working on a proof-of-concept to send messages between a PC and external piece of hardware, through SPE.

Setup of the signal chain:

PC <-> ETH <-> 10base-T1L-MediaConverter(Arrow chronous) <-> SPE <->ADIN1110 <-> SPI <-> HOST-CPU

I am able to send raw Ethernet frames (DSTmac, SRCmac, Ethertype, payload) from the PC to the ADIN1110. These packets are read by my host-CPU through the ADIN1110-SPI interface.They arrive correctly.

The next step for my SPI-host is to query the time (1588 / PTP) at which the packet was received by the ADIN1110.

I think my PC sends correct PTPv2/1588/SYNC ethernet messages to the ADIN1110 (at least wireshark seems to agree).

My question is: How can my Host-cpu query the 1588 time (timestamp) for each received packet, or... query the current/actual time from the ADIN1110. I can no deduce this information from the ADIN1110 datasheet.

Looking forward to you reaction.

Best Regards,
Alex

  • Hi Alex,

    You can check the section "Time Stamp Capture" in page 29. Both FTSE and TS_EN bits need to be enabled.

    If using our generic SPI protocol, TIME_STAMP_PRESENT in the frame header should be read as 1 when you receive a frame, indicating that the timestamp is present in the SPI frame..

    If using the OA SPI protocol, RTSA in the receive footer should read as 1 indicating that the timestamp is present in the SPI frame.

    Regards,

    Raquel.

  • Hi Raquel,

    Thanks for your reply. I was aware of the section in the Datasheet. :)

    For the host-cpu, I am using the Sparkfun adaptation of Analog Devices' drivers (bare metal version). This code handles the SPI messages and controls the bitfields that you mention. 
    I am starting to wonder if the Media Converter is relaying/forwarding the ptp messages to my ADIN1110. When I look through its FW-source code I see no evidence that it does. I would expect some PTP related code there.

    Do you have more information on this media converter? It uses the ADIN1200 and ADIN1110 IC's, Its github repo does not mention Ptp or 1588.

    Alternatively, what PC-HW do you suggest to output SPE ethernet from a PC? Without the use of a media converter? Are there some USB->SPE dongles that I do not know about?

    Best regards,
    Alex

  • Hi Alex,

    The Sparkfun driver is external to ADI and we do not provide support for it.

    What ADIN1110 and Media converter boards are you using? The ADIN1110 receives a valid ethernet frame and sends the ethernet content to the layer 3 of the TCP/IP stack. I am not sure I fully understand your query.

    Regards,
    Raquel

  • Hi Raquel,

    I am/was using the 10base-T1L-MediaConverter from Arrow chronous ( https://www.arrow.com/en/products/10base-t1l-mc/einfochips-limited ) . I am fairly certain that its FW (which is found on github), does not do anything special to relay or create PTP messages (from traditional ETH) to its T1L side. So, my ADIN1110 does not receive any PTP messages, and therefore never gets PTP-SYNCed.

    I do see that its internal timer is running. I receive messages which are time-stamped. However the indicated time is 0 at power-up/reset and only increments from there. It never gets set after a PTP-SYNC message.

    In the mean time, I have ordered a direct USB-attached T1L ethernet adapter, which, I hope, I can use to send PTP messages with.

    Best Regards,
    Alex

  • Hi Alex,

    PTP is a protocol sitting on Layer 5 of the TCP/IP stack. The ADIN1110 is a MAC-PHY that works with Layer 2 frames, therefore the PTP implementation needs to be implemented by software on the host microcontroller. Similarly, the ADIN1200 and ADIN1100 in the media converter board are Layer 1 devices. These devices will forward the PTP messages transparently.

    I am not familiar with the FW that Arrow provides, as it is external to ADI, but in our ADIN1110 website drivers we have a FW example for synchronization. You need to implement your own PTP solution in the host microcontroller of the ADIN1110 so when it receives the PTP-SYNC message it process the information it receives from the master clock and with the help of the timestamps in the ADIN1110 proceeds to do the synchronization.

    Regards,

    Raquel

  • Hi Raquel,

    Your latest reply, "opened my eyes". Slight smile

    Based on this reply, I took a closer look at the example "TimestampSyncExample". I noticed that this application handles the reception of sync and followup packets. The application does not expect the official IEEE-1588 messages, but uses custom Ethernet messages. When the sync and followup packets are received, the application updates its internal timer.

    Conclusions:

    • The 10base-T1L-MediaConverter from Arrow chronous is indeed transparent (as you mentioned earlier).
    • The host-CPU (which controls the ADIN11110 via a SPI bus) shall handle the Sync and FollowUp messages, and update the ADIN1110's internal timer. Although it uses non-standard messages, the TimestampSyncExample provides a good example.

    Best Regards,

    Alex

  • Hi Alex,

    Thanks for confirming. I am glad we were able to help you Slight smile

    Regards,

    Raquel