You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/nrf/app_dev/device_guides/wifi_coex.rst
+44-47Lines changed: 44 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Coexistence of short-range radio and other radios
7
7
:local:
8
8
:depth: 2
9
9
10
-
This guide describes how to add short-range radio and other radio coexistence support to your application in |NCS|.
10
+
This guide describes how to add short-range radio and other radio coexistence support to your application in the |NCS|.
11
11
12
12
Short-range RF technologies (here referred to as SR), such as Bluetooth® LE or 802.15.4, use a different radio than other technologies like Wi-Fi® or LTE (here referred to as *the other radios*).
13
13
However, if both SR and the other radio attempt to transmit simultaneously, the radio frequency (RF) waves interfere with each other, causing decreased performance and higher power consumption.
@@ -21,12 +21,12 @@ Integration considerations
21
21
**************************
22
22
23
23
The |NCS| provides the coexistence feature by providing SR protocol drivers that can call the coexistence API and its implementations.
24
-
This feature is based on :ref:`nrfxlib:mpsl_cx` provided by the :ref:`nrfxlib:mpsl` (MPSL) library.
24
+
This feature is based on :ref:`mpsl_cx` provided by the :ref:`mpsl` (MPSL) library.
25
25
26
26
The following SR protocols are compatible with the coexistence feature:
27
27
28
-
* :ref:`Bluetooth LE <ug_ble_controller>`, if the implementation used is the :ref:`SoftDevice Controller <nrfxlib:softdevice_controller>`.
29
-
* Protocols based on :ref:`nrfxlib:nrf_802154`, such as :ref:`ug_thread` and :ref:`ug_zigbee`.
28
+
* :ref:`Bluetooth LE <ug_ble_controller>`, if the implementation used is the :ref:`softdevice_controller`.
29
+
* Protocols based on :ref:`nrf_802154`, such as :ref:`ug_thread` and :ref:`ug_zigbee`.
30
30
31
31
The following drivers are available:
32
32
@@ -39,24 +39,24 @@ The |NCS| provides a wrapper that configures Wi-Fi Coexistence based on devicetr
39
39
40
40
The following are the common requirements to use the coexistence feature:
41
41
42
-
1. The Kconfig option :kconfig:option:`CONFIG_MPSL` must be enabled.
43
-
Some protocol drivers, like :ref:`SoftDevice Controller <nrfxlib:softdevice_controller>`, enable this option by default.
44
-
2. The Kconfig option :kconfig:option:`CONFIG_MPSL_CX` must be enabled.
45
-
3. The requirements specific to the selected coexistence implementation must be met.
46
-
These include at least selecting one of supported values of the :kconfig:option:`CONFIG_MPSL_CX_CHOICE` choice.
47
-
For details on the requirements specific to the selected coexistence implementation, consult its documentation.
48
-
4. Ensure that the configuration of the ``nrf_radio_coex`` node appropriate for the selected implementation is present in the devicetree.
49
-
When using one of the supported implementations, you must use the ``nrf_radio_coex`` name for the node.
50
-
However, if you add a custom user implementation, you can also use a different name.
51
-
Some boards supported by the |NCS| (like :ref:`nrf7002dk<nrf7002dk_nrf5340>`) provide this node by default.
52
-
You can provide the node using either the devicetree source file of the target board or an overlay file.
53
-
See :ref:`zephyr:dt-guide` for more information about the DTS data structure, and :ref:`zephyr:dt_vs_kconfig` for information about differences between DTS and Kconfig.
54
-
5. On the nRF5340 SoC, the GPIO pins required for the communication with the PTA must be handed over to the network core.
55
-
You can use the ``nrf-gpio-forwarder`` node in application's core devicetree for that.
56
-
6. You can add a new device binding and use it as the ``compatible`` property for the node, if the provided hardware interfaces are unsuitable.
42
+
* The :kconfig:option:`CONFIG_MPSL` Kconfig option must be enabled.
43
+
Some protocol drivers, like :ref:`softdevice_controller`, enable this option by default.
44
+
* The :kconfig:option:`CONFIG_MPSL_CX` Kconfig option must be enabled.
45
+
* The requirements specific to the selected coexistence implementation must be met.
46
+
These include at least selecting one of supported values of the :kconfig:option:`CONFIG_MPSL_CX_CHOICE` choice.
47
+
For details on the requirements specific to the selected coexistence implementation, refer to its documentation.
48
+
* Ensure that the configuration of the ``nrf_radio_coex`` node appropriate for the selected implementation is present in the devicetree.
49
+
When using one of the supported implementations, you must use the ``nrf_radio_coex`` name for the node.
50
+
However, if you add a custom user implementation, you can also use a different name.
51
+
Some boards supported by the |NCS| (like :ref:`nRF7002 DK<nrf7002dk_nrf5340>`) provide this node by default.
52
+
You can provide the node using either the devicetree source file of the target board or an overlay file.
53
+
See :ref:`dt-guide` for more information about the DTS data structure, and :ref:`dt_vs_kconfig` for information about differences between DTS and Kconfig.
54
+
* On the nRF5340 SoC, the GPIO pins required for the communication with the PTA must be handed over to the network core.
55
+
You can use the ``nrf-gpio-forwarder`` node in application's core devicetree for that.
56
+
* You can add a new device binding and use it as the ``compatible`` property for the node, if the provided hardware interfaces are unsuitable.
57
57
58
58
.. note::
59
-
When using the nRF5340, apply steps 1 and 2 only to the network core.
59
+
When using the nRF5340, apply the first two requirements only to the network core.
60
60
61
61
.. note::
62
62
Do not enable Wi-Fi coexistence on the nRF5340 SoC in conjunction with Coded Phy and FEM, as this can lead to undefined behavior.
@@ -127,16 +127,15 @@ To enable Wi-Fi coexistence on the nRF70 Series device, complete the following s
127
127
The first element ``&gpio0`` indicates the GPIO port (``port 0`` has been selected in the example shown).
128
128
The second element is the pin number on that port.
129
129
130
-
#. On the nRF5340, you must also apply the same devicetree node mentioned in step 1 to the network core using sysbuild build system. For more information, see the :ref:`Migrating to sysbuild <child_parent_to_sysbuild_migration>` page.
131
-
Apply the overlay to the correct network core image by creating an overlay file named :file:`sysbuild/*image_name*/boards/nrf5340dk_nrf5340_cpunet.overlay` in your application directory, for example :file:`sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.overlay`.
132
-
133
-
The ``*image_name*`` value is ``ipc_radio`` :ref:`ipc_radio`.
130
+
#. On the nRF5340, also apply the same devicetree node mentioned in **Step 1** to the network core using the sysbuild build system.
131
+
For more information, see the :ref:`Migrating to sysbuild <child_parent_to_sysbuild_migration>` page.
132
+
To apply the overlay to the correct network core image, create an overlay file named :file:`sysbuild/\ *image_name*\ /boards/nrf5340dk_nrf5340_cpunet.overlay` in your application directory, for example :file:`sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.overlay`.
134
133
135
-
``ipc_radio`` represents all applications with support for the combination of both 802.15.4 and Bluetooth.
136
-
You can configure your application using the following sysbuild configurations:
134
+
The *image_name* value is ``ipc_radio`` (:ref:`ipc_radio`), which represents all applications with support for the combination of both 802.15.4 and Bluetooth.
135
+
To configure your application, use the following sysbuild configurations:
137
136
138
137
* ``SB_CONFIG_NETCORE_IPC_RADIO=y`` for applications having support for 802.15.4, but not for Bluetooth.
139
-
* ``SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y`` for application having support for Bluetooth, but not for 802.15.4.
138
+
* ``SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y`` for an application having support for Bluetooth, but not for 802.15.4.
140
139
* ``SB_CONFIG_NETCORE_IPC_RADIO=y`` and ``SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y`` for multiprotocol applications having support for both 802.15.4 and Bluetooth.
141
140
142
141
#. Enable the following Kconfig options:
@@ -145,14 +144,14 @@ To enable Wi-Fi coexistence on the nRF70 Series device, complete the following s
145
144
* :kconfig:option:`CONFIG_MPSL_CX_NRF700X`
146
145
147
146
.. note::
148
-
If a ``nordic,nrf700x-coex`` compatible node is present in the devicetree and :kconfig:option:`CONFIG_MPSL_CX` is set to ``y``, :kconfig:option:`MPSL_CX_NRF700X` will be selected by default.
147
+
If a ``nordic,nrf700x-coex`` compatible node is present in the devicetree and the :kconfig:option:`CONFIG_MPSL_CX` Kconfig option is set to ``y``, :kconfig:option:`MPSL_CX_NRF700X` will be selected by default.
149
148
150
149
.. _ug_radio_mpsl_cx_generic_3wire:
151
150
152
151
Generic three-wire coexistence
153
152
==============================
154
153
155
-
The generic three-wire coexistence is a three-wire coexistence interface which follows the Thread Radio Coexistence Practical recommendations for using a three-wire PTA implementation for co-located 2.4 GHz radios.
154
+
The generic three-wire coexistence is a three-wire coexistence interface that follows the Thread Radio Coexistence Practical recommendations for using a three-wire PTA implementation for co-located 2.4 GHz radios.
156
155
157
156
Hardware description
158
157
--------------------
@@ -176,7 +175,7 @@ The *DT property* is the name of the devicetree node property that configures th
176
175
Enabling generic three-wire coexistence
177
176
---------------------------------------
178
177
179
-
To enable the generic three-wire coexistence, do the following:
178
+
To enable the generic three-wire coexistence, complete the following steps:
180
179
181
180
182
181
1. Add the following node to the devicetree source file:
@@ -208,17 +207,15 @@ To enable the generic three-wire coexistence, do the following:
208
207
The first element ``&gpio0`` indicates the GPIO port (``port 0`` has been selected in the example shown).
209
208
The second element is the pin number on that port.
210
209
211
-
#. On nRF53 devices, you must also apply the same devicetree node mentioned in **Step 1** to the network core using sysbuild.
212
-
To apply the overlay to the correct network core image, create an overlay file named :file:`sysbuild/*image_name*/boards/nrf5340dk_nrf5340_cpunet.overlay` in your application directory, for example :file:`sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.overlay`.
210
+
#. On nRF53 devices, also apply the same devicetree node mentioned in **Step 1** to the network core using sysbuild.
211
+
To apply the overlay to the correct network core image, create an overlay file named :file:`sysbuild/\ *image_name*\ /boards/nrf5340dk_nrf5340_cpunet.overlay` in your application directory, for example :file:`sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.overlay`.
213
212
For more information, see the :ref:`Migrating to sysbuild <child_parent_to_sysbuild_migration>` page.
214
213
215
-
The *image_name* value is ``ipc_radio``:
216
-
217
-
``ipc_radio`` represents all applications with support for the combination of both 802.15.4 and Bluetooth.
218
-
You can configure your application using the following sysbuild configurations:
214
+
The *image_name* value is ``ipc_radio``, which represents all applications with support for the combination of both 802.15.4 and Bluetooth.
215
+
To configure your application, use the following sysbuild configurations:
219
216
220
217
* ``SB_CONFIG_NETCORE_IPC_RADIO=y`` for applications having support for 802.15.4, but not for Bluetooth.
221
-
* ``SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y`` for application having support for Bluetooth, but not for 802.15.4.
218
+
* ``SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y`` for an application having support for Bluetooth, but not for 802.15.4.
222
219
* ``SB_CONFIG_NETCORE_IPC_RADIO=y`` and ``SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y`` for multiprotocol applications having support for both 802.15.4 and Bluetooth.
223
220
224
221
#. Enable the following Kconfig options:
@@ -250,12 +247,12 @@ The *DT property* is the name of the devicetree node property that configures th
In cases where the GPIO is asserted after the radio activity has begun, the ``GRANT`` signal triggers a software interrupt, which in turn disables the radio.
253
-
No guarantee is made on the latency of this interrupt, but the ISR priority is configurable.
250
+
The latency of this interrupt is not guaranteed, but the ISR priority is configurable.
254
251
255
252
.. note::
256
-
The :ref:`nrfxlib:mpsl` (MPSL) library uses interrupts with priority 0.
253
+
The :ref:`mpsl` (MPSL) library uses interrupts with priority 0.
257
254
This may delay the GPIOTE interrupt in some rare cases.
258
-
For that reason, it's recommended to deny SR radio activity at least 400 microseconds before activity on the other radio, and to use a GPIOTE interrupt priority as close to 0 as possible.
255
+
For that reason, it is recommended to deny SR radio activity at least 400 microseconds before activity on the other radio, and to use a GPIOTE interrupt priority as close to 0 as possible.
259
256
260
257
Enabling generic one-wire coexistence
261
258
-------------------------------------
@@ -280,17 +277,17 @@ To enable the generic one-wire coexistence, do the following:
280
277
By default, or when set to 0, the ``GRANT`` signal will prevent both TX and RX.
281
278
When set to 1, it will only prevent TX.
282
279
283
-
#. Optionally, if not using the nRF91 Series SiP, the ``GRANT`` signal may be configured active-high using ``GPIO_ACTIVE_HIGH``
280
+
#. Optionally, if not using the nRF91 Series SiP, configure the ``GRANT`` signal active-high using ``GPIO_ACTIVE_HIGH``
284
281
#. Optionally, replace the node name ``radio_coex_one_wire`` with a custom one.
285
-
#. If not already present in the device tree, the GPIOTE interrupt may additionally be configured as follows (the first element is the IRQn, and the second is the priority):
282
+
#. If not already present in the device tree, configure the GPIOTE interrupt as follows (the first element is the IRQn, and the second is the priority):
286
283
287
284
.. code-block::
288
285
289
286
&gpiote {
290
287
interrupts = < 6 1 >;
291
288
};
292
289
293
-
#. Replace the pin number provided for the ``grant-gpios`` property:
290
+
#. Replace the pin number provided for the ``grant-gpios`` property.
294
291
This is the GPIO characteristic of the device that interfaces with the ``GRANT`` signal of the PTA (RF medium access granted).
295
292
296
293
The first element ``&gpio0`` indicates the GPIO port (``port 0`` has been selected in the example shown).
@@ -310,15 +307,15 @@ To add a custom coexistence implementation, complete following steps:
310
307
311
308
1. Determine the hardware interface of your PTA.
312
309
If your PTA uses an interface different from the ones already provided by the |NCS|, you need to provide a devicetree binding file.
313
-
See :file:`nrf/dts/bindings/radio_coex/generic-radio-coex-three-wire.yaml` file for an example.
310
+
See the :file:`nrf/dts/bindings/radio_coex/generic-radio-coex-three-wire.yaml` file for an example.
314
311
#. Extend the Kconfig choice :kconfig:option:`CONFIG_MPSL_CX_CHOICE` with a Kconfig option allowing to select the new coex implementation.
315
312
#. Write the implementation for your PTA.
316
313
See the :file:`nrf/subsys/mpsl/cx/3wire/mpsl_cx_3wire.c` file for an example.
317
314
Add the C source file(s) with the implementation, which must contain the following parts:
318
315
319
316
* The implementation of the functions required by the interface structure :c:struct:`mpsl_cx_interface_t`.
320
317
Refer to :ref:`MPSL CX API <mpsl_api_sr_cx>` for details.
321
-
* The initialization code initializing the required hardware resources, based on devicetree information.
322
-
* A call to the function :c:func:`mpsl_cx_interface_set` during the system initialization.
318
+
* The code initializing the required hardware resources, based on devicetree information.
319
+
* A call to the :c:func:`mpsl_cx_interface_set` function during the system initialization.
323
320
324
-
#. Add the necessary CMakeLists.txt entries to get your code compiled when the new Kconfig choice option you added is selected.
321
+
#. Add the necessary :file:`CMakeLists.txt` entries to get your code compiled when the new Kconfig choice option you added is selected.
0 commit comments