1.. _gptp_interface: 2 3generic Precision Time Protocol (gPTP) 4###################################### 5 6.. contents:: 7 :local: 8 :depth: 2 9 10Overview 11******** 12 13This gPTP stack supports the protocol and procedures as defined in 14the `IEEE 802.1AS-2011 standard`_ (Timing and Synchronization for 15Time-Sensitive Applications in Bridged Local Area Networks). 16 17Supported features 18******************* 19 20The stack handles communications and state machines defined in the 21`IEEE 802.1AS-2011 standard`_. Mandatory requirements for a full-duplex 22point-to-point link endpoint, as defined in Annex A of the standard, 23are supported. 24 25The stack is in principle capable of handling communications on multiple network 26interfaces (also defined as "ports" in the standard) and thus act as 27a 802.1AS bridge. However, this mode of operation has not been validated on 28the Zephyr OS. 29 30Supported hardware 31****************** 32 33Although the stack itself is hardware independent, Ethernet frame timestamping 34support must be enabled in ethernet drivers. 35 36Boards supported: 37 38- :zephyr:board:`frdm_k64f` 39- :zephyr:board:`nucleo_h743zi` 40- :zephyr:board:`nucleo_h745zi_q` 41- :zephyr:board:`nucleo_f767zi` 42- :zephyr:board:`sam_e70_xplained` 43- :ref:`native_sim` (only usable for simple testing, limited capabilities 44 due to lack of hardware clock) 45- :zephyr:board:`qemu_x86` (emulated, limited capabilities due to lack of hardware clock) 46 47Enabling the stack 48****************** 49 50The following configuration option must me enabled in :file:`prj.conf` file. 51 52- :kconfig:option:`CONFIG_NET_GPTP` 53 54Application interfaces 55********************** 56 57The following Application Interfaces as defined in section 9 of the standard 58are available: 59 60- ``ClockSourceTime`` interface (:c:func:`gptp_clk_src_time_invoke`) 61- ``ClockTargetPhaseDiscontinuity`` interface (:c:func:`gptp_register_phase_dis_cb`) 62- ``ClockTargetEventCapture`` interface (:c:func:`gptp_event_capture`) 63 64Testing 65******* 66 67The stack has been informally tested using the 68`OpenAVnu gPTP <https://github.com/AVnu/gptp>`_ and 69`Linux ptp4l <http://linuxptp.sourceforge.net/>`_ daemons. 70The :zephyr:code-sample:`gPTP sample application <gptp>` from the Zephyr 71source distribution can be used for testing. 72 73.. _IEEE 802.1AS-2011 standard: 74 https://standards.ieee.org/findstds/standard/802.1AS-2011.html 75 76API Reference 77************* 78 79.. doxygengroup:: gptp 80