I want to use spio of nrf52811 soc using nrf connect sdk 2.7.0 version with vs code.
I am trying to get spi devicetree specifications using
struct spi_dt_spec spispec = SPI_DT_SPEC_GET(DT_NODELABEL(spi0), SPI_OP_MODE_MASTER, 0);
but it is giving: identifier "__device_dts_ord_DT_N_S_soc_S_spi_40004000_BUS_ORD" is undefined.
header files:
but it is giving: identifier "__device_dts_ord_DT_N_S_soc_S_spi_40004000_BUS_ORD" is undefined.
header files:
#include <zephyr/drivers/spi.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#include <zephyr/devicetree.h>
#include <string.h> // For memcpy
overlayfile:
overlayfile:
&spi0 {
status = "okay";
max-frequency = <125000>;
};
&spi0_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 30)>, // SCLK
<NRF_PSEL(SPIM_MOSI, 0, 28)>, // MOSI
<NRF_PSEL(SPIM_MISO, 0, 25)>; // MISO
};
};
&spi0_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 30)>, // SCLK
<NRF_PSEL(SPIM_MOSI, 0, 28)>, // MOSI
<NRF_PSEL(SPIM_MISO, 0, 25)>; // MISO
low-power-enable;
};
};
i am not able to move on from this problem seeking some some help.
i am not able to move on from this problem seeking some some help.