Using an nrf5340 with nrf7002 wifi, connected via SPI4. Using a shared (chip) antenna, and the COEX signals (pretty much exactly as per the dev board schema).
DTS snippets:
I have configured prj.conf to have the wifi STA 'iot' operation, as per the docs:
# WIFI config CONFIG_WIFI=y CONFIG_WIFI_NRF700X=y # WPA supplicant CONFIG_WPA_SUPP=y CONFIG_NRF700X_AP_MODE=n CONFIG_NRF700X_P2P_MODE=n # Networking layers CONFIG_NETWORKING=y CONFIG_NET_SOCKETS=y CONFIG_NET_LOG=y CONFIG_NET_IPV4=y CONFIG_NET_UDP=y CONFIG_NET_TCP=y CONFIG_NET_DHCPV4=y CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=2 CONFIG_NET_MAX_CONTEXTS=1 CONFIG_NET_CONTEXT_SYNC_RECV=y CONFIG_NET_L2_ETHERNET=y CONFIG_NET_CONFIG_SETTINGS=y CONFIG_NET_CONFIG_INIT_TIMEOUT=0 CONFIG_NET_SOCKETS_POLL_MAX=1 # Memory usage CONFIG_NET_TX_STACK_SIZE=4096 CONFIG_NET_RX_STACK_SIZE=4096 # Optimized networking settings for memory usage (STA MODE IOT DEVICES profile) # https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/wifi/stack_configuration.html CONFIG_NRF700X_MAX_TX_TOKENS=5 CONFIG_NRF700X_MAX_TX_AGGREGATION=1 CONFIG_NRF700X_RX_NUM_BUFS=6 CONFIG_NET_TC_TX_COUNT=1 CONFIG_NET_PKT_RX_COUNT=6 CONFIG_NET_PKT_TX_COUNT=6 CONFIG_NET_BUF_RX_COUNT=6 CONFIG_NET_BUF_TX_COUNT=12 # can take BUF_DATAT_SIZE down to 500 CONFIG_NET_BUF_DATA_SIZE=800
However, at boot time I see these logs:
[00:00:00.015,686] <inf> wifi_nrf_bus: SPIM spi@a000: freq = 33 MHz
[00:00:00.022,369] <inf> wifi_nrf_bus: SPIM spi@a000: latency = 1
[00:00:01.074,981] <err> wifi_nrf: hal_fw_patch_load: Failed to allocate memory for patch UMAC-bin: chunk 1/6, size: 8192
[00:00:01.086,639] <err> wifi_nrf: nrf_wifi_fmac_fw_load: UMAC patch load failed
[00:00:01.094,818] <err> wifi_nrf: nrf_wifi_fw_load: nrf_wifi_fmac_fw_load failed
[00:00:01.103,027] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fw_load failed
[00:00:01.113,891] <err> wifi_nrf: nrf_wifi_if_start_zep: nrf_wifi_fmac_dev_add_zep failed
Note I also have configured malloc to use the system heap, and for it to occupy all remaining RAM:
Then when I attempt to initialise the wifi I get this crash
[00:00:13.322,784] <err> os: ***** USAGE FAULT *****
[00:00:13.328,399] <err> os: Unaligned memory access
[00:00:13.334,197] <err> os: r0/a1: 0xa07eeaff r1/a2: 0x00000068 r2/a3: 0x0000005c
[00:00:13.342,834] <err> os: r3/a4: 0x20047130 r12/ip: 0x00000000 r14/lr: 0x00063dc9
[00:00:13.351,440] <err> os: xpsr: 0x61000000
[00:00:13.356,628] <err> os: Faulting instruction address (r15/pc): 0x0009bafe
[00:00:13.364,501] <err> os: >>> ZEPHYR FATAL ERROR 31: Unknown error on CPU 0
[00:00:13.372,375] <err> os: Current thread: 0x20007340 (sysworkq)
[00:00:13.379,180] <err> os: Halting system
in nrf_wifi_osal_mem_zalloc() according to zephyr.map.
This is called somewherr from nrf_wifi_coex_config_non_pta():