Hi,
I am having trouble communicating between the nRF54L15 and the nRF7002 in a custom board.
I flashed the scan sample. I made a new overlay as below:
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
#include <freq.h>
/ {
chosen {
zephyr,wifi = &wlan0;
};
aliases {
/delete-property/ led1;
/delete-property/ led3;
/delete-property/ sw0;
/delete-property/ sw1;
};
buttons {
/delete-property/ button0;
/delete-property/ button1;
};
leds {
/delete-property/ led3;
};
};
&pinctrl {
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
<NRF_PSEL(SPIM_MISO, 2, 10)>,
<NRF_PSEL(SPIM_MOSI, 2, 9)>;
};
};
spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
<NRF_PSEL(SPIM_MISO, 2, 10)>,
<NRF_PSEL(SPIM_MOSI, 2, 9)>;
low-power-enable;
};
};
};
&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
cs-gpios = < &gpio1 10 GPIO_ACTIVE_LOW >;
pinctrl-0 = < &spi1_default >;
pinctrl-1 = < &spi1_sleep >;
pinctrl-names = "default", "sleep";
nrf70: nrf7002@0 {
compatible = "nordic,nrf7002-spi";
status = "okay";
reg = <0>;
label = "nrf7002_wlan";
spi-max-frequency = <DT_FREQ_M(1)>;
iovdd-ctrl-gpios = <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
bucken-gpios = <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
host-irq-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
/* Maximum TX power limits for 2.4 GHz */
wifi-max-tx-pwr-2g-dsss = <21>;
wifi-max-tx-pwr-2g-mcs0 = <16>;
wifi-max-tx-pwr-2g-mcs7 = <16>;
/* Maximum TX power limits for 5 GHz */
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>;
wlan0: wlan0 {
compatible = "nordic,wlan";
};
};
};
My prj.config is:
#
# Copyright (c) 2022 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_WIFI=y
CONFIG_WIFI_NRF70=y
CONFIG_NET_L2_WIFI_MGMT=y
# System settings
CONFIG_ASSERT=y
# Networking
CONFIG_NETWORKING=y
CONFIG_NET_BUF_RX_COUNT=1
CONFIG_NET_BUF_TX_COUNT=1
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_NATIVE=n
CONFIG_NET_OFFLOAD=y
CONFIG_INIT_STACKS=y
# Memories
CONFIG_MAIN_STACK_SIZE=5200
# Debugging
CONFIG_STACK_SENTINEL=y
CONFIG_DEBUG_COREDUMP=y
CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=y
CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y
# Logging
CONFIG_LOG=y
CONFIG_PRINTK=y
# If below config is enabled, printk logs are
# buffered. For unbuffered messages, disable this.
CONFIG_LOG_PRINTK=n
# printing of scan results puts pressure on queues in new locking
# design in net_mgmt. So, use a higher timeout for a crowded
# environment.
CONFIG_NET_MGMT_EVENT_QUEUE_TIMEOUT=5000
# Raw scan Options
CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS=n
CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS_ONLY=n
CONFIG_WIFI_SCAN_DWELL_TIME_ACTIVE=50
CONFIG_WIFI_SCAN_DWELL_TIME_PASSIVE=130
# --- RTT console output ---
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
# Pick ONE console:
CONFIG_UART_CONSOLE=n
CONFIG_SHELL_BACKEND_SERIAL=n
# If you want the shell over RTT:
CONFIG_SHELL=y
CONFIG_SHELL_BACKEND_RTT=y
CONFIG_SHELL_PROMPT_RTT="mosh:~$ "
# Make printk go to console immediately (optional but helpful)
CONFIG_LOG_PRINTK=y
the output of the RTT is below:
SEGGER J-Link V8.66 - Real time terminal output
SEGGER J-Link (unknown) V1.0, SN=1057703105
Process: JLink.exe
*** Booting nRF Connect SDK v3.2.1-d8887f6f32df ***
*** Using Zephyr OS v4.2.99-ec78104f1569 ***
mosh:~$
Starting nrf54l15dk with CPU frequency: 128 MHz
ASSERTION FAIL [iface] @ WEST_TOPDIR/zephyr/include/zephyr/net/net_if.h:775
[00:00:01.011,709] <err> os: r0/a1: 0x00000004 r1/a2: 0x00000307 r2/a3: 0x00000003
[00:00:01.011,716] <err> os: r3/a4: 0x00000004 r12/ip: 0x200052dc r14/lr: 0x00007f83
[00:00:01.011,722] <err> os: xpsr: 0x09000000
[00:00:01.011,726] <err> os: Faulting instruction address (r15/pc): 0x0001095c
[00:00:01.011,745] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[00:00:01.011,762] <err> os: Current thread: 0x20001450 (main)
[00:00:01.570,413] <err> coredump: #CD:BEGIN#
[00:00:01.749,789] <err> coredump: #CD:5a450200030005
SEGGER J-Link (unknown) V1.0, SN=1057703105
Process: JLink.exe
*** Booting nRF Connect SDK v3.2.1-d8887f6f32df ***
*** Using Zephyr OS v4.2.99-ec78104f1569 ***
mosh:~$
Starting nrf54l15dk with CPU frequency: 128 MHz
ASSERTION FAIL [iface] @ WEST_TOPDIR/zephyr/include/zephyr/net/net_if.h:775
[00:00:01.011,709] <err> os: r0/a1: 0x00000004 r1/a2: 0x00000307 r2/a3: 0x00000003
[00:00:01.011,716] <err> os: r3/a4: 0x00000004 r12/ip: 0x200052dc r14/lr: 0x00007f83
[00:00:01.011,722] <err> os: xpsr: 0x09000000
[00:00:01.011,726] <err> os: Faulting instruction address (r15/pc): 0x0001095c
[00:00:01.011,745] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[00:00:01.011,762] <err> os: Current thread: 0x20001450 (main)
[00:00:01.570,413] <err> coredump: #CD:BEGIN#
[00:00:01.749,789] <err> coredump: #CD:5a450200030005