pin connections between custom board nrf9160 and nrf7002 for Wifi shell sample

Hi, I am try to scan Wi-Fi networks with my custom board nrf91+nrf7002 (sdk 2.4.1). I am able to build the Wi-Fi shell sample but I get the following error at runtime:

I am not sure I connected everything appropriately as I do not fully understand how the spi connection with nrf91 works and what pin to use in the devicetree.

Any help would be much appreciated.

Current pin config:

Custom board pin  Device tree
31/ QSPI_DATA3 spi3 SCK
0/QSPI_SS iovdd-ctrl-gpios
1/BUCK_EN bucken-gpios
26/HOST_IRQ host-irq-gpios
8  status0-gpios
30/COEX_REQ req-gpios
29/COEX_GRANT grant-gpios
27/SW_CTRL1 swctrl1-gpios

nrf9160vs_nrf9160.overlay

/*
 * Copyright (c) 2019, Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */


&spi3_default {
	group1 {
		psels = <NRF_PSEL(SPIM_SCK, 0, 31)>,
			<NRF_PSEL(SPIM_MISO, 0, 12)>,
			<NRF_PSEL(SPIM_MOSI, 0, 11)>;
		nordic,drive-mode = <NRF_DRIVE_H0H1>;
	};
};

&spi3_sleep {
	group1 {
		psels = <NRF_PSEL(SPIM_SCK, 0, 31)>,
			<NRF_PSEL(SPIM_MISO, 0, 12)>,
			<NRF_PSEL(SPIM_MOSI, 0, 11)>;
		low-power-enable;
	};
};

/* Disabled because of conflicts on P0.00 and P0.01 - Arduino pins D0 and D1
 * (iovdd-ctrl-gpios and bucken-gpios in nrf7002ek_nrf7002, respectively). */
&uart1 {
	status = "disabled";
};


&uart0 {
	status = "disabled";
};

nrf7002ek.overlay

/* Copyright (c) 2023 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */
#include <freq.h>
#include "nrf7002ek_coex.overlay"

&arduino_spi {
	status = "okay";
	cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */

	nrf700x: nrf7002@0 {
		compatible = "nordic,nrf700x-spi";
		status = "okay";
		reg = <0>;
		spi-max-frequency = <DT_FREQ_M(8)>;

		iovdd-ctrl-gpios = <&arduino_header 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;    /* D0 */
		bucken-gpios = <&arduino_header 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;        /* D1 */
		host-irq-gpios = <&arduino_header 26 GPIO_ACTIVE_HIGH>;     /* D7 */
	};
};

nrf7002ek_coex.overlay

/* Copyright (c) 2023 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

/ {
	nrf_radio_coex: nrf7002-coex {
		status = "okay";
		compatible = "nordic,nrf700x-coex";
		status0-gpios = <&arduino_header 8 GPIO_ACTIVE_HIGH>;       /* D2 */
		req-gpios = <&arduino_header 30 GPIO_ACTIVE_HIGH>;   /* D3 */
		grant-gpios = <&arduino_header 29 (GPIO_PULL_DOWN | GPIO_ACTIVE_LOW)>;    /* D4 */
		swctrl1-gpios = <&arduino_header 27 GPIO_ACTIVE_HIGH>;  /* D6 */
	};
};

sources:

3782.shell.zip

Best wishes

Related