I am using nRF52840 as host processor. Now I need to connect to nRF7002 for WiFi usage. I am using ncs 2.2.2 SDK. I have a few questions?
1. Does nRF7002 work on v2.2.2? I created the nRF7002 device on the device tree with "nordic,nrf7002-spi" compatible . However, I cannot link to it. The CONFIG_NRF700X_SPI=y is not supported.
error: undefined reference to `__device_dts_ord_133'
2. Can you provide an example of configure and link nRF7002 to nRF52840 on v2.2.2 SDK?
3. If I have to move to higher version of SDK, what is the steps to do the upgrade?
My device tree:
&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
nrf7002: nrf7002@0 {
compatible = "nordic,nrf7002-spi";
status = "okay";
reg = <0>; /* SPI chip select index */
spi-max-frequency = <8000000>; /* 8 MHz */
/*duplex = "full";*/ /* required for SPI_CONFIG_DT */
/*frame-format = "motorola";*/ /* required for SPI_CONFIG_DT */
label = "nrf7002";
/* GPIOs for control signals */
iovdd-ctrl-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
bucken-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
host-irq-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
/* Optional: COEX interface */
coex {
compatible = "nordic,nrf700x-coex";
grant-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
req-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
/*prio-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;*/
status0-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
/*status1-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;*/
};
};
};
My code:
const struct device *nrf7002_dev = DEVICE_DT_GET(DT_NODELABEL(nrf7002));
if (!device_is_ready(nrf7002_dev))
{
LOG_ERR("SPI device not ready\n");
return -1;
}
else
{
LOG_INF("SPI device READY\n");
}
Thank you.