Hi.
Beware that, as stated in the datasheet, the maximum output power of the nRF21540 is +22 dBm, not +23 dBm.
To achieve +22dBm, in the BLE stack +22 dBm of output power must be requested by the BLE stack. This +22 dBm will be then split into +2 dBm of the SoC (internally Neg1dBm but with high voltage enabled, giving +2 dBm of the SoC output) and 20 dB of FEM gain.
Control of high voltage is automatic, so the ability to achieve +1, +2, and +3 dBm of the SoC output is performed automatically, based on the request coming from the BLE stack. It is available even if not using any FEM.
20 dB gain of NRF21540 can be achieved by:
mode-gpios
property https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/fem/fem_nRF21540_optional_properties.html), setting CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20 would set the gain to 20dB by setting the MODE pin to 0.Please also note that the CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB should be set for the network core image.
In v2.7.0, the child image for the Bluetooth-only app is hci_ipc
. The build for samples/bluetooth/central_uart
is
ncs/nrf/samples/bluetooth/central_uart# west build --no-sysbuild -p -b nrf5340dk/nrf5340/cpuapp -- -DSHIELD=nrf21540ek -Dhci_ipc_SHIELD=nrf21540ek -Dhci_ipc_CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20
The NETCORE_IMAGE_NAME, which is hci_ipc
above, can be one of the names in the list found here:
https://github.com/nrfconnect/sdk-nrf/blob/v2.7.0/sysbuild/Kconfig.netcore#L143
depending on what you've selected. It's necessary to know the name of the network core image to properly pass the kconfig to it.
Best regards,
Mathias
ok thanks Mathias. based on your reply, the only change I need to make is to set CONFIG_BT_CTLR_TX_PWR_ANTENNA=22 instead of 23, and seems I will get 2 dB, at output of nRF5340 and 22 dBm at output of nRF21540/antenna.
Everything else seems correctly set already.
Hi again, Dhara.
I've been away on holiday since my last response to you. Did everything work out ok?
Hi again, Dhara.
I've been away on holiday since my last response to you. Did everything work out ok?
Hi Mathias,
I still don't have our custom board in hand. Will know what TX power I get once I try it on the custom board.
For now I am struggling to validate these changes on ncs/zephyr/samples/bluetooth/beacon project using nrf5340 DK and nrf21540 EK.
Testing nRF5340 DK + nRF21540 EK using ncs 2.7 with child Image
Thanks
Dhara
DHARA said:I still don't have our custom board in hand. Will know what TX power I get once I try it on the custom board.
Ok, I see.
DHARA said:For now I am struggling to validate these changes on ncs/zephyr/samples/bluetooth/beacon project using nrf5340 DK and nrf21540 EK.
Testing nRF5340 DK + nRF21540 EK using ncs 2.7 with child Image
Understood. On that, you'll be supported in the ticket you've got going there.