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.

CC2652PSIP: CC2652PSIP RF power control

Part Number: CC2652PSIP
Other Parts Discussed in Thread: SYSCONFIG

Hello,

Is it possible to control RF power of CC2652PSIP when Bluetooth is used ? Is it manageable internally based on e.g. feedback, RSSI or error rate? Can be RF power controlled by user? If so, what software mechanisms should be used, the register RFC_PWR is not documented? Do you have any application notes on CC2652PSIP RF power control?

Thanks,

Alex

  • Hi Alex,

    The BLE5 Stack and the Power Manager automatically will put the device into the lowest possible power state whenever the idle loop is executed. By default, the power saving features in the BLE5 Stack and the Power Manager are enabled. The Power Management chapter of the User's Guide provides some information on this and the Power Management User's Guide provides a lot details with regards to how the power manager works.

    Best Regards,

    Jan

  • Hi Jan,

    I'm looking for information on BLE RF power control. I need APIs that overwrite power settings for PA.

    Thanks,

    Alex

  • Hi Alex,

    If I understood your question correctly, then it seems you want to be able to change the txPower of the device? If so, then there's a few ways this can be done:

    1. Compile-time txpower - The txPower of an advertisement set can be configured through SysConfig in the txPower field shown below:

    The default tx power can also be changed within the Radio tab shown below:

    2. Run-time txPower - The txPower can be changed during runtime by using the HCI_EXT_SetTxPowerCmd() function.

    If I misunderstood your questions, then please let me know and I would be more than happy to help.

    Best Regards,

    Jan

  • Hi Jan,

    BLE Tx power should be controlled using " Run-time txPower" mode in my application. It looks like the function HCI_EXT_SetTxPowerCmd() and defines for power levels are not updated for CC2652PSIP, although CC2652PSIP was selected during project creation. Do you have any information about plans when will they be updated? How will be controlled High power PA for CC2652PSIP on BLE stack level?

    Thanks,

    Alex

  • Hi Alex,

    I did some searching and I found an E2E thread that seems to have found a way to implement the desired functionality:

    https://e2e.ti.com/f/1/t/697671

    In short, instead of using the defines, can you try passing along the index value that corresponds to your desired txPower value in the TxPowerTable?

    Best Regards,

    Jan

  • Hi Jan,

    1) Although my project "simple_peripheral" was created based on the part CC2652PSIP, all power tables you mentioned stop at power level 5dBm in headers hci.h and ll.h. I extended these tables in the same way as the txPowerTable_2400_pa5_10[] in ti_radio_config.c. At the same time notes for the function LL_EXT_SetTxPower( uint8 txPower, uint8 *cmdComplete ) in the header ll.h use different rules. Which one is correct? Does TI have plans to extend these tables and fix these contradictions?

    2) I tried to use the function HCI_EXT_SetTxPowerCmd() for the power level 0dBm after starting all tasks and RF power level was not changed: power is always 5dBm, it looks lite it is overridden. The power control works properly from Smart RF Studio. What is the proper place for calling this function?

    3) Does exist any other mechanism of Run-time power control?

    Thanks,

    Alex

  • Hi Alex,

    Yes, I was referring to the txPowerTable_2400_pa5_10 table that is generated by SysConfig and can be found in the ti_radio_config.c file. As a test, can you use the index of that table in your calls to HCI_EXT_SetTxPowerCmd() to see if you are able to measure a different in observed tx power? The table is shown below:

    RF_TxPowerTable_Entry txPowerTable_2400_pa5_10[TXPOWERTABLE_2400_PA5_10_SIZE] =
    {
        {-20, RF_TxPowerTable_DEFAULT_PA_ENTRY(6, 3, 0, 4) }, // 0x08C6
        {-18, RF_TxPowerTable_DEFAULT_PA_ENTRY(7, 3, 0, 4) }, // 0x08C7
        {-15, RF_TxPowerTable_DEFAULT_PA_ENTRY(9, 3, 0, 0) }, // 0x00C9
        {-12, RF_TxPowerTable_DEFAULT_PA_ENTRY(12, 3, 0, 0) }, // 0x00CC
        {-10, RF_TxPowerTable_DEFAULT_PA_ENTRY(15, 3, 0, 4) }, // 0x08CF
        {-9, RF_TxPowerTable_DEFAULT_PA_ENTRY(16, 3, 0, 4) }, // 0x08D0
        {-6, RF_TxPowerTable_DEFAULT_PA_ENTRY(21, 3, 0, 4) }, // 0x08D5
        {-5, RF_TxPowerTable_DEFAULT_PA_ENTRY(24, 3, 0, 7) }, // 0x0ED8
        {-3, RF_TxPowerTable_DEFAULT_PA_ENTRY(32, 3, 0, 19) }, // 0x26E0
        {0, RF_TxPowerTable_DEFAULT_PA_ENTRY(30, 2, 0, 19) }, // 0x269E
        {1, RF_TxPowerTable_DEFAULT_PA_ENTRY(35, 2, 0, 19) }, // 0x26A3
        {2, RF_TxPowerTable_DEFAULT_PA_ENTRY(35, 1, 0, 28) }, // 0x3863
        {3, RF_TxPowerTable_DEFAULT_PA_ENTRY(27, 0, 0, 44) }, // 0x581B
        {4, RF_TxPowerTable_DEFAULT_PA_ENTRY(42, 0, 0, 69) }, // 0x8A2A
        {5, RF_TxPowerTable_DEFAULT_PA_ENTRY(62, 0, 0, 54) }, // 0x6C3E
        {6, RF_TxPowerTable_HIGH_PA_ENTRY(32, 0, 1, 32, 16) }, // 0x104120
        {7, RF_TxPowerTable_HIGH_PA_ENTRY(35, 0, 1, 35, 20) }, // 0x144723
        {8, RF_TxPowerTable_HIGH_PA_ENTRY(42, 0, 1, 44, 20) }, // 0x14592A
        {9, RF_TxPowerTable_HIGH_PA_ENTRY(23, 1, 1, 28, 20) }, // 0x143957
        {10, RF_TxPowerTable_HIGH_PA_ENTRY(30, 1, 1, 35, 20) }, // 0x14475E
        RF_TxPowerTable_TERMINATION_ENTRY
    };

    So in this case, index 0 is -20dbm, index 1 is -18 dbm and so on. Can you try checking if using those index values lead to the expected output power? 

    HCI_EXT_SetTxPowerCmd(0) // -20dbm

    HCI_EXT_SetTxPowerCmd(1) // -18dbm

    ...

    HCI_EXT_SetTxPowerCmd(20) // 10dbm

    I would recommend verifying your output power with a signal analyzer or a spectrum analyzer while the board is configured to conducted mode.

    Best Regards,

    Jan

  • Hello Jan,

    Using the function HCI_EXT_SetTxPowerCmd() in the simple_peripheral project (CC2652PSIP) with different input parameters 0,1,20 or any other doesn't have any affect on power: according to spectrum analyzer it is always 5dBm. Should be this function executed at some specific moment: before BLE stack initialisation, BLE stack in idle state, BLE stack is running, ... ? Should be this function followed by setting some event, or mask, or triggering some flag?

    Thanks,

    Alex 

  • Hi Alex,

    Can you specify the SDK that is being used? Are you advertising when the setTxPowerCmd() function is called? Can you try disabling advertising? Can you try calling the function before the advertising set is created?

    Best Regards,

    Jan

  • I use the SDK v6.40.00.13. Yes, I'm advertising when the setTxPowerCmd() function is called. RF power is not changed after execution of the  setTxPowerCmd() function.

    It looks like I can control RF Tx power only during creation of an advertisement sets using the GapAdv_create function (power parameter in the advParams).

    When advertisements are running, I tried to use the following three steps:

    GapAdv_disable(advHandleLegacy);

    GapAdv_setParam(advHandleLegacy, GAP_ADV_PARAM_TX_POWER, pValue);

    GapAdv_enable(advHandleLegacy, GAP_ADV_ENABLE_OPTIONS_USE_MAX, 0);

    Unfortunately, device stops working on first step. What could be the reason of this?

     Regards,

    Alex

  • Hi Alex,

    After calling GapAdv_disable(), you must wait until the GAP_EVT_ADV_END_AFTER_DISABLE  event is received before calling any functions that require that the advertising set is disabled. If the same behavior is observed after waiting for the event, then can you provide the return codes for those three functions?

    Best Regards,

    Jan

  • Hi Jan,

    After calling GapAdv_disable(), module becomes frozen: it goes into loop forever and never exits from there. What could be the reason for this?

    Regards,

    Alex

      

  • Hi Alex,

    My apologies for the delayed response. To clarify, do you mean the code never returns from the GapAdv_disable() function call?

    Best Regards,

    Jan

  • Hi Jan,

    Right, code never returns from the GapAdv_disable(). My application is based on the Simple_Peripheral project. I tried to debug this function: after long path code becomes locked in the ICall_abbort() function.

    Regards,

    Alex

  • Hi Alex,

    I am very surprised to hear that the GapAdv_disable() function does not return. Can share the snippet of code where the function is being called? Is the function call being made in an interrupt context?

    Best Regards,

    Jan