too1 / ncs-spi-master-slave-example

17 stars 4 forks source link

NCS-SPI-Master-Slave-Example ############################

Overview


This example shows how to use the SPI master and slave async drivers in Zephyr, and sets up a separate master and slave interface in order to allow sending data from the master to the slave and vice versa.

The SPI bus lines needs to be externally connected between the master and slave pins in order to test communication between them.

The SPI master will send a 2 byte transaction every second, including an incrementing counter, and check if anything is received on the SPI slave interface.

Any sent or received data on the SPI master and slave will be printed to the terminal.

Requirements


SDK:

Supported boards: