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: 2 Mbps or at least 1 Mbps in a proprietary radio mode

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2544, CC2541

We need to implement a radio link between the existing CC2544 dongle and the new CC2640R2F prototype.

Bitrates with GFSK modulation, which CC2544 supports:

  • 250 kbps,160 kHz deviation;
  • 1 Mbps,160 kHz deviation;
  • 1 Mbps, 250 kHz deviation;
  • 2 Mbps, 320 kHz deviation;
  • 2 Mbps, 500 kHz deviation.

On the CC2640R2F side we were able to realize only 250 kbps with a 160 kHz deviation. The source code fragment attached.

But we need to increase the bitrate to 2 Mbps or at least to 1 Mbps.

We ask you to give us the appropriate settings for a proprietary radio mode commands: 0x3806, 0x0803, 0x3801, 0x3802.

More, if possible, we would like to see the radio communication between two CC2640R2F chips at a 5 Mbps speed.

// Overrides for CMD_PROP_RADIO_SETUP
uint32_t pOverrides[] =
{
        (uint32_t)0xFFFFFFFF,
};

// CMD_PROP_RADIO_SETUP
rfc_CMD_PROP_RADIO_SETUP_t RF_cmdPropRadioDivSetup =
{
    .commandNo = 0x3806,
    .status = 0x0000,
    .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    .startTime = 0x00000000,
    .startTrigger.triggerType = 0x0,
    .startTrigger.bEnaCmd = 0x0,
    .startTrigger.triggerNo = 0x0,
    .startTrigger.pastTrig = 0x0,
    .condition.rule = 0x1,
    .condition.nSkip = 0x0,
    .modulation.modType = 0x1,// 0: FSK, 1: GFSK, Others: Reserved
    .modulation.deviation = 640,//Deviation (250-Hz steps) for FSK modulations
    .symbolRate.preScale = 15,//p is the prescaler value, given by symbolRate.preScale, which can be from 4 to 15
    .symbolRate.rateWord = 163840,//Fbaud = (R ◊ Fclk) / (p ◊ 2^20), Fclk is the system clock frequency of 24 MHz
    .rxBw = 10,
    .preamConf.nPreamBytes = 0x4,
    .preamConf.preamMode = 0x0,
    .formatConf.nSwBits = 32,
    .formatConf.bBitReversal = 0x1,
    .formatConf.bMsbFirst = 0x1,
    .formatConf.fecMode = 0x0,
    .formatConf.whitenMode = 0x0,
    .config.frontEndMode = 0x0,
    .config.biasMode = 0x0, //!< \brief 0: Internal bias, R2 skal ha internal
    .config.analogCfgMode = 0x0,
    .config.bNoFsPowerUp = 0x0,
    .txPower = 0xAB3F,//0xAB3F: 0 Db
    .pRegOverride = pOverrides,
};

// CMD_FS
rfc_CMD_FS_t RF_cmdFs =
{
    .commandNo = 0x0803,
    .status = 0x0000,
    .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    .startTime = 0x00000000,
    .startTrigger.triggerType = 0x0,
    .startTrigger.bEnaCmd = 0x0,
    .startTrigger.triggerNo = 0x0,
    .startTrigger.pastTrig = 0x0,
    .condition.rule = 0x1,
    .condition.nSkip = 0x0,
    .frequency = 2379,
    .fractFreq = 0x0000,
    .synthConf.bTxMode = 1,
    .synthConf.refFreq = 0x0,
};

// CMD_PROP_TX
rfc_CMD_PROP_TX_t RF_cmdPropTx =
{
    .commandNo = 0x3801,
    .status = 0x0000,
    .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    .startTime = 0x00000000,
    .startTrigger.triggerType = 0x0,
    .startTrigger.bEnaCmd = 0x0,
    .startTrigger.triggerNo = 0x0,
    .startTrigger.pastTrig = 0x0,
    .condition.rule = 0x1,
    .condition.nSkip = 0x0,
    .pktConf.bFsOff = 0x0,
    .pktConf.bUseCrc = 0x1,
    .pktConf.bVarLen = 0x1,
    .pktLen = 0x20,// SET APPLICATION PAYLOAD LENGTH
    .syncWord = 0x29417671,
    .pPkt = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
};

// CMD_PROP_RX
rfc_CMD_PROP_RX_t RF_cmdPropRx =
{
    .commandNo = 0x3802,
    .status = 0x0000,
    .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    .startTime = 0x00000000,
    .startTrigger.triggerType = 0x0,
    .startTrigger.bEnaCmd = 0x0,
    .startTrigger.triggerNo = 0x0,
    .startTrigger.pastTrig = 0x0,
    .condition.rule = 0x1,
    .condition.nSkip = 0x0,
    .pktConf.bFsOff = 0x0,
    .pktConf.bRepeatOk = 0x0,
    .pktConf.bRepeatNok = 0x0,
    .pktConf.bUseCrc = 0x1,
    .pktConf.bVarLen = 0x1,
    .pktConf.bChkAddress = 0x0,
    .pktConf.endType = 0x0,
    .pktConf.filterOp = 0x0,
    .rxConf.bAutoFlushIgnored = 0x0,
    .rxConf.bAutoFlushCrcErr = 0x0,
    .rxConf.bIncludeHdr = 0x1,
    .rxConf.bIncludeCrc = 0x0,
    .rxConf.bAppendRssi = 0x0,
    .rxConf.bAppendTimestamp = 0x0,
    .rxConf.bAppendStatus = 0x1,
    .syncWord = 0x29417671,
    .maxPktLen = 0x7d, // MAKE SURE DATA ENTRY IS LARGE ENOUGH
    .address0 = 0x00,
    .address1 = 0x00,
    .endTrigger.triggerType = 0x1,
    .endTrigger.bEnaCmd = 0x0,
    .endTrigger.triggerNo = 0x0,
    .endTrigger.pastTrig = 0x0,
    .endTime = 0x00000000,
    .pQueue = 0, // INSERT APPLICABLE POINTER: (dataQueue_t*)&xxx
    .pOutput = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
};
  • Hello, 

    It is possible to program CC2640R2 in BLE PHY (1Mbps datarate) and 250KHz deviation while using proprietary APIs. 

    If this would work for you, We can provide the settings needed. 

    Regards,

  • 1 Mbps is better than 250 kbps. Please provide these settings. Thank you!
  • Hello,
    I'm developing a new product based on CC2640R2F using the proprietary radio mode. Can you provide me the settings for 1mbps and if possible for 2/4 mbps please?
    Regards,
    Emanuele Viviani
  • Hi,

    For the BLE PHYs, you can export settings from SmartRF Studio. E.g., for 1 Mbps:

    //*********************************************************************************
    // Generated by SmartRF Studio version 2.7.0 (build #23)
    // Tested for SimpleLink SDK version: CC2640R2 SDK 1.30.xx.xx
    // Device: CC2640R2F Rev. 1.0
    // 
    //*********************************************************************************
    
    
    //*********************************************************************************
    // Parameter summary
    // Adv. Address: 010203040506 
    // BLE Channel: 17 
    // Extended Header: 09 09 010203040506 babe 
    // Frequency: 2440 MHz
    // PDU Payload length:: 30 
    // TX Power: 5 dBm 
    // Whitening: TRUE 
    
    
    #ifdef DEVICE_FAMILY 
        #undef DEVICE_FAMILY_PATH 
        #define DEVICE_FAMILY_PATH(x) <ti/devices/DEVICE_FAMILY/x> 
    #else 
        #error "You must define DEVICE_FAMILY at the project level as one of cc26x0, cc26x0r2, cc13x0, etc." 
    #endif 
        
    
    #include DEVICE_FAMILY_PATH(driverlib/rf_mailbox.h)
    #include DEVICE_FAMILY_PATH(driverlib/rf_common_cmd.h)
    #include DEVICE_FAMILY_PATH(driverlib/rf_ble_cmd.h)
    #include <ti/drivers/rf/RF.h>
    #include DEVICE_FAMILY_PATH(rf_patches/rf_patch_cpe_bt5.h)
    #include "smartrf_settings.h"
    
    
    // TI-RTOS RF Mode Object
    RF_Mode RF_ble =
    {
        .rfMode = RF_MODE_BLE,
        .cpePatchFxn = &rf_patch_cpe_bt5,
        .mcePatchFxn = 0,
        .rfePatchFxn = 0,
    };
    
    // 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),
        // Bluetooth 5: Set correct total clock accuracy for received AuxPtr assuming local sleep clock of 50 ppm
        (uint32_t)0x0E490823,
        // override_frontend_id.xml
        (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,
    };
    
    
    // CMD_BLE5_RADIO_SETUP
    // BLE Radio Setup Command for all v5.0 PHYs
    rfc_CMD_BLE5_RADIO_SETUP_t RF_cmdBle5RadioSetup =
    {
        .commandNo = 0x1820,
        .status = 0x0000,
        .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
        .startTime = 0x00000000,
        .startTrigger.triggerType = 0x0,
        .startTrigger.bEnaCmd = 0x0,
        .startTrigger.triggerNo = 0x0,
        .startTrigger.pastTrig = 0x0,
        .condition.rule = 0x1,
        .condition.nSkip = 0x0,
        .defaultPhy.mainMode = 0x0,
        .defaultPhy.coding = 0x0,
        .__dummy0 = 0x00,
        .config.frontEndMode = 0x0,
        .config.biasMode = 0x0,
        .config.analogCfgMode = 0x0,
        .config.bNoFsPowerUp = 0x0,
        .txPower = 0x9330,
        .pRegOverrideCommon = pOverridesCommon,
        .pRegOverride1Mbps = pOverrides1Mbps,
        .pRegOverride2Mbps = pOverrides2Mbps,
        .pRegOverrideCoded = pOverridesCoded,
    };
    
    // CMD_FS
    // Frequency Synthesizer Programming Command
    rfc_CMD_FS_t RF_cmdFs =
    {
        .commandNo = 0x0803,
        .status = 0x0000,
        .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
        .startTime = 0x00000000,
        .startTrigger.triggerType = 0x0,
        .startTrigger.bEnaCmd = 0x0,
        .startTrigger.triggerNo = 0x0,
        .startTrigger.pastTrig = 0x0,
        .condition.rule = 0x1,
        .condition.nSkip = 0x0,
        .frequency = 0x0988,
        .fractFreq = 0x0000,
        .synthConf.bTxMode = 0x0,
        .synthConf.refFreq = 0x0,
        .__dummy0 = 0x00,
        .__dummy1 = 0x00,
        .__dummy2 = 0x00,
        .__dummy3 = 0x0000,
    };
    
    // Structure for CMD_BLE5_ADV_AUX.pParams
    rfc_ble5AdvAuxPar_t ble5AdvAuxPar =
    {
        .pRxQ = 0, // INSERT APPLICABLE POINTER: (dataQueue_t*)&xxx
        .rxConfig.bAutoFlushIgnored = 0x0,
        .rxConfig.bAutoFlushCrcErr = 0x0,
        .rxConfig.bAutoFlushEmpty = 0x0,
        .rxConfig.bIncludeLenByte = 0x0,
        .rxConfig.bIncludeCrc = 0x0,
        .rxConfig.bAppendRssi = 0x0,
        .rxConfig.bAppendStatus = 0x0,
        .rxConfig.bAppendTimestamp = 0x0,
        .advConfig.advFilterPolicy = 0x0,
        .advConfig.deviceAddrType = 0x0,
        .advConfig.targetAddrType = 0x0,
        .advConfig.bStrictLenFilter = 0x0,
        .advConfig.bDirected = 0x0,
        .advConfig.privIgnMode = 0x0,
        .advConfig.rpaMode = 0x0,
        .__dummy0 = 0x00,
        .auxPtrTargetType = 0x00,
        .auxPtrTargetTime = 0x00000000,
        .pAdvPkt = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
        .pRspPkt = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
        .pDeviceAddress = 0, // INSERT APPLICABLE POINTER: (uint16_t*)&xxx
        .pWhiteList = 0, // INSERT APPLICABLE POINTER: (uint32_t*)&xxx
    };
    
    // CMD_BLE5_ADV_AUX
    // BLE Secondary Channel Advertiser Command
    rfc_CMD_BLE5_ADV_AUX_t RF_cmdBle5AdvAux =
    {
        .commandNo = 0x1824,
        .status = 0x0000,
        .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
        .startTime = 0x00000000,
        .startTrigger.triggerType = 0x0,
        .startTrigger.bEnaCmd = 0x0,
        .startTrigger.triggerNo = 0x0,
        .startTrigger.pastTrig = 0x0,
        .condition.rule = 0x1,
        .condition.nSkip = 0x0,
        .channel = 0x8C,
        .whitening.init = 0x51,
        .whitening.bOverride = 0x1,
        .phyMode.mainMode = 0x0,
        .phyMode.coding = 0x0,
        .rangeDelay = 0x00,
        .txPower = 0x9330,
        .pParams = &ble5AdvAuxPar,
        .pOutput = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    };
    
    // Structure for CMD_BLE5_GENERIC_RX.pParams
    rfc_bleGenericRxPar_t bleGenericRxPar =
    {
        .pRxQ = 0, // INSERT APPLICABLE POINTER: (dataQueue_t*)&xxx
        .rxConfig.bAutoFlushIgnored = 0x0,
        .rxConfig.bAutoFlushCrcErr = 0x0,
        .rxConfig.bAutoFlushEmpty = 0x0,
        .rxConfig.bIncludeLenByte = 0x1,
        .rxConfig.bIncludeCrc = 0x1,
        .rxConfig.bAppendRssi = 0x1,
        .rxConfig.bAppendStatus = 0x1,
        .rxConfig.bAppendTimestamp = 0x0,
        .bRepeat = 0x01,
        .__dummy0 = 0x0000,
        .accessAddress = 0x8E89BED6,
        .crcInit0 = 0x55,
        .crcInit1 = 0x55,
        .crcInit2 = 0x55,
        .endTrigger.triggerType = 0x1,
        .endTrigger.bEnaCmd = 0x0,
        .endTrigger.triggerNo = 0x0,
        .endTrigger.pastTrig = 0x0,
        .endTime = 0x00000001,
    };
    
    // CMD_BLE5_GENERIC_RX
    // BLE Generic Receiver Command
    rfc_CMD_BLE5_GENERIC_RX_t RF_cmdBle5GenericRx =
    {
        .commandNo = 0x1829,
        .status = 0x0000,
        .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
        .startTime = 0x00000000,
        .startTrigger.triggerType = 0x0,
        .startTrigger.bEnaCmd = 0x0,
        .startTrigger.triggerNo = 0x0,
        .startTrigger.pastTrig = 0x0,
        .condition.rule = 0x1,
        .condition.nSkip = 0x0,
        .channel = 0x8C,
        .whitening.init = 0x51,
        .whitening.bOverride = 0x1,
        .phyMode.mainMode = 0x0,
        .phyMode.coding = 0x0,
        .rangeDelay = 0x00,
        .txPower = 0x9330,
        .pParams = &bleGenericRxPar,
        .pOutput = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    };

  • I'm still faced same issues at CC2640R2.

    Using proprietary radio mode, I want 1Mbps data rate higher but around 500kbps.

    I used rfPacketErrorRate program in CC2640R2_LAUNCHXL .

    When I configured 1 Mbps that below, RX(receiver) did not detect any packet.
    bps rateWord prescale rxbw(rx Bandwidth)
    ------------------------------------------------------------------------------------
    1Mbps 524288 12 7~18
    1Mbps 262144 6 7 ~18
    1Mbps 655360 15 7~18

    In that case, Tx is Ok but Rx is failed. also I checked Tx RF spectrum and Tx is always ok but Rx is failed.

    From my test result, even thought I configured GMSK proprietary mode,
    it seems, maximum data rate that Rx is ok is around 500Kbps of 2-FSK in CC2640R2.

    In BLE mode, if I applied "rf_pach_cpe_bt5" , BLE max data rate is reached 2Mbps.

    But in proprietary radio mode, max data rate is under 500Kbps in my test result.

    How can I get 1Mbps higher data rate in in proprietary radio mode ?.

    if you have available example code that 1Mbps data rate was Ok, please let me know.

    Thanks, Andy
  • Hi Andy,

    Did you try exporting settings from SmartRF studio for the BLE 1Mbps PHY?
  • Hi Marie H.

    Thanks your reply.

    I tested several configuration from SmartRF studio. In BLE mode, Configuration of 1Mbps and 2Mbps is works well (Rx/Tx is ok)

    But there is some restrictions in my project.

    To receive the packets that transmitted some special devices, I need to change syncWord. 

    This is why I used in proprietary mode.

    As you know,  syncWord is configured by CMD_PRO_TX(0x3801)  in proprietary  mode.

    From my test results of using rfPacketErrorRate, if RF mode is configured  BLE mode, BLE  command should be used for TX and RX.

    Please check my test result below.

             RF Configuration Mode            Packet TX Command                      Test Result 
    RF_MODE_BLE CMD_BLE_ADV_NC (0x1805) Tx/Rx Ok
    CMD_PROP_TX (0x3801)  program stuck
    RF_MODE_PROPRIETARY_2_4 CMD_BLE_ADV_NC (0x1805) program stuck
    CMD_PROP_TX (0x3801)  .Tx/Rx Ok ( 500Kbps or less )
    .Receiver can not detect packet( 1Mbps or higher)

    Thanks Andy

  • Hello Andy,

    With RF configuration mode set to "RF_MODE_BLE", the device will only accept BLE APIs. For proprietary implementation, "RF_MODE_PROPRIETARY_2_4" mode should be used.

    To program the device using proprietary commands at 1 and 2mbps datarates, the overrides and radio setup commands remain the same. for TX and RX operations, at 1mbps datarate, proprietary API can be used and HS APIs can be used at 1 and 2mbps datarates. Currently, CMD_PROP_RADIO_SETUP command is not supported at these datarates and hence the syncword will have to be changed using override.  

    Can you please provide your exact requirements - would you like to use BLE APIs with different syncword or do you need to customize the packet contents as well? What example are you using currently to test this out?

    Regards,

  • Hi SVS,


    Our requirements are;

    1. Datarate at 1 Mbps or higher
    2. Be able to broadcast advertising packets at any time interval via any of the 40 BLE frequency channel. BLE sends advertising packets at regular interval (i.e., 80 ms). We need this to be changed in such a way that advertising packets can be sent at any interval. In addition, BLE sends the advertising packets only on channel 37, 38, and 39. We need to be able to send advertising packets on any channel out of 40 BLE channels.

    3. Be able to change sincword
    4. We also need to customize the packet content.
    5. The chip needs to be automotive qualified.

    We've successfully implemented our application on CC2541 proprietary mode at 1-2 Mbps. As you know, however, CC2541 has 8051 mcu and it is not powerful enough for our future applications. Therefore, we are planning to migrate into a different chip based on ARM Cortex-M3.


    I seems that CC2640R2 (automotive qualified) on proprietary mode at 1-2 Mbps is the only option we have at the moment. But we are having difficult time running it on proprietary mode at 1 Mbps or higher.


    Regards,
    Andy.

  • Hi SVS,


    Do you have plan to support 1Mbps or higher on proprietary for CC2640R2 ?

    If you have plan to support it, Can I get a schedule or road map that supports 1Mbps or higher on proprietary mode?

    I hope to receive your reply.

    Regards,
    Andy .
  • Hi Andy,

    For roadmap questions, please ask you local TI salesperson.

    When you are using the BLE_Mode with the RF driver, you are not necessarily advertising per the BLE spec. You are free to use whatever payload, frequency and packet interval you want.

    You should be able to configure the radio in BLE Mode and still use the CMD_PROP_TX. Can you post your settings when this configuration fails?