Topics

SPI slave on nRF52840-PCA10059 #nrf52480

Cavallari, Riccardo <riccardo.cavallari@...>
 

Hi all,

I’m trying to get a simple SPI slave application running on nRF52840-PCA10059 dongle. So far, no success. I tried a couple of things that all lead to compilation error of the kind “symbol undeclared…”. Here’s how to reproduce:

riccardo@debian:~/zephyr_builds$ cp -r /media/sf_zephyr/samples/bluetooth/hci_spi/ .
riccardo@debian:~/zephyr_builds/hci_spi$ mkdir b
riccardo@debian:~/zephyr_builds/hci_spi$ cd b
riccardo@debian:~/zephyr_builds/hci_spi/b$ cmake -GNinja -DBOARD=nrf52840_pca10059 ..
riccardo@debian:~/zephyr_builds/hci_spi/b$ ninja

see error_hci_spi.txt (attached) for the errors.

I also tried to start from a blinky application, and enable SPI in menuconfig. If I enable

Device Drivers → SPI hardware bus support → nRF SPI nrfx drivers → SPI Port 1 Driver type → nRF SPIM 1, everything is cool. If I enable
Device Drivers → SPI hardware bus support → nRF SPI nrfx drivers → SPI Port 1 Driver type → nRF SPIS 1, I got errors as attached in error_spi_slave.txt

The symbols it mentioned are defined in an autogenerated .h, that seems to be ignored somehow.

Do you know what's going on?

Regards,
Riccardo

Riccardo
 

Hi all,

I’m trying to get a simple SPI slave application running on nRF52840-PCA10059 dongle. So far, no success. I tried a couple of things that all lead to compilation error of the kind “symbol undeclared…”. Here’s how to reproduce:

riccardo@debian:~/zephyr_builds$ cp -r /media/sf_zephyr/samples/bluetooth/hci_spi/ .
riccardo@debian:~/zephyr_builds/hci_spi$ mkdir b
riccardo@debian:~/zephyr_builds/hci_spi$ cd b
riccardo@debian:~/zephyr_builds/hci_spi/b$ cmake -GNinja -DBOARD=nrf52840_pca10059 ..
riccardo@debian:~/zephyr_builds/hci_spi/b$ ninja

see error_hci_spi.txt (attached) for the errors.

I also tried to start from a blinky application, and enable SPI in menuconfig. If I enable

Device Drivers → SPI hardware bus support → nRF SPI nrfx drivers → SPI Port 1 Driver type → nRF SPIM 1, everything is cool. If I enable
Device Drivers → SPI hardware bus support → nRF SPI nrfx drivers → SPI Port 1 Driver type → nRF SPIS 1, I got errors as attached in error_spi_slave.txt

The symbols it mentioned are defined in an autogenerated .h, that seems to be ignored somehow.

Do you know what's going on?

Regards,
Riccardo

Riccardo
 

Thanks to Marcio I resolved. The dts overlay was missing.


I created nrf52840_pca10059.overlay in the application main folder.

&spi1 {

    compatible = "nordic,nrf-spis";   
    status = "ok"; 
    sck-pin = <22>;
    mosi-pin = <23>;
    miso-pin = <24>;
    csn-pin = <25>;
    def-char = <0xFF>;
};

at least it compiles now.

riccardo