Delay Init wifi on nrf5340 and nrf7002

I am using the nrf5340 with the nrf7002 as the companion Wi-Fi IC. The supply voltage to all my peripherals (3V4) is enabled when my device exits sleep (System On + Idle). All the drivers can be initialized after I enable 3V4 to the peripherals, except the Wi-Fi driver (using  zephyr,deferred-init; see flash driver dts below). Is it a config that I need to enable? Alternatively, would I be able to restart the  Wi-Fi driver/stack after I enable the 3V4?

Below Is the dts fragment concerning  Wi-Fi and flash:


flash_spi: &spi4 {
	compatible = "nordic,nrf-spim";
    status = "okay";
	cs-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
	pinctrl-0 = <&spi3_default>;
	pinctrl-1 = <&spi3_sleep>;
	pinctrl-names = "default", "sleep";
    //zephyr,deferred-init; 
    extflash: gd25q128e@0{
        compatible = "jedec,spi-nor";
        reg = <0>;
        //label = "External Flash";
        spi-max-frequency = <80000000>; // Actual Max is 133Mhz
        size = <0x8000000>; // 0x8000000 == 134217728 bits == 16777216 Bytes == 16MB flash
        has-dpd;
        t-enter-dpd = <1000>;
        t-exit-dpd = <1000>;
        zephyr,deferred-init;//Is enabled in code after 3v4 is enabled
    };
};


&qspi {
	status = "okay";
	pinctrl-0 = <&qspi_default>;
	pinctrl-1 = <&qspi_sleep>;
	pinctrl-names = "default", "sleep";
    //WiFi companion IC
	nrf70: nrf7002@1 {
		compatible = "nordic,nrf7002-qspi";
		status = "okay";
		reg = <1>;
		qspi-frequency = <24000000>;
		qspi-quad-mode;
        //Interface Pins Configs
        iovdd-ctrl-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
        bucken-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
        host-irq-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
        srrf-switch-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
        //2.4G Power configs 
        wifi-max-tx-pwr-2g-dsss = <21>;
        wifi-max-tx-pwr-2g-mcs0 = <16>;
        wifi-max-tx-pwr-2g-mcs7 = <16>;
        //5G Power configs 
        wifi-max-tx-pwr-5g-low-mcs0 = <9>;
        wifi-max-tx-pwr-5g-low-mcs7 = <9>;
        wifi-max-tx-pwr-5g-mid-mcs0 = <11>;
        wifi-max-tx-pwr-5g-mid-mcs7 = <11>;
        wifi-max-tx-pwr-5g-high-mcs0 = <13>;
        wifi-max-tx-pwr-5g-high-mcs7 = <13>;
        wlan0: wlan {
            compatible = "nordic,wlan";
            // zephyr,deferred-init;
        };
        // zephyr,deferred-init;
	};
};

Note that I can connect to  Wi-Fi if I modify my board to have permanent 3V4 for the nRF7002.
Below is the error logs that I get when the board doesn't have permanent 3V4 for the nrf7002:
[00:00:00.287,139] <err> wifi_nrf_bus: Error: RDSR2 failed
[00:00:00.287,170] <err> wifi_nrf: zep_shim_bus_qspi_dev_add: RPU enable failed with error -1
[00:00:00.287,231] <err> wifi_nrf: nrf_wifi_bus_qspi_dev_add: nrf_wifi_osal_bus_qspi_dev_add failed
[00:00:00.287,292] <err> wifi_nrf: nrf_wifi_bal_dev_add: Bus dev_add failed
[00:00:00.287,353] <err> wifi_nrf: nrf_wifi_hal_dev_add: nrf_wifi_bal_dev_add failed
[00:00:00.287,445] <err> wifi_nrf: nrf_wifi_fmac_dev_add: nrf_wifi_hal_dev_add failed
[00:00:00.287,475] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_add failed
[00:00:00.287,506] <err> wifi_nrf: nrf_wifi_if_start_zep: nrf_wifi_fmac_dev_add_zep failed

Parents
  • Hi,

     

    It seems that there is an issue to initialize the nrf7002 on your design. This can be due to many factors, but it usually is some sort of connection issue or pin conflict.

    Q1: If this is a custom design, have you had it reviewed by us on a previous occasion?

    Q2: By default, pins P1.00-P1.05 are forwarded to the network core for uart prints. You seem to use P1.05 as the host irq.

    Have you ensured that the gpio-forwarder is disabled?

    This is done by adding this to your overlay:

    &gpio_fwd {
    	status = "disabled";
    };
    

    Q3: Do all nrf/samples/wifi examples behave like this?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    It seems that there is an issue to initialize the nrf7002 on your design. This can be due to many factors, but it usually is some sort of connection issue or pin conflict.

    Q1: If this is a custom design, have you had it reviewed by us on a previous occasion?

    Q2: By default, pins P1.00-P1.05 are forwarded to the network core for uart prints. You seem to use P1.05 as the host irq.

    Have you ensured that the gpio-forwarder is disabled?

    This is done by adding this to your overlay:

    &gpio_fwd {
    	status = "disabled";
    };
    

    Q3: Do all nrf/samples/wifi examples behave like this?

     

    Kind regards,

    Håkon

Children
No Data
Related