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-Q1: RF front-end configuration for single-ended & internal bias mode(CC2640R2F 7x7)

Part Number: CC2640R2F-Q1
Other Parts Discussed in Thread: CC2640, CC2650, CC2640R2F

Hi TI experts,

We checked that differential & internal bias mode is working well for long range feature on our custom board too.

By the way, we want to use the single-ended & internal bias mode for a reason.

But, we are facing an issue(too short range) with respect to using it for it.

As I understand, your application SDK is basically based on the differential & internal bias mode for RF design as the CC2640R2 LP board.

So, we tried to change the related parts for HW and SW through referring to each mode for single-ended or differential or internal or external bias mode.

And, I found the related things as below for SW changes:

My question is with the related macro definition or else for the existing CC26xx series(for CC2640 or CC2650), and CC26xx_R2 series in the Ble_user_config.c.

At first, I thought that the existing CC2650EM_7ID macro definition is valid for R2 series too as below comment shows like that and the pre-processor is including two defintions.

 

/*

*  ============================================================================

*  RF Front End and Bias configuration symbols for TI reference designs and

*  kits. This symbol sets the RF Front End configuration in ble_user_config.h

*  and selects the appropriate PA table in ble_user_config.c.

*  Other configurations can be used by editing these files.

*

*  Define only one symbol:

 *  CC2650EM_7ID    - Differential RF and internal biasing

                      (default for CC2640R2 LaunchPad) * CC2650EM_5XD ??Differential RF and external biasing * CC2650EM_4XS ??Single-ended RF on RF-P and external biasing * CC2640R2DK_CXS - WCSP: Single-ended RF on RF-N and external biasing * (Note that the WCSP is only tested and characterized for * single ended configuration, and it has a WCSP-specific * PA table) * * Note: CC2650EM_xxx reference designs apply to all CC26xx devices. * ========================================================================== */

 

But, I am not sure that it is still valid for R2.

Can you let me know what mode should be used for our configuration?

Let me know if our added macro definitions are proper and valid for each mode configuration. And if another parts are there along this.

 

 in BLE_user_config.c

 

 #elif defined( CC2650EM_4IS ) <-- We used this below values for our single-ended & internal bias mode

  regOverride_t rfRegTbl[] = {

  // Recommended overrides for Bluetooth Low Energy, single-ended mode internal bias

  //uint32_t bleIsOverrides[] = {

    0x00001007,

    0x00354038,

    0x4001402D,

    0x00608402,

    0x4001405D,

    0x1801F800,

    0x000784A3,

    0xA47E0583,

    0xEAE00603,

    0x00010623,

    0x02010403,

    0x40014035,

    0x177F0408,

    0x38000463,

    0x000288A3,

    0x00456088,

    0x013800C3,

    0x036052AC,

    0x01AD02A3,

    0x01680263,

#ifdef CACHE_AS_RAM

    0x00018063,

#endif //CACHE_AS_RAM

    0xFFFFFFFF,

  };

 

  #else // unknown device package

 

  #error "***BLE USER CONFIG BUILD ERROR*** Unknown package type!"

 

  #endif // <board>

 



 

#endif // <board>

And added the below one in BLE_user_config.h.

  #define RF_FE_MODE_AND_BIAS           ( RF_FE_SINGLE_ENDED_RFP |             \
                                          RF_FE_INT_BIAS )

Let me know if these are OK for us.

BR,

Ji Won

  • Or, as we are using CC2640R2F 7x7 package, should I use the option using CC2650EM_7ID for "regOverride_t rfRegTbl[]" in ble_user_config.c?
    But, RF_FE_MODE_AND_BIAS must be set to "RF_FE_SINGLE_ENDED_RFP | RF_FE_INT_BIAS".
    My understanding is right?

  • Hi Ji Won,

    The easiest way to do this, is to define CC2650EM_4XS in the board file.

    Then in ble_user_config.h change these lines to reflect your HW (RF pin used and bias option):

    #elif defined( CC2650EM_4XS )
    
    #define RF_FE_MODE_AND_BIAS ( RF_FE_SINGLE_ENDED_RFP | \
    RF_FE_EXT_BIAS )


    Regards,
    Fredrik

  • Thanks Fredrik,

    By the way, Do I need to use the CC2650EM_4XS, not CC2650EM_4IS for single-ended internal bias mode?

    BR,

    Ji Won

  • Hi Ji Won,

    There is no predefined setup for single ended with internal bias. You thus need to use the CC2650EM_4XS and make the changes I explained above.

    BR,
    Fredrik
  • Hi Fredrik,

    But, your reference code shows that two cases as below. Please refer to red highlighted.

      #elif defined( CC2650EM_4XS )
      regOverride_t rfRegTbl[] = {
      // Recommended overrides for Bluetooth Low Energy, single-ended mode external bias
      //uint32_t bleXsOverrides[] = {
        0x00001007,
        0x00354038,
        0x4001402D,
        0x00608402,
        0x4001405D,
        0x1801F800,
        0x000784A3,
        0xA47E0583,
        0xEAE00603,
        0x00010623,
        0x02010403,
        0x40014035,
        0x177F0408,
        0x38000463,
        0x000288A3,
        0x00456088,
        0x013800C3,
        0x036052AC,
        0x01AD02A3,
        0x01680263,
    #ifdef CACHE_AS_RAM
        0x00018063,
    #endif //CACHE_AS_RAM
        0xFFFFFFFF,
      };

      #elif defined( CC2650EM_4IS )
      regOverride_t rfRegTbl[] = {
      // Recommended overrides for Bluetooth Low Energy, single-ended mode internal bias
      //uint32_t bleIsOverrides[] = {
        0x00001007,
        0x00354038,
        0x4001402D,
        0x00608402,
        0x4001405D,
        0x1801F800,
        0x000784A3,
        0xA47E0583,
        0xEAE00603,
        0x00010623,
        0x02010403,
        0x40014035,
        0x177F0408,
        0x38000463,
        0x000288A3,
        0x00456088,
        0x013800C3,
        0x036052AC,
        0x01AD02A3,
        0x01680263,
    #ifdef CACHE_AS_RAM
        0x00018063,
    #endif //CACHE_AS_RAM
        0xFFFFFFFF,
      }; 

    BR,

    Ji Won

  • it seems that the values are the same.
  • I was not aware of a separate override table for 4IS, and I agree it is confusing. Anyway, as you will see further up in the file, these are not used for CC2640R2F.

    What I wrote in my first post is still correct.
  • But, actually,

    the options(CC26XX & CC26XX_R2) are being used as default as the related macro definitions are set to the pre-processor your SDK has.

    Please guide me to integrate it well without any issues.

  • You do not have to change any of the defined symbols in the project options. You only have to do what I wrote in my first post.

    1) Change the RF configuration define in your board file to CC2650EM_4XS
    2) In ble_user_config.h change the RF pin and bias option if applicable
  • If so, I did it like you say as below:

    I simply copied and pasted them with a different macro definition for us.

    But, long range feature doesn't show the performance. So, I just wanted to confirm if my configuration is OK or not or there is another one to be configured along with the below things.

    I will talk with our HW and RF engineer as no error setting on my SW configuration for the single-ended & internal bias mode.

    #elif defined( CC2640R2XXX_KEYFOB_SINGLE_ENDED_INTERNAL_BIAS ) || defined( CC2640R2XXX_SATELLITE_SINGLE_ENDED_INTERNAL_BIAS )
        
      #define RF_FE_MODE_AND_BIAS           ( RF_FE_SINGLE_ENDED_RFP |             \
                                              RF_FE_INT_BIAS )

     #elif defined( CC2650EM_4IS ) || defined( CC2640R2XXX_KEYFOB_SINGLE_ENDED_INTERNAL_BIAS ) || defined( CC2640R2XXX_SATELLITE_SINGLE_ENDED_INTERNAL_BIAS )

     regOverride_t rfRegTbl[] = {

     // Recommended overrides for Bluetooth Low Energy, single-ended mode internal bias

     //uint32_t bleIsOverrides[] = {

       0x00001007,

       0x00354038,

       0x4001402D,

       0x00608402,

       0x4001405D,

       0x1801F800,

       0x000784A3,

       0xA47E0583,

       0xEAE00603,

       0x00010623,

       0x02010403,

       0x40014035,

       0x177F0408,

       0x38000463,

       0x000288A3,

       0x00456088,

       0x013800C3,

       0x036052AC,

       0x01AD02A3,

       0x01680263,

    #ifdef CACHE_AS_RAM

       0x00018063,

    #endif //CACHE_AS_RAM

       0xFFFFFFFF,

     };

  • As I wrote earlier those overrides are not correct for CC2640R2F and must not be used! If you look further up the file you will see that they are wrapped by #elif defined( CC26XX_R1 ) .

    The only overrides you need for R2 are:
    #elif defined( CC26XX_R2 )
    regOverride_t rfRegTbl[] = {
    HW_REG_OVERRIDE(0x6084, 0x05F8), // RFC_RFE:SPARE0. Select R1-style gain table
    0x04280243, //10 us added to the RF SYNTH calibration
    0x00FF8A43, // set advLenMask to 0xFF to avoid ROM patch
  • For R2, it shouldn't hit that block of code in ble_user_config.c. Instead, it should hit

    #elif defined( CC26XX_R2 )
      regOverride_t rfRegTbl[] = {
        HW_REG_OVERRIDE(0x6084, 0x05F8), // RFC_RFE:SPARE0. Select R1-style gain table
        0x04280243,  //10 us added to the RF SYNTH calibration
        0x00FF8A43,  // set advLenMask to 0xFF to avoid ROM patch
    #ifdef CACHE_AS_RAM
        0x00018063,
    #endif //CACHE_AS_RAM
        0xFFFFFFFF };

    Did you have CC26XX_R2 defined in your build?

  • Yes, the CC26XX_R2 is defined in the preprocessor, but CC26xx also is defined as default, so I thought that a macro derived from the CC2650EM_4IS should be used because it shows the comments with respect to single-ended & internal bias mode.
    Anyway, I will only use what Fredrik and you mentioned and pointed for me.

    Thank you so much.
    BR,
    Ji Won

  • Yes. It is a bit confusing. We need to keep both defines and CC26XX is used in the other part of the code even the build is for R2.
  • Also, the below thing made me confused even.
    it brings up that CC2650EM_7ID still is valid for R2 and also the CC26XX is necessary for R2 still.
    Anyway, SDK should be code-cleaned more exactly.

    /*
    * Define only one symbol:
    * CC2650EM_7ID - Differential RF and internal biasing
    (default for CC2640R2 LaunchPad)
    *
    * Note: CC2650EM_xxx reference designs apply to all CC26xx devices.
    * ==========================================================================
    */

  • By the way, the below line doesn't exist in ble_user_config.c, instead, urfc.c. Right? I checked both simplelink_cc2640r2_sdk_1_35_00_33 and simplelink_cc2640r2_sdk_1_40_00_45.

    HW_REG_OVERRIDE(0x6084, 0x05F8), // RFC_RFE:SPARE0. Select R1-style gain table

    How do you know that this should be used for it?

    As I understand, what is in urfc.c is not included in building.

    BR,
    Ji Won

  • I found the related things from RF studio.

    And I got the status is DONE_OK when the command requested.

  • Should I copy the related commands in yellow to the related parts in ble_user_config.c ?

    // Overrides for CMD_BLE5_RADIO_SETUP

    static uint32_t pOverridesCommon[] =

    {

        // override_ble5_setup_override_common.xml

        // Rx: Set LNA IB offset used for automatic software compensation to 0

    (uint32_t)0x00008883,

        // Rx: Set LNA IB trim value based on the selected defaultPhy.mainMode setting. (NOTE: The value 0x8 is a placeholder. The value to use should be set during run-time by radio driver function.)

    ADI_HALFREG_OVERRIDE(0,4,0xF,0x8),

        // override_frontend_is_rfp.xml

        // Rx: Set RSSI offset to adjust reported RSSI by -2 dB

    (uint32_t)0x000288A3,

    (uint32_t)0xFFFFFFFF,

    };

    // Overrides for CMD_BLE5_RADIO_SETUP

    static uint32_t pOverrides1Mbps[] =

    {

        // override_ble5_setup_override_1mbps.xml

        // Rx: Set LNA IB trim to normal trim value. (NOTE: The value 0x8 is a placeholder. The value to use should be set during run-time by radio driver function.)

    ADI_HALFREG_OVERRIDE(0,4,0xF,0x8),

        // Rx: Configure AGC to use gain table for improved performance

    HW_REG_OVERRIDE(0x6084, 0x05F8),

    (uint32_t)0xFFFFFFFF,

    };

    // Overrides for CMD_BLE5_RADIO_SETUP

    static uint32_t pOverrides2Mbps[] =

    {

        // override_ble5_setup_override_2mbps.xml

        // Rx: Set LNA IB trim to normal trim value. (NOTE: The value 0x8 is a placeholder. The value to use should be set during run-time by radio driver function.)

    ADI_HALFREG_OVERRIDE(0,4,0xF,0x8),

    (uint32_t)0xFFFFFFFF,

    };

    // Overrides for CMD_BLE5_RADIO_SETUP

    static uint32_t pOverridesCoded[] =

    {

        // override_ble5_setup_override_coded.xml

        // Rx: Set LNA IB trim to 0xF (maximum)

    ADI_HALFREG_OVERRIDE(0,4,0xF,0xF),

        // Rx: Override AGC target gain to improve performance

    HW_REG_OVERRIDE(0x6088, 0x0018),

    (uint32_t)0xFFFFFFFF,

    };

    BR,

    Ji Won

  • Ji Won,

    You should just use the overrides that are already in the BLE Stack. There is no need to change these or add anything.

    Fredrik