nRF71 short-range coexistence driver
The nRF71 short-range (SR) coexistence driver coordinates the concurrent operation of the Wi-Fi® and short-range (Bluetooth® LE) radios on an nRF71 Series device, which integrates both radios on a single die.
Coexistence is arbitrated on-chip by the Coexistence Controller (COEXC) hardware together with a Coexistence Manager (CM) that runs in the Wi-Fi processor firmware. The Coexistence Driver (CD) is the host-side coordination layer between the Wi-Fi driver, the short-range driver, and the Coexistence Manager. This differs from the nRF70 Series, where a separate Wi-Fi companion arbitrates with an external short-range SoC over a wired Packet Traffic Arbitration (PTA) interface.
Overview
The coexistence driver performs the following functions:
Exposes APIs (
coex_cd_*) that the short-range and Wi-Fi drivers call to request short-range priority windows, report short-range activity, and notify radio power state changes.Invokes APIs (
coex_sr_*) on the short-range driver to enable coexistence and to configure the short-range priorities.Forwards coexistence commands to, and processes events from, the Coexistence Manager over the Wi-Fi host-to-firmware control path.
The users of the driver are the nRF71 Wi-Fi driver and the short-range (Bluetooth LE) driver. Applications do not call it directly. The driver depends on the nRF71 Wi-Fi driver, because the command and event path to the Coexistence Manager runs over it, and it is only meaningful when the Wi-Fi radio is present.
Architecture
The following diagram shows the components and the interfaces between them:
The main interfaces are:
Wi-Fi driver ↔ CD - Radio power state notifications (
coex_cd_wifi_power_notify()), and the transport the CD uses to reach the Coexistence Manager (nrf71_wifi_coex_cmd_send()andnrf71_wifi_coex_on_event()).short-range driver ↔ CD - The short-range driver requests priority windows, reports activity, and notifies power state changes through
coex_cd_*. The CD configures the short-range driver throughcoex_sr_*.CD ↔ Coexistence Manager -
CD2CMcommands andCM2CDevents, carried over the Wi-Fi control path. The Coexistence Manager programs the COEXC hardware and handles hardware requests from the radios.
Relationship to MPSL coexistence
The Multiprotocol Service Layer (MPSL) coexistence feature (mpsl_cx) implements a wired-PTA request/grant interface for arbitrating a Nordic short-range radio against an external Wi-Fi companion.
The nRF71 coexistence driver targets a different topology, supporting on-die arbitration between co-located radios through the COEXC hardware and the firmware Coexistence Manager.
The two mechanisms are therefore independent, and the coexistence driver is a standalone driver rather than an MPSL coexistence backend.
Feature support
The following coexistence features are implemented in the current release:
Startup coexistence configuration (Wi-Fi and short-range priority ranges and user parameters).
Runtime Wi-Fi coexistence enable and disable.
Radio power-down and power-up handling for the Wi-Fi and short-range drivers.
The following features are planned for a later phase, and are not available in the current release:
Short-range Single Priority Window requests (a request returns
-ENOTSUP).Periodic Priority Window generation, without and with alignment (a request returns
-ENOTSUP).Thread activity Periodic Priority Windows.
Scheduling service and runtime adaptive priority optimization.
Wi-Fi channel or band change handling and the associated Bluetooth LE bad-channel mapping.
Configuration
To enable the driver, use the CONFIG_NRF71_SR_COEX_DRIVER Kconfig option.
As coexistence involves both radios, the driver depends on the nRF71 Wi-Fi driver (CONFIG_WIFI_NRF71) and Bluetooth (CONFIG_BT).
The following Kconfig options configure the driver:
CONFIG_NRF71_SR_COEX_DRIVER_INIT_PRIORITY- Sets the initialization priority within theAPPLICATIONinitialization level, kept after the Wi-Fi driver.CONFIG_NRF71_SR_COEX_DRIVER_LOG_LEVEL- Sets the log level for the driver.
API documentation
The coexistence API contract (the coex_cd_* and coex_sr_* functions and the CD2CM/CM2CD message types) is defined by the coexistence firmware interface headers, which match the interface of the ROMed nRF71 firmware.
drivers/wifi/nrf71/fw_if/nrf71_coex_if.hdrivers/wifi/nrf71/fw_if/nrf71_cd_sr_if.hinclude/drivers/wifi/nrf71/nrf71_wifi_coex.hdrivers/nrf71_sr_coex/src/The following APIs are exposed by the coexistence driver to the short-range and Wi-Fi drivers:
coex_cd_sr_software_client_request()- Requests or releases a short-range Single Priority Window (Phase 2; currently returns-ENOTSUP).coex_cd_update_short_range_activity_info()- Reports short-range activity for Periodic Priority Window generation (Phase 2; currently returns-ENOTSUP).coex_cd_sr_power_notify()- Notifies the coexistence driver of short-range power-down and power-up events.coex_cd_wifi_power_notify()- Notifies the coexistence driver of Wi-Fi power-down and power-up events.
The following APIs are exposed by the short-range driver and invoked by the coexistence driver:
coex_sr_enable()- Enables or disables short-range coexistence.coex_sr_set_client_priority()- Configures the short-range client priority ranges.