Serial Peripheral Interface (SPI) is a serial communication protocol for on-board short-distance communication and is suitable for embedded systems. SPI communication is based on a master/slave model, where multiple slaves are connected on the same bus, and the master can enable one of the slaves to communicate at any given time. The SPI interface is popular due to its high-speed operation and requires 4-wires to perform full-duplex communication. In this lesson, we will go through the basics of SPI communication and explore the Zephyr SPI API.
In the exercise section of this lesson, we will practice using the Zephyr SPI API to communicate with external devices. Therefore, this lesson has special requirements listed below. It is recommended that you cover both of the exercises as you will get a better understanding and see different ways of utilizing raw SPI.