This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 SPI problem

Hi,

I have looked at the different post regarding the nRF9160 and SPI, but I can not get it to work on our custom board.

5001.Q3IoT.zip

Attached the board definition files.

6562.Q3IoT_prj_conf_aso.zip

Here is the problem:

If the prj.conf looks like above:

I will get an python error while opening with the nRF Connect SDK Projekt function in Segger Embedded Studio.

When I remove all but CONFIG_SPI_3=y from the prj.conf file I can open the project, build and run it, but as soon as I call

const char* spiName = "SPI_3";

    spi_dev = device_get_binding(spiName);

I will get "Could not get get SPI_3 device".

Best regards

Dirk

Parents Reply
  • Hi Simon,

    I have found the problem! It is in the q3iot_common.dts. It seems SES or Zephyr or whatever uses this file is very sensitive! One blank too much before nrf-spim!!

    This works:

    &spi3 {    
        compatible = "nordic,nrf-spim";    
        status = "okay";
        sck-pin = <19>;
        mosi-pin = <20>;
        miso-pin = <21>;
    };

    This does not work:

    &spi3 {    
        compatible = "nordic, nrf-spim";    
        status = "okay";
        sck-pin = <19>;
        mosi-pin = <20>;
        miso-pin = <21>;
    };

    Case solved!

    Dirk

Children
No Data
Related