[NCS 2.9.0] Wi-Fi SoftAP + BLE Coexistence 2x (nRF5340 + nRF7002): Complete Wi-Fi starvation upon BLE Adv start, leading to RPU crash.

Hello Nordic Support,

We are developing a project using two setsof nRF5340 DK with the nRF7002 EK attached. We are trying to achieve coexistence between Wi-Fi in SoftAP mode and BLE in Peripheral mode (Advertising) using NCS 2.9.0.

The application builds successfully, the system boots without IPC deadlocks, the Wi-Fi AP initializes, and a station can connect perfectly. However, the exact moment we initialize the BLE stack and start advertising (`bt_le_adv_start()`), the Wi-Fi interface is completely starved on the TX side.

Furthermore, after exactly 5 minutes of this starvation, the nRF7002 RPU crashes with an invalid memory address error via SPI (`0xAAAAAAAA`).

Symptoms:

1. SoftAP starts, Station connects, UDP handshake is ready.
2. We wait for the Station to be fully connected before calling
`bt_le_adv_start()`.
3. Once BLE Advertising starts, the Wi-Fi radio stops sending all packets
(including Beacons).
4. The connected Station (Node B) inevitably drops the connection within a 20-second timeframe due to missing Beacons.
5. Crucial Observation: If we use a "mock" BLE implementation (software
bypass without activating the actual MPSL radio), the Wi-Fi SoftAP maintains the
connection perfectly indefinitely (Current testing range was aprox. 2h)
6. If left running with BLE active, the Wi-Fi driver throws a fatal SPI/RPU
memory error after 5 minutes (likely during WPA key rotation or timeout cleanup
when the chip is unresponsive).

Boot Log:

[00:00:00.345,520] <inf> wifi_nrf_bus: SPIM spi@a000: freq = 8 MHz
[00:00:00.345,550] <inf> wifi_nrf_bus: SPIM spi@a000: latency = 0
[00:00:00.494,689] <inf> wifi_nrf: Management buffer offload enabled

*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
[00:00:00.518,981] <inf> app_main: Starting...
[00:00:00.519,012] <inf> objscn: initialized.
[00:00:00.519,104] <inf> app_main: Requesting SoftAP enable...
[00:00:00.519,134] <wrn> app_main: Wi-Fi MAC not ready, retrying in 500ms... (10
left)
[00:00:00.520,843] <inf> wifi_supplicant: wpa_supplicant initialized
[00:00:10.109,558] <inf> app_main: [EVENT] SoftAP MAC layer is fully active.
[00:00:10.109,558] <inf> app_main: Wifi hardware MAC: F4:CE:36:00:17:9E
[00:00:10.110,687] <inf> app_main: SoftAP is active. Firmware loaded safely
without SPI collision.
[00:00:10.110,778] <inf> app_main: Waiting for Node B to connect...
[00:00:13.710,601] <inf> app_main: [EVENT] Node B (Sonda) physically joined the
AP!
[00:00:13.711,730] <inf> app_main: Node B connected! Starting BLE system &
advertising.
[00:00:13.711,730] <inf> app_main: Initializing BLE System IPC (MPSL)...
[00:00:13.742,767] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:13.742,797] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
[00:00:13.742,828] <inf> bt_hci_core: Firmware: Standard Bluetooth controller
(0x00) Version 45.41337 Build 3074452168
[00:00:13.745,147] <inf> bt_hci_core: Identity: EC:B7:63:ED:2F:47 (random)
[00:00:13.745,147] <inf> bt_hci_core: HCI: version 6.0 (0x0e) revision 0x206b,
manufacturer 0x0059
[00:00:13.745,178] <inf> bt_hci_core: LMP: version 6.0 (0x0e) subver 0x206b
[00:00:13.745,208] <inf> blescn: BLE System IPC initialized
[00:00:14.247,650] <inf> blescn: BLE Advertising successfully started (Name:master)
[00:00:14.247,680] <inf> app_main: UDP Server listening on port 4242


// 5 minutes of Wi-Fi silence later...


[00:05:13.635,925] <err> wifi_nrf: hal_rpu_mem_write: Invalid memory address
0xAAAAAAAA
[00:05:13.636,016] <err> wifi_nrf: hal_rpu_msg_write: Copying information to RPU
failed
[00:05:13.636,077] <err> wifi_nrf: hal_rpu_cmd_process_queue: Writing command to
RPU failed
[00:05:13.636,108] <err> wifi_nrf: nrf_wifi_wpa_supp_sta_get_inact_sec:
nrf_wifi_fmac_get_station failed
objscn:~$


Meanwhile node B:


[00:00:11.619,689] <inf> app_station: [EVENT] Wi-Fi Handshake Complete!
Connected.
[00:00:31.571,319] <wrn> app_station: Connection lost! Self-healing active...


Hardware & Build Setup:

Board:`nrf5340dk/nrf5340/cpuapp/ns`
Shields applied via Sysbuild: `--shield "nrf7002ek nrf7002ek_coex"` (also
passed to the net core via `-Dipc_radio_SHIELD="nrf7002ek_coex"`).

Relevant Application `prj.conf`:

CONFIG_WIFI=y
CONFIG_WIFI_NRF70=y
CONFIG_NRF70_AP_MODE=y
CONFIG_WIFI_NM_WPA_SUPPLICANT_AP=y

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_MAX_CONN=2

# Coex Configuration
CONFIG_NRF70_SR_COEX=y
CONFIG_NRF70_SR_COEX_RF_SWITCH=y
CONFIG_MPSL_CX=y
CONFIG_MPSL_CX_NRF700X=y

# RPC disabled as per the official ble_coex sample to avoid IPC endpoint bond timeouts
CONFIG_NRF_RPC=n

Relevant Net Core (`sysbuild/ipc_radio/prj.conf`):

CONFIG_MBOX=y
CONFIG_IPC_SERVICE=y
CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_MAX_CONN=2

CONFIG_IPC_RADIO_BT=y
CONFIG_IPC_RADIO_BT_HCI_IPC=y

# Coex enabled on net core
CONFIG_MPSL=y
CONFIG_MPSL_CX=y
CONFIG_MPSL_CX_NRF700X=y

What we have already verified:

1. `CONFIG_MPSL_CX_NRF700X=y` is correctly set on both `cpuapp` and `cpunet`
(ipc_radio).
2. We removed any huge Event Length Kconfigs (like
`CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT`) that might monopolize the PTA.
3. We aligned HCI buffers to avoid `opcode 0x0c33` HCI errors.
4. Baseline Testing: We ran the unmodified samples/wifi/ble_coex from NCS 2.9.0. It initializes properly and successfully connects to a Wi-Fi network. However, we noticed the standard sample runs the Wi-Fi in STATION mode. Our requirement is strictly SoftAP mode.

It appears the hardware PTA arbiter gives 100% priority to the BLE stack once initialized, completely ignoring the SoftAP's strict requirement to send periodic Beacons and data.

Questions:

1. We observed that the official ble_coex sample works flawlessly because the Wi-Fi operates in STATION mode (utilizing Power Save to yield the antenna to BLE). However, SoftAP cannot sleep and must respect strict TBTT (Target Beacon Transmission Time). Does the current MPSL Coex framework in NCS 2.9.0 natively support dynamic time-slicing for SoftAP mode, or is the PTA arbiter designed to give exclusive priority to BLE Advertising, inherently starving the AP?
2. If SoftAP coexistence is supported, is there a specific Kconfig, low-level API call, or Zephyr Wi-Fi management command required to enforce Beacon priority so the nRF7002 is not muted by the BLE controller?
3. Given the board definition updates in NCS 2.9.x, does appending --shield "nrf7002ek_coex" via Sysbuild create a pin allocation conflict or override the default Devicetree routing in a way that breaks the GRANT signal from the net core? Should this specific shield overlay be omitted when building for nrf5340dk/nrf5340/cpuapp/ns?

Thank you in advance for your guidance.

Related