1.. zephyr:code-sample:: espi 2 :name: Enhanced Serial Peripheral Interface (eSPI) 3 :relevant-api: espi_interface spi_interface 4 5 Use eSPI to connect to a slave device and exchange virtual wire packets. 6 7Overview 8******** 9 10This sample demonstrates how to use the :ref:`Enhanced Serial Peripheral Interface 11(eSPI) API <espi_api>`. 12It shows how to configure and select eSPI controller capabilities as part of 13a simple eSPI handshake that includes exchanging virtual wire packets. 14 15Standard platform signals are sent virtual wire packets over the bus. 16Callbacks are registered that will write to the console indicating main 17eSPI events and when a virtual wire is received. 18 19Building and Running 20******************** 21 22The sample can be built and executed on boards supporting eSPI. 23Any pins required for minimum eSPI handshake should be configured. 24Sample requires a correct harness and fixture setup. 25Please connect an eSPI device to the testing board. 26After that for the correct execution of that sample in twister, add into 27boards's map-file next fixture settings:: 28 29 - fixture: espi_device_connect 30 31Sample output 32============= 33 34.. code-block:: console 35 36 Hello eSPI test! 37 eSPI test - I/O initialization...complete 38 eSPI slave configured successfully! 39 eSPI test - callbacks initialization... complete 40 eSPI test - callbacks registration... complete 41 eSPI test - Power initialization...complete 42 eSPI test - Handshake 43 eSPI BUS reset 0 44 VW channel is ready 45 46 PLT_RST changed 1 47 1st phase completed 48 2nd phase completed 49 3rd phase completed 50 51note:: The values shown above might differ. 52