Dynamic Tx power control issue with FEM-enabled boards

Hi!

I have a custom board with nRF52832 and SKY66114-11 FEM. The project requires dynamic TX power control, so I added the set_tx_power() function from the example LINK.

This works well, but only if I add CONFIG_BT_LL_SW_SPLIT=y in my prj.cfg. In other words, use Zephyr Bluetooth Controller instead of SofDevice.

I can live with that, but then I was faced with scan issues. I assume it is because of Zephyr Bluetooth Controller is not capable of controlling FEM.

I return to SoftDevice, but when I try to set tx power, it returns me only two values +2dBm and -18dbM. If I build the same code for nrf52dk_nrf52832 it works well and sets all possible TX powers correctly.

Then I found this documentation https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.0/nrf/device_guides/working_with_fem.html, but when I use CONFIG_MPSL=y and CONFIG_MPSL_FEM_ONLY=y build fails at linker stage with the following error:

e:/code/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/bluetooth/controller/lib..__nrf__subsys__bluetooth__controller.a(hci_driver.c.obj): in function `mpsl_work_submit':
E:/code/ncs/v2.5.0/nrf/include/mpsl/mpsl_work.h:49: undefined reference to `mpsl_work_q'

How should I configure the project with SoftDevice Controller, Skyworks FEM and Dynamic TX power control?

Parents
  • This is an output of hci_pwr_ctrl sample on my custom board:

    ▒*** Booting nRF Connect SDK v2.5.0 ***
    Starting Dynamic Tx Power Beacon Demo
    [00:00:00.000,579] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
                                                c5 93 ba a9 14 4d 8d 05  30 4e 9b 92 d7 71 1e e8 |.....M.. 0N...q..
                                                aa 02 50 3c                                      |..P<
    [00:00:00.003,021] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.003,051] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.003,082] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 197.47763 Build 2370639017
    [00:00:00.003,967] <inf> bt_hci_core: Identity: FA:2D:DF:9B:D8:3B (random)
    [00:00:00.003,997] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1102, manufacturer 0x0059
    [00:00:00.004,028] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1102
    Bluetooth initialized
    Dynamic Tx power Beacon started
    Get Tx power level ->-> default TXP = 0
    Set Tx power level to 4
    Actual Tx Power: 2
    Get Tx power level -> TXP = 2
    Set Tx power level to 3
    Actual Tx Power: 2
    Get Tx power level -> TXP = 2
    Set Tx power level to 0
    Actual Tx Power: -18
    Get Tx power level -> TXP = -18
    Set Tx power level to -4
    Actual Tx Power: -18
    Get Tx power level -> TXP = -18
    Set Tx power level to -8
    Actual Tx Power: -18
    Get Tx power level -> TXP = -18
    Set Tx power level to -12
    Actual Tx Power: -18
    Get Tx power level -> TXP = -18
    Set Tx power level to -16
    Actual Tx Power: -18
    Get Tx power level -> TXP = -18
    Set Tx power level to -20
    Actual Tx Power: -18
    Get Tx power level -> TXP = -18
    Set Tx power level to -40
    Actual Tx Power: -18
    Get Tx power level -> TXP = -18
    Set Tx power level to 4
    Actual Tx Power: 2
    Get Tx power level -> TXP = 2
    Set Tx power level to 3
    Actual Tx Power: 2
    

    This is output of hci_pwr_ctrl sample on nrf21540dk_nrf52840:

    *** Booting nRF Connect SDK v2.5.0 ***
    Starting Dynamic Tx Power Beacon Demo
    [00:00:00.000,457] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
                                                c5 93 ba a9 14 4d 8d 05  30 4e 9b 92 d7 71 1e e8 |.....M.. 0N...q..
                                                aa 02 50 3c                                      |..P<
    [00:00:00.002,990] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.003,021] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.003,051] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 197.47763 Build 2370639017
    [00:00:00.003,906] <inf> bt_hci_core: Identity: E4:B6:79:75:A1:BD (random)
    [00:00:00.003,936] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1102, manufacturer 0x0059
    [00:00:00.003,967] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1102
    Bluetooth initialized
    Dynamic Tx power Beacon started
    Get Tx power level ->-> default TXP = 0
    Set Tx power level to 4
    Actual Tx Power: 2
    Get Tx power level -> TXP = 2
    Set Tx power level to 3
    Actual Tx Power: 2
    Get Tx power level -> TXP = 2
    Set Tx power level to 0
    Actual Tx Power: -2
    Get Tx power level -> TXP = -2
    Set Tx power level to -4
    Actual Tx Power: -6
    Get Tx power level -> TXP = -6
    Set Tx power level to -8
    Actual Tx Power: -10
    Get Tx power level -> TXP = -10
    Set Tx power level to -12
    Actual Tx Power: -30
    Get Tx power level -> TXP = -30
    Set Tx power level to -16
    Actual Tx Power: -30
    Get Tx power level -> TXP = -30
    Set Tx power level to -20
    Actual Tx Power: -30
    Get Tx power level -> TXP = -30
    Set Tx power level to -40
    Actual Tx Power: -30
    

    Similar behaviour, but not the same.

  • Hello,

    If I were to guess here the skyworks have fixed 22dB gain, and given that the supported output power of the nRF52832 radio:
    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/radio.html#register.TXPOWER 

    Then the closest step to 4dBm is -20 + 22 = 2

    Then the closest step to 2dBm is -20 + 22 = 2

    Then the closest step to 0dBm is -40 + 22 = -18

    Then the closest step to -4dBm is -40 + 22 = -18

    ...

    The radio don't have any configurable step between -40dBm and -20dBm.

    Kenneth

  • Now I understand. Can I configure somehow the gain of FEM? As far as I understand I cannot set TX power to more than 18 dBm ( -4 dBm of nrf52832 + 22 dBm of Skyworks FEM ) because of the BLE specification.

  • For the devicetree bindings I can see they are set to (default) 12 or 22 dB depending on the variant used, see:
    https://github.com/nrfconnect/sdk-nrf/blob/v2.5.0/dts/bindings/radio_fem/skyworks%2Csky66407-11.yaml#L38 
    https://github.com/nrfconnect/sdk-nrf/blob/v2.5.0/dts/bindings/radio_fem/skyworks%2Csky66112-11.yaml#L47 

    The tx-gain-db can be modified in an overlay file if the output power is different from these values.

    Kenneth

Reply Children
Related