nRF21540 custom gain with MPSL

Hello,

To follow the talk we add on this ticket.

 How can I configure a custom TX gain with the MPSL library ?

I want to have an output power of 8 dBm on the nRF21540.

I tried to change the MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA and set CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL configs but the signal on a analyzer was -23dBm and not near 8 dBm as I wanted.

When I just use the default value of 10 dBm, the analyzer get a power near 10 dBm as wanted.

Regards,

Andrew

Parents
  • Hi, 

    Please kindly share the whole content of the conf file. Thanks. 

    Regards,
    Amanda H. 

  • Here is the conf file used with the radio_test project for the nrf21540dk_nrf52840 board:

    #
    # Copyright (c) 2020 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    CONFIG_CONSOLE=y
    CONFIG_CONSOLE_HANDLER=y
    CONFIG_SHELL=y
    
    CONFIG_DYNAMIC_INTERRUPTS=y
    
    CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y
    CONFIG_MPSL_FEM_NRF21540_GPIO_SPI=y
    CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=8
    
    CONFIG_NRFX_TIMER0=y
    
    CONFIG_ENTROPY_GENERATOR=y
    
    CONFIG_SHELL_BACKEND_RTT=y
    CONFIG_SENSOR=y

    WIth this one, when I use the command "total_output_power 8" and then "start_tx_modulated_carrier" I have -23dBm on the analyzer.

    Regards,

    Andrew

  • Hi Andrew, 

    AndrewSafehear said:
    The PR didn't help...

    Doesn't the PR help the radio_test project? Another customer said that can help with the radio_test. Since you provide the config for the radio_test project for the nrf21540dk_nrf52840 board and used the command "total_output_power 8" and then "start_tx_modulated_carrier", I provide the PR for fixing the known issue. 

    AndrewSafehear said:
    When I use my project (802.15.4 nrf driver with a TX power configured at 10dBm)

    Are you using the same project as this ticket? If not, what is the difference? It seems you already get the desired output tx power in that case. 

    Do you mean to set CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER to 10 in your project? If so, is it possible to try to set CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER to 8 and leave MPSL_FEM_NRF21540_TX_GAIN_DB to the default value? Also, use

    CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y

    I tried to change the MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA and set CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL configs but the signal on a analyzer was -23dBm and not near 8 dBm as I wanted.

    When I just use the default value of 10 dBm, the analyzer get a power near 10 dBm as wanted.

    Do you mean you are able to get the default value of 10 dBm with the radio_test sample or your project?

    -Amanda H.

  • Hello Amanda,

    Doesn't the PR help the radio_test project?

    I don't have a spectral analyzer free right now so I can't say... I will have it tomorrow.

    Are you using the same project as this ticket?

    Yes I am. I got the desired output power (10dBm) when I leave MPSL_FEM_NRF21540_TX_GAIN_DB to the default value. When I try to put CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER to 8 I don't really get 8dBm as the nRF21540 is configured at 10dBm and the nRF52840 is configured at -4dBm (a total of 6 and not 8).

    I already use CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y in this program.

    Do you mean you are able to get the default value of 10 dBm with the radio_test sample or your project?

    I will try to make a summary of all my tests:

    Default values are: 

    - MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y
    - MPSL_FEM_NRF21540_GPIO_SPI=y
    - MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=20
    - MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB = 10

    Modified values are:

    - MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y
    - MPSL_FEM_NRF21540_GPIO_SPI=y
    - MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=8
    - MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB = 10

    When I use default values and I want 10 dBm, I get it on both project.

    When I use default values and I want 8dB, I get 6 dBm on both.

    When I use default values, change MPSL_FEM_NRF21540_TX_GAIN_DB to 10dBm and I want 10 dBm, I get it on both project.

    When I use modified values and change MPSL_FEM_NRF21540_TX_GAIN_DB to 8dBm, I get -23dBm on both project.

    When I use modified values and change MPSL_FEM_NRF21540_TX_GAIN_DB to 10dBm, I get -23dBm on both project.

    The problem appears when I try to change MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA.

    Sorry if I was confusing...

    I really need to be able to change the nRF21540 parameters on the go if possible...

    If it's really not possible, I will try to change UICR values for my last try.


    Kind regards,
    Andrew

  • Hi, 

    Just curious, do you get the final power of 13dBm as desired in this ticket? If so, how do you make it? What configs are you using?

    AndrewSafehear said:

    When I use default values and I want 10 dBm, I get it on both project.

    When I use default values and I want 8dB, I get 6 dBm on both.

    How do you set the desired dBm in these two tests? By setting MPSL_FEM_NRF21540_TX_GAIN_DB?

    What result would you get if using the following setting?

    CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=8
    CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB=8
    CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=8

    -Amanda H.

  • Hello,

    Sorry for closing the ticket I clicked on the wrong button...

    For the 13dBm I put CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER at 13, and left all the other configs on default values. With this, the nRF21540 was configured at 10dBm and the nRF52840 at 3dBm, but at 13dBm the product can't pass the certification so I left my maximum at 10dBm.

    How do you set the desired dBm in these two tests? By setting MPSL_FEM_NRF21540_TX_GAIN_DB?

    Here is the configs for those tests with both projects:

    - MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA = 20
    - MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB = 10
    - MPSL_FEM_NRF21540_TX_GAIN_DB = 10

    With my project I also set CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER to 10 or 8 and with the radio_test project I set total_output_power to 10 or 8. Also for the radio_test project, I set data_rate to 
    ieee802154_250Kbit.

    What result would you get if using the following setting?

    Same results at -23dBm for both projects...

    I don't know if it change something but I use a custom board with the nRF52840 and nRF21540.

    Kind regards,

    Andrew

  • Hi,

    AndrewSafehear said:
    I don't know if it change something but I use a custom board with the nRF52840 and nRF21540.

    Is it possible to reproduce on nRF2140DK? If not, please create a new support case with "nRF21540 and nRF52840 custom board" as the title. 

    -Amanda H.

Reply Children
Related