Skip to content

Commit 0872c94

Browse files
Hubert Miśmbolivar-nordic
authored andcommitted
samples: use nRF21540-EK shield instead of devicetree overlays
Thread and Zigbee samples used a devicetree overlay to enable nRF21540 support. This patch removes the obsolete overlay and updates documentation to properly use recently introduced nRF21540-EK shield. Signed-off-by: Hubert Miś <[email protected]>
1 parent 5bf0097 commit 0872c94

File tree

12 files changed

+6
-63
lines changed

12 files changed

+6
-63
lines changed

doc/nrf/includes/sample_fem_support.txt

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,17 @@
55
You can add support for the nRF21540 front-end module to the sample.
66
See :ref:`ug_radio_fem` for more information.
77

8-
To add support for the nRF21540 FEM, add the provided :file:`dts-nrf21540-fem.overlay` devicetree overlay file when building.
9-
The file is located in the |fem_file_path| folder.
10-
Make sure that the GPIOs in the file correspond to those in which your front-end module is connected.
11-
12-
.. note::
13-
You must add the provided overlay file if you use the nRF21540 EK.
14-
If you use the nRF21540 DK, build your application for the :ref:`nrf21540dk_nrf52840 <zephyr:nrf21540dk_nrf52840>` board.
15-
The devicetree for the nRF21540 DK already contains the required FEM configuration, so you do not need to add the overlay file.
8+
To add support for the nRF21540 FEM, build the sample for a board containing nRF21540 FEM like nrf21540dk_nrf52840 or create a devicetree overlay file describing how FEM is connected to nRF5 SoC in your device.
169

1710
See :ref:`zephyr:set-devicetree-overlays` for different ways of adding the overlay file.
1811

19-
The easiest way to add the file when building is to set it in the ``DTC_OVERLAY_FILE`` variable.
20-
However, doing so will override the default settings.
21-
For some boards, this sample requires additional overlay files, which are automatically included when building with the default settings.
22-
When you set the ``DTC_OVERLAY_FILE`` variable, you must specify all overlay files that are needed for building.
23-
Check the :file:`boards` folder to see the additional overlay files.
12+
.. note::
13+
If you use the nRF21540 EK, append ``nrf21540_ek`` shield to your build command instructing build system to append the appropriate devicetree overlay file.
2414

25-
Follow the instructions in :ref:`cmake_options` to specify the ``DTC_OVERLAY_FILE`` variable.
2615
For example, to build the sample from the command line for an nRF52833 DK with an attached nRF21540 EK, invoke the following command within the sample directory:
2716

2817
.. code-block:: console
2918

30-
west build -b nrf52833dk_nrf52833 -- -DDTC_OVERLAY_FILE="boards/nrf52833dk_nrf52833.overlay;../common/dts-nrf21540-fem.overlay"
31-
32-
Alternatively, you can copy the contents of :file:`dts-nrf21540-fem.overlay` to the board's overlay file.
19+
west build -b nrf52833dk_nrf52833 -- -DSHIELD=nrf21540_ek
3320

34-
To add support for other front-end modules, add the respective overlay files in the same way.
21+
To add support for other front-end modules, add the respective devicetree file entries to the board devicetree file or a devicetree overlay file.

samples/openthread/cli/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ You can switch to USB transport by :ref:`activating the USB overlay extension <o
7575
FEM support
7676
===========
7777

78-
.. |fem_file_path| replace:: :file:`samples/openthread/common`
79-
8078
.. include:: /includes/sample_fem_support.txt
8179

8280
Requirements

samples/openthread/coap_client/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ For more information about the multiprotocol feature, see :ref:`ug_multiprotocol
4141
FEM support
4242
===========
4343

44-
.. |fem_file_path| replace:: :file:`samples/openthread/common`
45-
4644
.. include:: /includes/sample_fem_support.txt
4745

4846
Device Firmware Upgrade extension

samples/openthread/coap_server/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ For example usage of the Zephyr CoAp API, see the :ref:`coap_client_sample` samp
2929
FEM support
3030
===========
3131

32-
.. |fem_file_path| replace:: :file:`samples/openthread/common`
33-
3432
.. include:: /includes/sample_fem_support.txt
3533

3634
Requirements

samples/openthread/common/dts-nrf21540-fem.overlay

Lines changed: 0 additions & 14 deletions
This file was deleted.

samples/openthread/coprocessor/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ Use the :file:`overlay-logging.conf` overlay file as reference for this purpose.
5757
FEM support
5858
===========
5959

60-
.. |fem_file_path| replace:: :file:`samples/openthread/common`
61-
6260
.. include:: /includes/sample_fem_support.txt
6361

6462
Requirements

samples/zigbee/common/dts-nrf21540-fem.overlay

Lines changed: 0 additions & 14 deletions
This file was deleted.

samples/zigbee/light_bulb/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ Configuration
4141
FEM support
4242
===========
4343

44-
.. |fem_file_path| replace:: :file:`samples/zigbee/common`
45-
4644
.. include:: /includes/sample_fem_support.txt
4745

4846
User interface

samples/zigbee/light_switch/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ For more information about using configuration overlay files, see :ref:`zephyr:i
119119
FEM support
120120
===========
121121

122-
.. |fem_file_path| replace:: :file:`samples/zigbee/common`
123-
124122
.. include:: /includes/sample_fem_support.txt
125123

126124
.. _zigbee_light_switch_user_interface:

samples/zigbee/ncp/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ to upgrade the dongle, you can use one of the following options:
158158
FEM support
159159
===========
160160

161-
.. |fem_file_path| replace:: :file:`samples/zigbee/common`
162-
163161
.. include:: /includes/sample_fem_support.txt
164162

165163
.. _zigbee_ncp_user_interface:

0 commit comments

Comments
 (0)