nRF54L15 with nRF7002 custom board scan and shell problem

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
Parents
  • Hi,

     

    &spi1 {

    There is no SPIM1 device in L15:

    https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/spim.html#ariaid-title9

     

    Which SPIM device are you using?

        spi1_default: spi1_default {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
                    <NRF_PSEL(SPIM_MISO, 2, 10)>,
                    <NRF_PSEL(SPIM_MOSI, 2, 9)>;
            };

    This pinout should be used with SPIM00, unless you want to do cross-domain:

    https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/chapters/pin.html#ariaid-title2

     

    Kind regards,

    Håkon

  • Hi Håkon,
    Thank you replying. 
    The nRF54L15 is connected to the nRF7002 as per below pin connections:
    nRF7002 CLK: P2.06
    nRF7002 chip-select: P1.10
    nRF7002 MOSI: P2.10
    nRF7002 MISO: P2.09
    nRF7002 IRQ: P1.14


    nRF7002 STATUS0: P1.09
    nRF7002 COEX_REQ: P1.05
    nRF7002 COES_GRANT: P1.04
    nRF7002 SW_CTRL1: P1.13

    Am I still able to use SPIM00 for SPI communication between the nRF54L15 and nRF7002?

  • Hi,

     

    Am I still able to use SPIM00 for SPI communication between the nRF54L15 and nRF7002?

    Yes, you should be able to use SPIM00 on P2, for the nrf7002.

    Other interrupt pins are placed on P1, which has GPIOTE capabilities, which is good.

     

    Have you defined your own board, or are you using the nrf54l15dk as a reference?

    If using the nrf54l15dk/nrf54l15/cpuapp board, you need to disable uart20, or change the pins it uses, as it will use P1.04 to P1.07 by default.

     

    spi-max-frequency = <DT_FREQ_M(1)>;

    SPIM00 is clocked by the 128 MHz, and the prescaler is up to 126, meaning that 1 MHz is the very lowest speed you can run this specific instance on.

     

    If you still have issues, please share you full log.

    Kind regards,

    Håkon

  • Hi Håkon,
    Thank you replying.
    I am still having issues with communicating with the nRF7002 using nRF54L15. I am using the nRF54L15 DK to program my board using nrf54l15dk/nrf54l15/cpuapp.
    the RTT output log is:

    SEGGER J-Link V8.66 - Real time terminal output
    SEGGER J-Link (unknown) V1.0, SN=1057703105
    Process: JLink.exe
    nrf_wifi_if_zep_start_board dev=wlan0
    power: bucken=1 iovdd=1 io2=1 io3=1
    [00:00:00.097,714] <dbg> wifi_nrf_bus: rpu_gpio_config: GPIO configuration done...
    
    [00:00:00.100,088] <dbg> wifi_nrf_bus: rpu_pwron: Bucken = 1, IOVDD = 1
    [00:00:00.100,251] <inf> wifi_nrf_bus: SPIM spi@4a000: freq = 1 MHz
    [00:00:00.100,391] <inf> wifi_nrf_bus: SPIM spi@4a000: latency = 0
    [00:00:00.100,541] <err> spi_nrfx_spim: Failed to initialize nrfx driver: -22
    [00:00:00.100,700] <err> wifi_nrf_bus: SPI error: -22
    [00:00:00.100,829] <dbg> wifi_nrf_bus: rpu_wrsr2: Written 0x1 to WRSR2
    [00:00:00.100,971] <err> wifi_nrf_bus: Error: WRSR2 failed
    [00:00:00.101,108] <err> wifi_nrf: zep_shim_bus_qspi_dev_add: RPU enable failed with error -22
    [00:00:00.101,312] <err> wifi_nrf: nrf_wifi_bus_qspi_dev_add: nrf_wifi_osal_bus_qspi_dev_add failed
    [00:00:00.101,524] <err> wifi_nrf: nrf_wifi_bal_dev_add: Bus dev_add failed
    [00:00[00:00:21.209,014] <err> wifi_nrf: nrf_wifi_disp_scan_zep: Interface not UP
    [00:00:21.209,172] <err> scan: Scan request failed
    [00:00:31.209,365] <err> wifi_nrf: nrf_wifi_disp_scan_zep: Interface not UP
    [00:00:31.209,522] <err> scan: Scan request failed
    [00:00:41.209,713] <err> wifi_nrf: nrf_wifi_disp_scan_zep: Interface not UP
    [00:00:41.209,870] <err> scan: Scan request failed
    [00:00:51.210,061] <err> wifi_nrf: nrf_wifi_disp_scan_zep: Interface not UP
    [00:00:51.210,218] <err> scan: Scan request failed

    I used the scan sample example as starting point, below is my full application:
    scan_1.zip

    My schematic is below. My VBAT was floating initially, but I connected to the 3.3V from the regulatorpca10156_sheet2_nRF54L15.pdf

    I have also tried the shell example, but i get the same RTT output errors.
    My IOVDD, BUCKEN, and VBAT are all 3.3V

    Not sure if it is a hardware issue or a firmware issue. 


  • Hi,

     

    SPIM00 is unable to initialize, with "SPI error: -22" in your log, due to the frequency set is too low. My former comment here states 1 MHz as the lowest, but I believe you need to adjust it to 2 MHz (or higher):

    Håkon Alseth said:
    SPIM00 is clocked by the 128 MHz, and the prescaler is up to 126, meaning that 1 MHz is the very lowest speed you can run this specific instance on.

      

    Kind regards,

    Håkon

  • Hi Håkon,
    I changed the SPI frequency to 2MHz but i got a set new errors:

    SEGGER J-Link V8.66 - Real time terminal output
    SEGGER J-Link (unknown) V1.0, SN=1057703105
    Process: JLink.exe
    nrf_wifi_if_zep_start_board dev=wlan0
    power: bucken=1 iovdd=1 io2=1 io3=1
    [00:00:00.097,704] <dbg> wifi_nrf_bus: rpu_gpio_config: GPIO configuration done...
    
    [00:00:00.100,075] <dbg> wifi_nrf_bus: rpu_pwron: Bucken = 1, IOVDD = 1
    [00:00:00.100,237] <inf> wifi_nrf_bus: SPIM spi@4a000: freq = 2 MHz
    [00:00:00.100,378] <inf> wifi_nrf_bus: SPIM spi@4a000: latency = 0
    [00:00:00.100,591] <dbg> wifi_nrf_bus: rpu_wrsr2: Written 0x1 to WRSR2
    [00:00:00.100,835] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.101,003] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.102,334] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.102,505] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.103,837] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.104,008] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.105,339] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.105,509] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.106,839] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.107,009] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.108,338] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.108,508] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.109,838] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.110,008] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.111,339] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.111,510] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.112,842] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.113,013] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.114,344] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:00.114,515] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:00.115,777] <err> wifi_nrf_bus: RPU wakeup write ACK failed even after 10ms
    [00:00:00.115,942] <err> wifi_nrf_bus: Error: RDSR2 failed
    [00:00:00.116,081] <err> wifi_nrf: zep_shim_bus_qspi_dev_add: RPU enable failed with error -1
    [00:00:00.116,285] <err> wifi_nrf: nrf_wifi_bus_qspi_dev_add: nrf_wifi_osal_bus_qspi_dev_add failed
    [00:00:00.121,495] <err> wifi_nrf: nrf_wifi_bal_dev_add: Bus dev_add failed
    [00:00:00.121,682] <err> wifi_nrf: nrf_wifi_sys_hal_dev_add: nrf_wifi_bal_dev_add failed
    [00:00:00.121,914] <err> wifi_nrf: nrf_wifi_sys_fmac_dev_add: nrf_wifi_sys_hal_dev_add failed
    [00:00:00.122,105] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_add failed
    [00:00:00.122,280] <err> wifi_nrf: nrf_wifi_if_start_zep: nrf_wifi_fmac_dev_add_zep failed
    *** Booting nRF Connect SDK v3.2.1-d8887f6f32df ***
    *** Using Zephyr OS v4.2.99-ec78104f1569 ***
    nRF70 power keepalive: BUCKEN/IOVDD forced high
    Starting nrf54l15dk with CPU frequency: 128 MHz
    [00:00:01.122,905] <err> wifi_nrf: nrf_wifi_if_stop_zep: rpu_ctx_zep is NULL
    nrf_wifi_if_zep_start_board dev=wlan0
    spi@4a000: freq = 2 MHz
    [00:00:01.211,435] <inf> wifi_nrf_bus: SPIM spi@4a000: latency = 0
    [00:00:01.211,641] <dbg> wifi_nrf_bus: rpu_wrsr2: Written 0x1 to WRSR2
    [00:00:01.211,886] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.212,056] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:01.213,381] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.213,551] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:01.214,871] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.215,040] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:01.216,360] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.216,529] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:01.217,848] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.218,018] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:01.219,339] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.219,509] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:01.220,831] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.221,001] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:01.222,322] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.222,492] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:01.223,813] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.223,984] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x0
    [00:00:01.225,306] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 0 0 0 0 0
    [00:00:01.225,475] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RD

  • Hi,

     

    This log shows issues contacting the nRF7002:

    [00:00:00.116,081] <err> wifi_nrf: zep_shim_bus_qspi_dev_add: RPU enable failed with error -1
    [00:00:00.116,285] <err> wifi_nrf: nrf_wifi_bus_qspi_dev_add: nrf_wifi_osal_bus_qspi_dev_add failed
    [00:00:00.121,495] <err> wifi_nrf: nrf_wifi_bal_dev_add: Bus dev_add failed
    [00:00:00.121,682] <err> wifi_nrf: nrf_wifi_sys_hal_dev_add: nrf_wifi_bal_dev_add failed
    [00:00:00.121,914] <err> wifi_nrf: nrf_wifi_sys_fmac_dev_add: nrf_wifi_sys_hal_dev_add failed
    [00:00:00.122,105] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_add failed
    [00:00:00.122,280] <err> wifi_nrf: nrf_wifi_if_start_zep: nrf_wifi_fmac_dev_add_zep failed

     

    Q1: Have you tried to program the wifi/radio_test/multi_domain sample to the device, and issued the command in step 1 here?

    https://docs.nordicsemi.com/bundle/nan_043/page/APP/nan_043/otp_programming.html

    Q2: Have you tried to scope your pins to see if there is any of the signals that are misbehaving?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    This log shows issues contacting the nRF7002:

    [00:00:00.116,081] <err> wifi_nrf: zep_shim_bus_qspi_dev_add: RPU enable failed with error -1
    [00:00:00.116,285] <err> wifi_nrf: nrf_wifi_bus_qspi_dev_add: nrf_wifi_osal_bus_qspi_dev_add failed
    [00:00:00.121,495] <err> wifi_nrf: nrf_wifi_bal_dev_add: Bus dev_add failed
    [00:00:00.121,682] <err> wifi_nrf: nrf_wifi_sys_hal_dev_add: nrf_wifi_bal_dev_add failed
    [00:00:00.121,914] <err> wifi_nrf: nrf_wifi_sys_fmac_dev_add: nrf_wifi_sys_hal_dev_add failed
    [00:00:00.122,105] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_add failed
    [00:00:00.122,280] <err> wifi_nrf: nrf_wifi_if_start_zep: nrf_wifi_fmac_dev_add_zep failed

     

    Q1: Have you tried to program the wifi/radio_test/multi_domain sample to the device, and issued the command in step 1 here?

    https://docs.nordicsemi.com/bundle/nan_043/page/APP/nan_043/otp_programming.html

    Q2: Have you tried to scope your pins to see if there is any of the signals that are misbehaving?

     

    Kind regards,

    Håkon

Children
No Data
Related