Optional FEM properties for nRF21540 GPIO and GPIO+SPI

The following properties are optional for use with the GPIO and GPIO+SPI modes:

  • Properties that control the other pins:

  • Properties that control the timing of interface signals:

    • tx-en-settle-time-us - Minimal time interval between asserting the TX_EN signal and starting the radio transmission, in microseconds.

    • rx-en-settle-time-us - Minimal time interval between asserting the RX_EN signal and starting the radio transmission, in microseconds.

      Note

      Values for these two properties cannot be higher than the Radio Ramp-Up time defined by TX_RAMP_UP_TIME and RX_RAMP_UP_TIME. If the value is too high, the radio driver will not work properly and will not control FEM. Moreover, setting a value that is lower than the default value can cause disturbances in the radio transmission, because FEM may be triggered too late.

    • pdn-settle-time-us - Time interval before the PA or LNA activation reserved for the FEM ramp-up, in microseconds.

    • trx-hold-time-us - Time interval for which the FEM is kept powered up after the event that triggers the PDN deactivation, in microseconds.

    The default values of these properties are appropriate for default hardware and most use cases. You can override them if you need additional capacitors, for example when using custom hardware. In such cases, add the property name under the required properties in the devicetree node and set a new custom value.

    Note

    These values have some constraints. For details, see nRF21540 Product Specification.

Setting the FEM output power with nRF21540

nRF21540 implementations have the gain set to 10 by default. You can set a different gain value to use through the CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB option, but it has to match the value of one of the POUTA (CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA ) or POUTB (CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB) gains.

Caution

CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA and CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB are by default set to 20 and 10 and these are factory-precalibrated gain values. Do not change these values, unless POUTA and POUTB were calibrated to different values on specific request.

To enable runtime control of the gain, set the CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL to y. This option makes the gain of the FEM to be adjusted dynamically during runtime, depending on the power requested by the protocol driver for each transmission.

The following differences apply for both nRF21540 implementations:

  • For the nRF21540 GPIO implementation, you must enable the MODE pin in devicetree.

  • For the nRF21540 GPIO+SPI implementation, no additional configuration is needed as the gain setting is transmitted over the SPI bus to the nRF21540.