SPI Slave NRF5340 Init Error

Hi all!
SPI3 Slave project is not built - error:
identifier "__device_dts_ord_DT_N_S_soc_S_peripheral_50000000_S_spi_c000_P_cs_gpios_IDX_0_PH_ORD" not determined

C:\ncs\v2.1.1\zephyr\include\zephyr\drivers\pinctrl.h:89:10: error: 'PINCTRL_STATE_DT_N_S_soc_S_peripheral_50000000_S_spi_c000_PINCTRL_IDX_0_UPPER_TOKEN' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_peripheral_50000000_S_spi_b000_PINCTRL_IDX_0_UPPER_TOKEN'?

What could be?
I ask for the help of a specialist.
Parents
  • Hi Sergii,

    Could you please share your project's .overlay file?

  • This is likely related to Pin Control. Did you migrate your project from an nRF Connect SDK version older than v2.0.0?

    If you follow the link above you will find a an example showing the syntax for Pin Control that you may include in nrf5340dk_nrf5340.overlay:

    &pinctrl {
        uart0_default: uart0_default {
            group1 {
                psels = <NRF_PSEL(UART_TX, 0, 5)>;
            };
            group2 {
                psels = <NRF_PSEL(UART_RX, 1, 1)>;
                bias-pull-up;
            };
        };
        uart0_sleep: uart0_sleep {
            group1 {
                psels = <NRF_PSEL(UART_TX, 0, 5)>,
                        <NRF_PSEL(UART_RX, 1, 1)>;
                low-power-enable;
            };
        };
    };
  • Hi Helsing,
    thanks for the fast response!

    nrf5340dk_nrf5340_cpuapp.overlay
    -----------------------------------------------

    &pinctrl {
        spi3_default: spi3_default {
            group1 {
                psels = <NRF_PSEL(SPIS_SCK, 1, 5)>,
                        <NRF_PSEL(SPIS_MOSI, 1, 4)>,
                        <NRF_PSEL(SPIS_MISO, 1, 1)>,
                        <NRF_PSEL(SPIS_CSN, 1, 0)>;
            };
        };

        spi3_sleep: spi3_sleep {
            group1 {
                psels = <NRF_PSEL(SPIS_SCK, 1, 5)>,
                        <NRF_PSEL(SPIS_MOSI, 1, 4)>,
                        <NRF_PSEL(SPIS_MISO, 1, 1)>,
                        <NRF_PSEL(SPIS_CSN, 1, 0)>;
                low-power-enable;
            };
        };
    };

    /* SPI3 for slave mode
     */
    &spi3 {
        compatible = "nordic,nrf-spis";
        status = "okay";
        pinctrl-0 = <&spi3_default>;
        pinctrl-1 = <&spi3_sleep>;
        def-char = <0x00>;
    };
Reply
  • Hi Helsing,
    thanks for the fast response!

    nrf5340dk_nrf5340_cpuapp.overlay
    -----------------------------------------------

    &pinctrl {
        spi3_default: spi3_default {
            group1 {
                psels = <NRF_PSEL(SPIS_SCK, 1, 5)>,
                        <NRF_PSEL(SPIS_MOSI, 1, 4)>,
                        <NRF_PSEL(SPIS_MISO, 1, 1)>,
                        <NRF_PSEL(SPIS_CSN, 1, 0)>;
            };
        };

        spi3_sleep: spi3_sleep {
            group1 {
                psels = <NRF_PSEL(SPIS_SCK, 1, 5)>,
                        <NRF_PSEL(SPIS_MOSI, 1, 4)>,
                        <NRF_PSEL(SPIS_MISO, 1, 1)>,
                        <NRF_PSEL(SPIS_CSN, 1, 0)>;
                low-power-enable;
            };
        };
    };

    /* SPI3 for slave mode
     */
    &spi3 {
        compatible = "nordic,nrf-spis";
        status = "okay";
        pinctrl-0 = <&spi3_default>;
        pinctrl-1 = <&spi3_sleep>;
        def-char = <0x00>;
    };
Children
No Data
Related