Testing TX Power Levels
This code example has related User's Guides, which may be worth reading before. Find them here:
Bluetooth TX Power Settings
Current consumption variation with TX Power
TX Power Limitations for Regulatory Compliance (ETSI, FCC)
The command system_set_tx_power can be used to set the maximum TX power, but the value which is actually set by the Bluetooth stack may not be the same as the input to the command. The actual set value can be read from the command response.
This example iterates through a power level range between a minimum and a maximum value given to system_set_tx_power command and prints out both the input parameter and the response.
As shown, the TX power values of EFR32xG chip set are not continuous, the lower the value, the coarser the adjustment.
Note that TX power can be set with 0.1 dBm granularity. For example, the value of 50 equals +5 dBm. For more information, see the description of the system_set_tx_power API command.
Create an SoC - Empty project in Simplicity Studio for the radio board that you want to use.
Copy the attached app.c to the root directory of the project.
Change DEBUG_LEVEL to 1 in app.h file to enable logging to UART.
Compile and run the program. The results will go out through the VCOM and can be displayed on a terminal application such as TeraTerm or PuTTY.
The application iterates through a TX power range between a minimum and a maximum value. It prints out both the input parameter and the response on the terminal. This sweep runs only once out of reset. If you open a terminal (115200 baud, 8N1), it will show an output as shown in the below image.