This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2340R5: [CC2340]Two questions about the TX power settings of CC2340R5.

Part Number: CC2340R5
Other Parts Discussed in Thread: CC2652P

Hi Ti Experts.

Sorry, I have two more questions about TX power.

Question 1: Is the TX power setting of CC2340R5 divided into adv tx power and connection tx power?

I used the data_stream routine. I only set the maximum power to 8dbm in syscfg.

Then I used a spectrum analyzer to measure the power. I found that only the power of the adv channel was around 8dbm, while the connection channel was around 0dbm,

so I would like to ask if CC2340R5 has two parameters: Advertisementtx power and conn tx power. If so, how should I set it?

---------------------------------------------------------------------------------------------------------------------------------------------------------

Question 2: When I use HCI_EXT_SetTxPowerDbmCmd to change the power during Advertisement, I don't see any actual change from the spectrum analyzer.

step 1: I used the data_stream sample code, we set syscfg to 0dBm,


step 2: We finally call HCI_EXT_SetTxPowerDbmCmd(8,0) in Peripheral_start;(I also used HCI_EXT_SetTxPowerDbmCmd(8,1);)

bStatus_t Peripheral_start()
{
    bStatus_t status = SUCCESS;

    status = BLEAppUtil_registerEventHandler(&peripheralConnHandler);
    if(status != SUCCESS)
    {
        // Return status value
        return(status);
    }

    status = BLEAppUtil_registerEventHandler(&peripheralAdvHandler);
    if(status != SUCCESS)
    {
        return(status);
    }

    status = BLEAppUtil_initAdvSet(&peripheralAdvHandle_1, &advSetInitParamsSet_1);
    if(status != SUCCESS)
    {
        // Return status value
        return(status);
    }

    status = BLEAppUtil_advStart(peripheralAdvHandle_1, &advSetStartParamsSet_1);
    if(status != SUCCESS)
    {
        // Return status value
        return(status);
    }

    HCI_EXT_SetTxPowerDbmCmd(8,0);//add by weli set tx power to 8dBm.
    //HCI_EXT_SetTxPowerDbmCmd(8,1);//add by weli set tx power to 8dBm.

    // Return status value
    return(status);
}

Step 3: Observe the spectrum analyzer to see if the broadcast power reaches 8dBm.


Expected results: The Advertisement TX power should be close to 8dBm, but in actuality, it still remains at 0dBm. Therefore,
I feel that HCI_EXT_SetTxPowerDbmCmd is useful for the CW test, but there seems to be no way to set the Advertisement TX power.


Our company has previously developed CC2640R1/R2, CC2642, and CC2652P, all of which used HCI_EXT_SetTxPower to set the Advertisement TX power.

Sorry, I have been asking questions for the past two days.

We are TI 3rd party members. We developed the CC2340 AT command software very early, but there were some problems with the TX power at that time.

We porting it to SDK V7.2 for verification. However, we are very satisfied with the TI team and products.

  • Hello Weli,

    Thanks for reaching out.

    The advertisement TX power can be modified using syscfg (Advertisement Sets - Advertisement Parameters - TX Power and TX value) as you pointed out.

    However, modifying the TX power during connections is done using HCI commands. If you are using the basic_ble project (<SDK>\examples\rtos\LP_EM_CC2340R5\ble5stack\basic_ble), this can be done on the app_central.c or app_peripheral.c at the start function as shown below:

    bStatus_t Peripheral_start()
    {
        bStatus_t status = SUCCESS;
    
        status = BLEAppUtil_registerEventHandler(&peripheralConnHandler);
        if(status != SUCCESS)
        {
            // Return status value
            return(status);
        }
    
        // CHANGE TX POWER::
        const int8_t txPower = 8;
        const uint8_t fraction = 0;
        HCI_EXT_SetTxPowerDbmCmd(txPower, fraction);
    
        status = BLEAppUtil_registerEventHandler(&peripheralAdvHandler);
        if(status != SUCCESS)
        {
            return(status);
        }
    
        status = BLEAppUtil_initAdvSet(&peripheralAdvHandle_1, &advSetInitParamsSet_1);
        if(status != SUCCESS)
        {
            // Return status value
            return(status);
        }
    
        status = BLEAppUtil_advStart(peripheralAdvHandle_1, &advSetStartParamsSet_1);
        if(status != SUCCESS)
        {
            // Return status value
            return(status);
        }
    
        // Return status value
        return(status);
    }

    Please remember to use fraction = 0, as different numbers are not supported at the moment.

    Hope it helps.

    Best regards,

    David.

  • Hi David,

    Thank you for your support. Regarding the TX power part, we have cleared everything.