nrf21540 gain control

Hi All!

Hope you are doing well. I am using NCS 2.0.2 and VSCODE studio. Radio Test example using nrf52833+nrf21540(custom HW) . I want to ask a question how to control the gain of nrf21540 ? 

How to enable it in the radio test example and what will be the sequence of commands for that?

I am using a sequence of commands with only nrf52833DK to ensure FW is working. And output RSSI value is increasing.

output_power pos0dB  /3db /8db

 start_channel 20
 end_channel 60
 start_tx_carrier
 start_tx_sweep

Thanks & Regards,

Parents Reply
  • Hi Muhammad,

    If you just build the project and examine the Kconfig output, you will see that the MPSL library is already enabled.

    Update: The library is not included by default. See my next reply

    Without building, you can find how to include the MPSL library with one of these two approaches.

    The first one is you can see that the sample folder contains a Kconfig file. This adds Kconfig options unique to the sample that you can build with.

    In that Kconfig file, you can see that it also "includes" another Kconfig file with the rsource line, which include another one... Overall, the sample will add Kconfig defined in the following files:
    \<ncs_sdk_folder>\nrf\samples\bluetooth\direct_test_mode\src\fem\Kconfig
    \<ncs_sdk_folder>\nrf\samples\bluetooth\direct_test_mode\Kconfig
    \<ncs_sdk_folder>\nrf\samples\peripheral\radio_test\Kconfig

    Going over all the configuration, you can see that you it has the Kconfig CONFIG_FEM, which is on by default, and will include the MPSL in FEM only mode for you.

    Update: CONFIG_FEM is not enabled by default. See my next reply.


    The second approach is to follow the guide linked below and add enable the following Kconfig
    CONFIG_MPSL
    CONFIG_MPSL_FEM_ONLY
    Guide referred: Working with RF front-end modules — nRF Connect SDK 2.3.0 documentation (nordicsemi.com)

    But as we see from the first approach, those configurations are turned on by default due to the project's setup.

Children
Related