I can not get the SPI Slave function working on nRF52840 (nrf52840dk_nrf52840 board)
In the nrf52840dk_nrf52840.overlay I wrote:
&spi1 {
compatible = "nordic,nrf-spi";
label = "SPI_1";
status = "okay";
sck-pin = <31>;
mosi-pin = <30>;
miso-pin = <40>;
};
In the pr.conf I wrote:
# adding SPI communication
CONFIG_SPI=y
CONFIG_SPI_SLAVE=y
In the main loop I wrote:
spi = device_get_binding("SPI_1");
Calling spi_slave_read(spi, &spi_cfg, &spi_rx_buffer); will result in Slave mode is not supported on SPI_1