nRF21540-DK how to get good results?

I just received the nRF21540-DK and am trying to see the range enhancements.

I simply created a new application by copying the "Bluetooth Peripheral" sample in Visual Studio Code with nRF Connect SDK v2.9.0, added "CONFIG_BT_CTLR_PHY_2M=n" to prj.conf and then created a build config using nrf21540dk/nrf52840 as target board. No other changes. I use the devkit as is, no extra connection except the USB cable.

After flashing this code, I use nRF Connect app on a smartphone to see how good the range is and when the connectivity drops. Then I compare this with an nRF54L15 devkit that I also have on my desk (no FEM), using that as a peripheral connected to the same smartphone (using 1 MBit/s and 4 dBm TX power). I see that the range to the nRF54L15 devkit is better than the nRF21540-DK. At the position where nRF21540-DK drops the connection, the phone can still be connected to the nRF54L15 devkit. Also the RSSI is better from the nRF54, something like 5-15 dBm better.

Do I have to do something particular to make sure the FEM is activated and boosts TX and RX? I thought everything should just be baked into the SDK and be plug-n-play.

Note: I live in the EU so I guess the 20 dBm config cannot be used; only the 10 dBm is allowed, right?

In the generated .config file I can see these lines if those are of any importance:

# CONFIG_MPSL_FEM_ONLY is not set
CONFIG_MPSL_FEM_ANY_SUPPORT=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SUPPORT=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SPI_SUPPORT=y
CONFIG_MPSL_FEM_NCS_SUPPORTED_FEM_USED=y
CONFIG_MPSL_FEM_API_AVAILABLE=y
CONFIG_MPSL_FEM=y
CONFIG_MPSL_FEM_NRF21540_GPIO=y
# CONFIG_MPSL_FEM_NRF21540_GPIO_SPI is not set
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=10
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=20
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB=10
CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB=13
# CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL is not set
# CONFIG_MPSL_FEM_POWER_MODEL is not set
CONFIG_MPSL_FEM_DEVICE_CONFIG_254=y

Parents Reply
  • Thanks! I think that made the trick.

    I was assuming the higher tx power of 10 dBm was automatically set because this document https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/fem/fem_nRF21540_optional_properties.html says "nRF21540 implementations have the gain set to 10 by default". Therefore I'm wondering, how does the CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB setting relate to CONFIG_BT_CTLR_TX_PWR_ANTENNA? Will the SDK set gain to 10 on the FEM and then set the radio peripheral's TX power to CONFIG_BT_CTLR_TX_PWR_ANTENNA minus 10 so that the desired tx power is achieved? Or how does it work?

    In any case, I would suggest you to write in the quick start or getting started documentation of nRF21540-DK that the CONFIG_BT_CTLR_TX_PWR_ANTENNA setting must be modified to actually get any amplification, because I was under the impression that the amplification was done automatically when FEM was activated.

    I'm also wondering, is the LNA always activated in the SDK by default, or do I have to do something there as well to also get better receive sensitivity?

Children
  • Emil Lenngren said:
    I was assuming the higher tx power of 10 dBm was automatically set because this document https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/fem/fem_nRF21540_optional_properties.html says "nRF21540 implementations have the gain set to 10 by default". Therefore I'm wondering, how does the CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB setting relate to CONFIG_BT_CTLR_TX_PWR_ANTENNA? Will the SDK set gain to 10 on the FEM and then set the radio peripheral's TX power to CONFIG_BT_CTLR_TX_PWR_ANTENNA minus 10 so that the desired tx power is achieved? Or how does it work?

    The CONFIG_BT_CTLR_TX_PWR_ANTENNA sets the final output power on the antenna, output power from the SoC + the gain from the FEM. So by default when CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB is set to 10dB the output power of the SoC is turned down to -10dBm, to achieve 0dBm.

    Due to the radio having only a set number of TX powers it can transmit at, not all output powers requested using CONFIG_BT_CTRLR_TX_PWR_ANTENNA is possible, in this situation the MPSL front end module driver will make sure that the actual output power on the antenna is equal or lower to what is being requested.

    If 11dBm is requested at the antenna, and the nRF21540 is used in GPIO only mode(only 10 or 20dB gain) the closes possible combination without exceeding the requested output power is 10dBm since the radio can't transmit 1dBm.

    Emil Lenngren said:
    I'm also wondering, is the LNA always activated in the SDK by default, or do I have to do something there as well to also get better receive sensitivity?

    The LNA is always active when the FEM is in RX mode, this is controlled by the MPSL FEM driver, so you don't need to do anything extra to enable the gain.

     

    Best regards,

    Bendik

Related