The following sections provides different code and variables to be considered when designing a low-power mesh network. Power management functionality is handled by the TI-RTOS power driver and used by the peripheral drivers (e.g. UART, SPI, I2C, etc). For power consumption measurements on Z-Stack, refer to SWRA625.
TX Power Configuration¶
The following sections provide configurations which can be implemented to modify the application’s TX power, to achieve a greater distance the device can communicate with other devices on the network, or lower the application’s power consumption for a longer battery life in your device.
Changing TX Power Level¶
By default, the CC1352R/CC2652R has the TX power set to 5 dBm. P-devices,
having a Power Amplifier integrated in the device, have the TX power set to 20
dBm by default. To modify the TX power level at runtime to a different value,
the best place to insert the following code is inside of the ZCL application
zcl[application]_Init function. For example, the switch project would be
zstack_sysSetTxPowerReq_t powerReq; zstack_sysSetTxPowerRsp_t powerRsp; powerReq.requestedTxPower = 0; // Set power to 0 dBm Zstackapi_sysSetTxPowerReq(zclSampleSw_Entity, &powerReq, &powerRsp);
The maximum power level supported for a regular CC1352R/CC2652R device in
IEEE 802.15.4 mode is 5 dBm. A P-type device can support up to 20 dBm. This
code snippet can be used for any example project (excluding Green Power
projects), and only requires changing the
zclSampleSw_Entity to the
appropriate application’s entity variable name.
In order for the Power Amplifier to output the maximum 20 dBm TX power in IEEE mode, Boost Mode is enabled inside of the TX power tables in the application. Boost Mode increases the VDDR from 1.7 V to 1.95 V, which increases the maximum TX power output from 17 dBm to 20 dBm, while also increasing current consumption by 15%. The TX power tables are located inside the mac_user_config_CC26x2r1_rftable.h file. You can find this file for the CC1352P device in the SDK installation directory, C:\ti\simplelink_CC26x2_sdk_x_xx_xx_xx, located in the following sub-directories:
Configuring Boost Mode should only be done when using a device with an integrated Power Amplifier (e.g. a CC1352P device).
txPowerTable_ieee_CC1352P1_HPA defines all available TX power
levels to be used when the PA is enabled. The
RF_TxPowerTable_HIGH_PA_ENTRY define has the following structure:
RF_TxPowerTable_HIGH_PA_ENTRY(bias, ibboost, boost, coefficient, ldotrim)
To disable Boost Mode, set the boost value to 0 inside the TX power table for the desired TX power level entry.
Z-Stack provides several parameters which control the device runtime behavior.
The Application Preprocessor Configuration section discusses several of these parameters.
One additional parameter which can be useful for cutting out extra power
BOARD_DISPLAY_USE_UART. Undefining this parameter
will disable UART communication for application information.
Additionally, shutting down the external flash can save on current consumption.
To shutdown external flash, you should add the following line inside