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.

CC2640R2F: TxPowerTable for CC2640R2F-CC2592 seems to be reversed?

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2592, BLE-STACK, , CC2650

Hi,

    The related thread for this is here. I am using CC2640R2F-CC2592 EMK Reference Design Board. To get the max current given TXPower value I am using Energy Trace Probe. Here is the table below shared by TI , which is set at ble_user_config.c

/*
  const txPwrVal_t TxPowerTable[] =
  {{ TX_POWER_10_2_DBM,     GEN_TX_POWER_VAL( 0x0B, 3, 0x0C ) }, //output 10.2 dbm on CC2592
   { TX_POWER_12_4_DBM,     GEN_TX_POWER_VAL( 0x0B, 1, 0x14 ) }, //output 12.4 dbm on CC2592
   { TX_POWER_15_1_DBM,     GEN_TX_POWER_VAL( 0x0E, 1, 0x19 ) }, //output 15.1 dbm on CC2592
   { TX_POWER_17_5_DBM,     GEN_TX_POWER_VAL( 0x12, 1, 0x1D ) }, //output 17.5 dbm on CC2592
   { TX_POWER_19_7_DBM,     GEN_TX_POWER_VAL( 0x18, 1, 0x25 ) }, //output 19.7 dbm on CC2592
   { TX_POWER_21_3_DBM,     GEN_TX_POWER_VAL( 0x21, 1, 0x31 ) }, //output 21.3 dbm on CC2592
   { TX_POWER_21_6_DBM,     GEN_TX_POWER_VAL( 0x14, 0, 0x42 ) }, //output 21.6 dbm on CC2592
   { TX_POWER_22_1_DBM,     GEN_TX_POWER_VAL( 0x18, 0, 0x4E ) }}; //output 22.1 dbm on CC2592
 */

  const txPwrVal_t TxPowerTable[] =
  { { TX_POWER_MINUS_15_DBM, GEN_TX_POWER_VAL( 0x0B, 3, 0x0C ) }, //output 10.2 dbm on CC2592
  { TX_POWER_MINUS_12_DBM, GEN_TX_POWER_VAL( 0x0B, 1, 0x14 ) }, //output 12.4 dbm on CC2592
  { TX_POWER_MINUS_9_DBM, GEN_TX_POWER_VAL( 0x0E, 1, 0x19 ) },//output 15.1 dbm on CC2592
  { TX_POWER_MINUS_6_DBM, GEN_TX_POWER_VAL( 0x12, 1, 0x1D ) },//output 17.5 dbm on CC2592
  { TX_POWER_MINUS_3_DBM, GEN_TX_POWER_VAL( 0x18, 1, 0x25 ) },//output 19.7 dbm on CC2592
  { TX_POWER_0_DBM, GEN_TX_POWER_VAL( 0x21, 1, 0x31 ) },//output 21.3 dbm on CC2592
  { TX_POWER_1_DBM, GEN_TX_POWER_VAL( 0x14, 0, 0x42 ) },//output 21.6 dbm on CC2592
  { TX_POWER_2_DBM, GEN_TX_POWER_VAL( 0x18, 0, 0x4E ) }}; //output 22.1 dbm on CC2592
#endif

here is my ble_user_config.h

#define TX_POWER_5_DBM                   5
#define TX_POWER_4_DBM                   4
#define TX_POWER_3_DBM                   3
#define TX_POWER_2_DBM                   2
#define TX_POWER_1_DBM                   1
#define TX_POWER_0_DBM                   0
#define TX_POWER_MINUS_3_DBM             -3
#define TX_POWER_MINUS_6_DBM             -6
#define TX_POWER_MINUS_9_DBM             -9
#define TX_POWER_MINUS_12_DBM            -12
#define TX_POWER_MINUS_15_DBM            -15
#define TX_POWER_MINUS_18_DBM            -18
#define TX_POWER_MINUS_21_DBM            -21

Here are my current measurement results using Energy Trace.

TXPower = 10.2. dBM Beacon Interval = 100 ms:

Max Current = 169.1807 mA

Battery Life = 34.4 days

TXPower = 22.1 dBM Beacon Interval = 100 ms:

Max Current = 81.5864 mA

Battery Life = 51.2 days

As you can see from the results above the output is reversed. If I set the TXPower to 22.1 dBM the current should be 160 - 180 mA. How do I set the TxPowerTable so I will get the correct output?

-kel

  • Hi kel,

    Can you measure the actual TX power for the various settings?

    Cheers,
    Fredrik
  • Hi Fredrik,

        I do not have test equipment to measure actual TXPower. I only have this Energy Trace Debug Probe add on. and max current as reference. Also this tidub71.pdf table as reference.

    Regards,

    Markel

  • Hi,

        I just want to add this observation which is really weird. If I use the TXPower table provided by TI CHS I get that results which is reversed. This reverse values I can get it again and again.

        However, If I use the table that I copied from the one TI CHS recommended as you can see below commented. I get current 160 mA to 172 mA if I set TXpower = TX_POWER_22_1_DBM or TXpower = TX_POWER_10_2_DBM

    ble_user_config.c

     //Markel Table
    /*
      const txPwrVal_t TxPowerTable[] =
      {{ TX_POWER_10_2_DBM,     GEN_TX_POWER_VAL( 0x0B, 3, 0x0C ) }, //output 10.2 dbm on CC2592
       { TX_POWER_12_4_DBM,     GEN_TX_POWER_VAL( 0x0B, 1, 0x14 ) }, //output 12.4 dbm on CC2592
       { TX_POWER_15_1_DBM,     GEN_TX_POWER_VAL( 0x0E, 1, 0x19 ) }, //output 15.1 dbm on CC2592
       { TX_POWER_17_5_DBM,     GEN_TX_POWER_VAL( 0x12, 1, 0x1D ) }, //output 17.5 dbm on CC2592
       { TX_POWER_19_7_DBM,     GEN_TX_POWER_VAL( 0x18, 1, 0x25 ) }, //output 19.7 dbm on CC2592
       { TX_POWER_21_3_DBM,     GEN_TX_POWER_VAL( 0x21, 1, 0x31 ) }, //output 21.3 dbm on CC2592
       { TX_POWER_21_6_DBM,     GEN_TX_POWER_VAL( 0x14, 0, 0x42 ) }, //output 21.6 dbm on CC2592
       { TX_POWER_22_1_DBM,     GEN_TX_POWER_VAL( 0x18, 0, 0x4E ) }}; //output 22.1 dbm on CC2592
    */
    
      // Tx Power Values (Pout, IB, GC, TC)
    
      const txPwrVal_t TxPowerTable[] =
      { { TX_POWER_MINUS_15_DBM, GEN_TX_POWER_VAL( 0x0B, 3, 0x0C ) }, //output 10.2 dbm on CC2592
      { TX_POWER_MINUS_12_DBM, GEN_TX_POWER_VAL( 0x0B, 1, 0x14 ) }, //output 12.4 dbm on CC2592
      { TX_POWER_MINUS_9_DBM, GEN_TX_POWER_VAL( 0x0E, 1, 0x19 ) },//output 15.1 dbm on CC2592
      { TX_POWER_MINUS_6_DBM, GEN_TX_POWER_VAL( 0x12, 1, 0x1D ) },//output 17.5 dbm on CC2592
      { TX_POWER_MINUS_3_DBM, GEN_TX_POWER_VAL( 0x18, 1, 0x25 ) },//output 19.7 dbm on CC2592
      { TX_POWER_0_DBM, GEN_TX_POWER_VAL( 0x21, 1, 0x31 ) },//output 21.3 dbm on CC2592
      { TX_POWER_1_DBM, GEN_TX_POWER_VAL( 0x14, 0, 0x42 ) },//output 21.6 dbm on CC2592
      { TX_POWER_2_DBM, GEN_TX_POWER_VAL( 0x18, 0, 0x4E ) }}; //output 22.1 dbm on CC2592
    

    ble_user_config.h

     // With CC2592 Range Extender Markel defines
    /*
    #define TX_POWER_22_1_DBM                22
    #define TX_POWER_21_6_DBM                21
    #define TX_POWER_21_3_DBM                20
    #define TX_POWER_19_7_DBM                19
    #define TX_POWER_17_5_DBM                17
    #define TX_POWER_15_1_DBM                15
    #define TX_POWER_12_4_DBM                12
    #define TX_POWER_10_2_DBM                10
    
    */
    
    #define TX_POWER_2_DBM                   2 //output 22.1 dbm on CC2592
    #define TX_POWER_1_DBM                   1 //output 21.6 dbm on CC2592
    #define TX_POWER_0_DBM                   0 //output 21.3 dbm on CC2592
    #define TX_POWER_MINUS_3_DBM             -3 //output 19.7 dbm on CC2592
    #define TX_POWER_MINUS_6_DBM             -6 //output 17.5 dbm on CC2592
    #define TX_POWER_MINUS_9_DBM             -9 //output 15.1 dbm on CC2592
    #define TX_POWER_MINUS_12_DBM            -12 //output 12.4 dbm on CC2592
    #define TX_POWER_MINUS_15_DBM            -15 //output 10.2 dbm on CC2592

    Also here is my code to initialize the CC2592 pins.

    /*********************************************************************
     * @fn      XXEddystoneBeacon_CC2592Enable
     *
     * @brief   Initialize CC2592 Pins
     *
     * @param   none
     *
     * @return  none
     */
    static void XXEddystoneBeacon_CC2592Enable(void)
    {
        CC2592_PinHandle = PIN_open(&CC2592_PinState, CC2592PinsCfg);
        PINCC26XX_setMux(CC2592_PinHandle, Board_LNA_EN_PIN, IOC_PORT_RFC_GPO0);
        PINCC26XX_setMux(CC2592_PinHandle, Board_PA_EN_PIN, IOC_PORT_RFC_GPO1);
    }

    -kel

  • Hi,

    Here are my complete test results using the TxPower Table below. I am using XDS110 Debug Probe + Energy Trace Debug Probe Add on.

      // Tx Power Values (Pout, IB, GC, TC)
      // Table from TI E2E Forum
      const txPwrVal_t TxPowerTable[] =
      { { TX_POWER_MINUS_15_DBM, GEN_TX_POWER_VAL( 0x0B, 3, 0x0C ) }, //output 10.2 dbm on CC2592
      { TX_POWER_MINUS_12_DBM, GEN_TX_POWER_VAL( 0x0B, 1, 0x14 ) }, //output 12.4 dbm on CC2592
      { TX_POWER_MINUS_9_DBM, GEN_TX_POWER_VAL( 0x0E, 1, 0x19 ) },//output 15.1 dbm on CC2592
      { TX_POWER_MINUS_6_DBM, GEN_TX_POWER_VAL( 0x12, 1, 0x1D ) },//output 17.5 dbm on CC2592
      { TX_POWER_MINUS_3_DBM, GEN_TX_POWER_VAL( 0x18, 1, 0x25 ) },//output 19.7 dbm on CC2592
      { TX_POWER_0_DBM, GEN_TX_POWER_VAL( 0x21, 1, 0x31 ) },//output 21.3 dbm on CC2592
      { TX_POWER_1_DBM, GEN_TX_POWER_VAL( 0x14, 0, 0x42 ) },//output 21.6 dbm on CC2592
      { TX_POWER_2_DBM, GEN_TX_POWER_VAL( 0x18, 0, 0x4E ) }}; //output 22.1 dbm on CC2592

    TX_POWER_MINUS_15_DBM = 165.424 mA

    TX_POWER_MINUS_12_DBM = 163.9582 mA

    TX_POWER_MINUS_9_DBM = 162.9884 mA

    TX_POWER_MINUS_6_DBM = 164.998 mA

    TX_POWER_MINUS_3_DBM = 162.5183 mA

    TX_POWER_0_DBM = 65.068 mA

    TX_POWER_1_DBM = 68.2447 mA

    TX_POWER_2_DBM = 83.8262 mA


    With these test results above the TXpower table is not good. I am using Energy Trace to get this current values and I do not know how it compares to DC Power Analyzer. Most likely the DC Power Analyzer is better.

    What I would like to know is how do I set the TXPower values from the tidub71.pdf at the TxPowerTable[]. I already asked about this and I did not get a complete answer.

    -kel

  • Hi Markel,

    What version of the BLE-Stack are you using?

    Can you try re-building both the app and stack version and re-trying?
  • Hi Marie,

        I am using Simple Peripheral Stack Library Project from SDK 2.20 as base. I ported the Simple Eddystone Project from https://github.com/google/eddystone/tree/master/eddystone-url/implementations/TI-CC2640.

        It works and I have been testing the Long Range Eddystone Beacon Project for 2 weeks now using several Beacon IOS Apps. What I have not verify is the actual TXpower and my only means is to measure current using Energy Trace. Here is my setup below. The Energy Trace is good I can measure Beacon Interval as I have set in the program.

        I will try to make changes to TXPower then build stack and app later.

    -kel

  • Hi,

    I re-build stack then app then do Energy Trace. Here are my test results below, which is similar to my test results before. So still not good.

    TX_POWER_MINUS_15_DBM = 161.8962 mA

    TX_POWER_MINUS_12_DBM = 162.9298 mA

    TX_POWER_MINUS_9_DBM = 162.1558 mA

    TX_POWER_MINUS_6_DBM = 162.446 mA

    TX_POWER_MINUS_3_DBM = 161.8142 mA

    TX_POWER_0_DBM = 61.452 mA

    TX_POWER_1_DBM = 65.4195 mA

    TX_POWER_2_DBM = 78.1709 mA

    -kel
  • Hi,

        Using Simple Peripheral Stack Library from SDK 2.20 I did Energy Trace Test using CC2640R2F Launchpad with TXPower from 0 dBM to 5 dBM. Here are my tests results below. Is this normal? Should it be that a higher TXPower would equate to higher current consumption? This is is shown at tidub71.pdf, but that data is for CC2650-CC2592 EMK.

      -kel

  • Hi Kel,

    From those results it looks like you are running 0 dBm only. How are you changing TX Power? Are you using the HCI command?

    Cheers,
    Fredrik
  • Hi Fredrik,

        With the CC2640R2F Launchpad test I call HCI_EXT_SetTxPowerCmd(TX_POWER_0_DBM); at Initialization. My procedure below.

    1. Set TXPower.
    2. Build Program
    3. Load Program using CCS Debug, then terminate CCS Debug Session.
    4. Perform Energy Trace.

        I also flashed hex files using SmartRF Flash Programmer with TXPower = 0 DBM and TXPower = 5 DBM. Then measure current using Digital Multimeter. The CC2640R2F Launchpad is powered using 2xAA battery. I read around 7mA max current at both TXPower = 0 DBM and TXPower = 5 DBM.

        Anyway, I am currently trying the TXPower Table by TI TA12012 to CC2640R2F-CC2592 EMK and I am not getting the expected results. At TPower 9 dBM I read max current 126. 9846. TI TA12012 table can be found at this post below. I need help with this as I am doing this project that will go to mass production at next phase.

    -kel

  • Hi kel,

    You call the HCI command after ICall_registerApp(), right?

    Can you try running the rfCarrierWave example from CC2640R2F SDK 2.20? Try using different txPower settings in smartrf_settings.c and see what corresponding current consumption you get.
  • Hi,

        Here are my test results using TI TA12012 TXpower Table. The current increase from 9 dBM to 12dBM. Then the rest is around 126 mA. This similar current measurement readings at different set TXPower value is same test results with my recent test using CC2640R2F Launchpad. I can conclude that HCI_EXT_SetTxPowerCmd() has something to do with this.

    Here are my code changes below.

    ble_user_config.c

    // Default Tx Power Index
    //#define DEFAULT_TX_POWER               7
    #define DEFAULT_TX_POWER               9
    
      const txPwrVal_t TxPowerTable[] =
      {{ TX_POWER_9_DBM,     0x0CCD }, //output 9 dbm on CC2592
       { TX_POWER_10_DBM,    0x0CCE }, //output 10 dbm on CC2592
       { TX_POWER_11_DBM,    0x0CCF }, //output 11 dbm on CC2592
       { TX_POWER_12_DBM,    0x154E }, //output 12 dbm on CC2592
       { TX_POWER_13_DBM,    0x1613 }, //output 13 dbm on CC2592
       { TX_POWER_14_DBM,    0x1751 }, //output 14 dbm on CC2592
       { TX_POWER_15_DBM,    0x1D53 }, //output 15 dbm on CC2592
       { TX_POWER_16_DBM,    0x2555 }, //output 16 dbm on CC2592
       { TX_POWER_17_DBM,    0x290C }, //output 17 dbm on CC2592
       { TX_POWER_18_DBM,    0x310E }, //output 18 dbm on CC2592
       { TX_POWER_19_DBM,    0x3612 }, //output 19 dbm on CC2592
       { TX_POWER_20_DBM,    0x4816 }, //output 20 dbm on CC2592
       { TX_POWER_21_DBM,    0x5A1E }}; //output 21 dbm on CC2592
    
    

    ble_user_config.h

    #define TX_POWER_21_DBM                  21
    #define TX_POWER_20_DBM                  20
    #define TX_POWER_19_DBM                  19
    #define TX_POWER_18_DBM                  18
    #define TX_POWER_17_DBM                  17
    #define TX_POWER_16_DBM                  16
    #define TX_POWER_15_DBM                  15
    #define TX_POWER_14_DBM                  14
    #define TX_POWER_13_DBM                  13
    #define TX_POWER_12_DBM                  12
    #define TX_POWER_11_DBM                  11
    #define TX_POWER_10_DBM                  10
    #define TX_POWER_9_DBM                   9

    -kel

  • Hi Fredrik,

        I just read your message just now. At Simple Peripheral Stack Library for CC2640R2F Launchpad I call HCI command after ICall_registerApp(), see below. I will try running rfCarrierWave example with different txPower settings and then measure current.

    static void SimplePeripheral_init(void)
    {
      // ******************************************************************
      // N0 STACK API CALLS CAN OCCUR BEFORE THIS CALL TO ICall_registerApp
      // ******************************************************************
      // Register the current thread as an ICall dispatcher application
      // so that the application can send and receive messages.
      ICall_registerApp(&selfEntity, &syncEvent);
    
    #ifdef USE_RCOSC
      RCOSC_enableCalibration();
    #endif // USE_RCOSC
    
    #if defined( USE_FPGA )
      // configure RF Core SMI Data Link
      IOCPortConfigureSet(IOID_12, IOC_PORT_RFC_GPO0, IOC_STD_OUTPUT);
      IOCPortConfigureSet(IOID_11, IOC_PORT_RFC_GPI0, IOC_STD_INPUT);
    
      // configure RF Core SMI Command Link
      IOCPortConfigureSet(IOID_10, IOC_IOCFG0_PORT_ID_RFC_SMI_CL_OUT, IOC_STD_OUTPUT);
      IOCPortConfigureSet(IOID_9, IOC_IOCFG0_PORT_ID_RFC_SMI_CL_IN, IOC_STD_INPUT);
    
      // configure RF Core tracer IO
      IOCPortConfigureSet(IOID_8, IOC_PORT_RFC_TRC, IOC_STD_OUTPUT);
    #else // !USE_FPGA
      #if defined( DEBUG_SW_TRACE )
        // configure RF Core tracer IO
        IOCPortConfigureSet(IOID_8, IOC_PORT_RFC_TRC, IOC_STD_OUTPUT | IOC_CURRENT_4MA | IOC_SLEW_ENABLE);
      #endif // DEBUG_SW_TRACE
    #endif // USE_FPGA
    
      // Create an RTOS queue for message from profile to be sent to app.
      appMsgQueue = Util_constructQueue(&appMsg);
    
      Board_shutDownExtFlash();
    
      HCI_EXT_SetTxPowerCmd(TX_POWER_0_DBM);

    -kel

  • Hi Fredrik,

        Here below are my test results using rfCarrierWave Example Program running at the CC2640R2F Launchpad. The data is good and clearly shows at Mean Current(mA) column that the current increases as TXPower increases. So, with this I still conclude there is problem with HCI_EXT_SetTxPowerCmd(). What is the fix? 

        I can't help but feel dissapointed that the HCI_EXT_SetTxPowerCmd() does not work. But I only lost some time and sleep doing these test with my cheap testing tools. 

    -kel

  • Hi,

    I guess this will be resolved at the next TI CC2640R2F SDK release? I will keep this post unresolved for now.

    I do not want to test older SDK version if the HCI_EXT_SetTxPowerCmd() works or not!

    -kel
  • Hi kel,

    I am not sure there is a problem with the HCI API command, I rather suspect that there is an issue with how you implement the PA table. I have asked my more BLE proficient colleagues to take a look at your issue.

    Cheers,
    Fredrik
  • Hi Fredrik,

         To summarize what I previously did, since for 7 days there is no reply here.

         Just so to eliminate the factor of the use of modified TXPower Table and CC2640R2F-CC2592 EMK, I did the test using CC2640R2F Launchpad and Simple Peripheral SDK 2.20. I change the TXPower using HCI Command. Here are the test results below.

    As per your request I did the same test using rfcarrierwave example program. At rfcarrierwave you do not use HCI Commands to set TXPower. Here are the test results below. The mean current is the average current. The Max Current is caused by some spike.

    The data clearly shows that the HCI_EXT_SetTxPowerCmd() at SDK 2.20 has problems. I did these test more than 2x just to ensure the data is valid.

    -kel

  • Hi,

        I did another set of tests using CC2640R2F Launchpad. First test I call HCI_EXT_SetTxPowerCmd() at SimplePeripheral_init() to change TXPower from 0 dBM to 5 dBM. Second test I change the DEFAULT_TX_POWER at ble_user_config.c. Here are my test results below shown Table 1 and Table 2. The test results clearly shows that HCI_EXT_SetTxPowerCmd() does not work. So, it is no good if I use it at CC2640R2F-CC2592 EMK. When can I expect the fix for the HCI_EXT_SetTxPowerCmd(). I want to modify the HCI_EXT_SetTxPowerCmd() but I can not find the code for it.

      Also, just out of curiosity I did the same test using CC2650 Launchpad and Simple Peripheral BLE Stack 2.20 and I am getting similar results. Meaning it is possible that the HCI_EXT_SetTxPowerCmd() did not work from CC2640R2F SDK 1.00 to SDK 2.20. 

     -kel