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,

  • Hi Hieu!

    I tried the radio test example as per above mentioned configuration but the RSSI viewer is showing -38dbm when i set 0dbm gain at nrf52833 and 20dbm default gain at nrf21540. Is it possible to read the CONFREG registers of nrf21540? via Vscode studio debugger? 

    Or any other option to observe that nrf21540 is working? One more option is to view SPI signals on an oscilloscope.

    What u suggest?

    Thanks & Regards,

    Muhammad Usman

  • Hi Muhammad,

    It is not possible to read the CONFREG registers of the nRF21540 via the VS Code Studio Debugger, because the debugger interface is not connected to the nRF21540 in anyway.

    You will need to read that register through the SPI interface.

    Viewing the SPI signals on an oscilloscope or a logic analyzer would tell you whether the nRF52/53 SoC is controlling the FEM but does not guarantee that the FEM is working.

    To confirm that the FEM is working, the best method is to measure the output power of the antenna directly, for example with a spectrum analyzer.

    As an alternative, you could consider configuring the FEM to different output power with the <output_power> and <total_output_power> commands and see if the RSSI value is changing as you would expect it to be. RSSI value is not very reliable, but as long as you keep the physical setup stable, it should be able to help you see differences.

    Regards,

    Hieu

  • Hi Hieu!

    Thank you so much for your response and help!

    Regards

    Muhammad Usman

Related