Configure and Connect nRF7002 to nRF52840 on SDK 2.2.2

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.

Parents
  • Hi,

     

    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.

    I assume you mean ncs v3.2.2?

    nRF7002 shall be supported in this version.

    In your device tree, try to add these sections (taken from the nrf7002eb device tree files):

    /*
     * Copyright (c) 2024 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: Apache-2.0
     */
    
    #include <freq.h>
    
    / {
    	chosen {
    		zephyr,wifi = &wlan0;
    	};
    };
    
    &spi1 {
    	status = "okay";
    
    	nrf70: nrf7002@0 {
    		compatible = "nordic,nrf7002-spi";
    		status = "okay";
    
    		wlan0: wlan0 {
    			compatible = "nordic,wlan";
    		};
    
    		wlan1: wlan1 {
    			compatible = "nordic,wlan";
    		};
    
    		wifi-max-tx-pwr-2g-dsss = <21>;
    		wifi-max-tx-pwr-2g-mcs0 = <16>;
    		wifi-max-tx-pwr-2g-mcs7 = <16>;
    		wifi-max-tx-pwr-5g-low-mcs0 = <13>;
    		wifi-max-tx-pwr-5g-low-mcs7 = <13>;
    		wifi-max-tx-pwr-5g-mid-mcs0 = <13>;
    		wifi-max-tx-pwr-5g-mid-mcs7 = <13>;
    		wifi-max-tx-pwr-5g-high-mcs0 = <12>;
    		wifi-max-tx-pwr-5g-high-mcs7 = <12>;
    		...rest of your configuration..
    	};
    };

     

    I suspect that the issue is the chosen "zephyr,wifi = &wlan0" is missing from your overlay.

    Could you check if this works as intended?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    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.

    I assume you mean ncs v3.2.2?

    nRF7002 shall be supported in this version.

    In your device tree, try to add these sections (taken from the nrf7002eb device tree files):

    /*
     * Copyright (c) 2024 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: Apache-2.0
     */
    
    #include <freq.h>
    
    / {
    	chosen {
    		zephyr,wifi = &wlan0;
    	};
    };
    
    &spi1 {
    	status = "okay";
    
    	nrf70: nrf7002@0 {
    		compatible = "nordic,nrf7002-spi";
    		status = "okay";
    
    		wlan0: wlan0 {
    			compatible = "nordic,wlan";
    		};
    
    		wlan1: wlan1 {
    			compatible = "nordic,wlan";
    		};
    
    		wifi-max-tx-pwr-2g-dsss = <21>;
    		wifi-max-tx-pwr-2g-mcs0 = <16>;
    		wifi-max-tx-pwr-2g-mcs7 = <16>;
    		wifi-max-tx-pwr-5g-low-mcs0 = <13>;
    		wifi-max-tx-pwr-5g-low-mcs7 = <13>;
    		wifi-max-tx-pwr-5g-mid-mcs0 = <13>;
    		wifi-max-tx-pwr-5g-mid-mcs7 = <13>;
    		wifi-max-tx-pwr-5g-high-mcs0 = <12>;
    		wifi-max-tx-pwr-5g-high-mcs7 = <12>;
    		...rest of your configuration..
    	};
    };

     

    I suspect that the issue is the chosen "zephyr,wifi = &wlan0" is missing from your overlay.

    Could you check if this works as intended?

     

    Kind regards,

    Håkon

Children
Related