Enabling FEM support

The following Front-End Module (FEM) implementations are available in the nRF Connect SDK:

Implementation

Interface

Compatible hardware

Documentation for hardware implementation

nRF21540 GPIO+SPI

3-pin + SPI

nRF21540

Enabling GPIO+SPI mode support for nRF21540

nRF21540 GPIO

3-pin

nRF21540

Enabling GPIO mode support for nRF21540

Simple GPIO

2-pin

SKY66112-11 and other compatible FEMs

Enabling support for front-end modules using Simple GPIO interface

To use any of these implementations with your application, first complete the following steps:

  1. Enable the Front-end module feature in the Multiprotocol Service Layer (MPSL) library. It provides implementations of drivers for supported Front-end modules.

    • Enable support for MPSL by setting the CONFIG_MPSL Kconfig option to y. For radio protocol drivers based on MPSL, this option is selected by default.

    • Enable support for the FEM subsystem by setting the CONFIG_MPSL_FEM Kconfig option to y. This option is selected automatically if a supported FEM is provided in the application’s devicetree file.

    Note

    If your application cannot use MPSL but you wish to use only the FEM driver provided by MPSL, refer to MPSL FEM-only configuration for details.

  2. Use a radio protocol driver that uses the FEM driver described in the previous step. Currently, the following protocols use the FEM support provided by MPSL:

    For applications based on these protocols, the FEM driver provided by MPSL is used to correctly control the FEM depending on the current radio operation. For other radio protocol implementations and applications that control the radio directly, you must use the FEM driver according to the MPSL FEM API. For reference, see the following samples that are not based on any of the radio protocol drivers listed above and support FEM control:

  3. Define the FEM in the devicetree file of the application. This is where you choose one of the available implementations listed in the table above. Depending on the use case, you can do this by using one of the following methods:

    • Providing a devicetree overlay to the build.

    • Defining the value of the SHIELD CMake variable.

    • Modifying the target board devicetree file directly.

    Refer to the chosen documentation for hardware implementation for details.

  4. Select the FEM driver implementation by setting one of the following Kconfig options to y for the chosen FEM support configuration:

After connecting to the development kit and connecting the shield to the kit, you can build your application and program the development kit with the created binary file. Use the SHIELD CMake variable for this purpose (see Providing CMake options). If you are working with the nRF21540 EK, see also Developing with the nRF21540 EK.