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.

CCS/LAUNCHXL-CC2640R2: CMD_BLE5_RADIO_SETUP 0x1820

Part Number: LAUNCHXL-CC2640R2

Tool/software: Code Composer Studio

Hi Even,

SDK used: Code composer Studio with Launchxl-cc2640r2 development board. We are working at 2.426 GKz and 2Mbps, transmitter / receiver mode.

If using core commands is not supported, could you give us another supported mode that allow us to receive more than 4 bytes in the same frame at 2.426 GHz and 2Mbps ?

1Mbps works fine but with 2Mbps we can not receive more than 4 bytes with the same configuration. Why 4 and not more ? That is very strange.

Thanks and best regards,

Fabien.

  • Part Number: LAUNCHXL-CC2640R2

    Tool/software: Code Composer Studio

    Hello,

    This command works correctly at 2Mbps for only 4 bytes in receiver mode. It does't work in using more than 4 bytes.

    Have you already seen this issue before?

    Need help!

    Thanks.

  • hi,

    As i understand it, that's an RF Core command. Can i ask out of curiosity why you are down in the rf core? I don't think we guide people to use the rf driver in their own custom ways. Can you give more back ground on what you're doing, what SDK you are on, how you create the problem etc?
  • Hi,

    I try to send one RF frame of 8 data bytes at 2Mbps to do a proper communication. So we would like to send one RF Frame of 8bytes by an module and receive this frame by another mode in Rx mode to treat these 8 bytes. When I use this CMD_BLE5_RADIO_SETUP 0x1820 at 1Mbps it works perfeclty but when I use it at 2Mbps I can get only 4 bytes.

    I'm using sdk_2_20_00_49.

    Thanks.

  • Hi Guillemin,

    As stated in my first post, we don't support using the RF Core Drivers directly. The BLE and BLE5Stacks handle this as a part of the stack to where you don't need to worry about messing with the RF Core Drivers.

    If you genuinely want more info about the RF Core Drivers, you can look at the DMM examples and how they schedule RF Commands, but again, we do not support custom implementations.
  • Hi, please let me know why you've rejected my post. As stated, we do not support the RF core drivers directly. Are you trying to use them on your own? If not, please give more background as to what you are doing. I don't understand the scope of your question as it stands or how i would reproduce it.
  • Hi,

    I would like to send an RF frame containing 8bytes at 2Mbps and received it. I have tried in Proprietary mode but doesn't work at 2Mbps. So I'm trying to use another cmd like 0x1820 which works until 4 bytes but if I increase the number of byte in RF Frame I can't catch these 8 bytes in receive mode but works correctly at 1Mbps.

    My question is , How do I have to do to receive these 8bytes at 2Mbps?

    Regards,

    Thomas.

  • Hi,

    Merging these threads as they are duplicate posts essentially and I have a feeling yall work together. Please lets us one thread.

    Just to make support the most effective, can you inform me if you are actually using BLE or are using the devices in a proprietary way? If you are doing the latter, I can find another engineer who supports the devices proprietary modes.
  • Hi,

    Yes we are working together and we are using the devices in a proprietary mode.

    Thanks.
  • Thanks Guillemin, I was under the assumption that you were using it as a BLE device since this thread was posted in the BLE forum. I will move you to the other forum and contact an engineer that can help you further. 

  • Hi Evan,

    Any news on this post?

    Regards,

    Thomas.

  • Hi Thomas,

    Unfortunately I'm not the expert on the lower level radio operation. i've contacted an expert to provide you with assistance but there has been a small delay. I will follow up again.
  • Hi Thomas, 

    You should be able to transmit 8 bytes at 2 Mbps. I am not sure how you have configured your device. I have attached the settings I obtained using SmartRF Studio. I verified the transmission between two CC2640R2 devices with 0% PER. Please try these settings and let me know what you see. 

    Configuration: 

    BLE5 2Msym GFSK @ 2Mbps 

    2426 MHz Frequency 

    8B Packet Length 

    Access Addr: 0x8e89bed6 (can be configured under CMD_BLE5_GENERIC_RX -> accessAddress)

    smartrf_settings_hsm.c
    //*********************************************************************************
    // Generated by SmartRF Studio version 2.9.0 (build#85)
    // Compatible with SimpleLink SDK version: CC2640R2 SDK 1.50.xx.xx
    // Device: CC2640R2F Rev. 1.0
    // 
    //*********************************************************************************
    
    
    //*********************************************************************************
    // Parameter summary
    // Adv. Address: 010203040506 
    // Adv. Data: 255 
    // BLE Channel: 38 
    // Extended Header: 09 09 010203040506 babe 
    // Frequency: 2426 MHz
    // PDU Payload length:: 8 
    // TX Power: 5 dBm 
    // Whitening: true 
    
    #include <ti/devices/DeviceFamily.h>
    #include DeviceFamily_constructPath(driverlib/rf_mailbox.h)
    #include DeviceFamily_constructPath(driverlib/rf_common_cmd.h)
    #include DeviceFamily_constructPath(driverlib/rf_ble_cmd.h)
    #include <ti/drivers/rf/RF.h>
    #include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_bt5.h)
    #include "smartrf_settings_hsm.h"
    
    
    // TI-RTOS RF Mode Object
    RF_Mode RF_ble =
    {
        .rfMode = RF_MODE_BLE,
        .cpePatchFxn = &rf_patch_cpe_bt5,
        .mcePatchFxn = 0,
        .rfePatchFxn = 0,
    };
    
    // TX Power table
    // The RF_TxPowerTable_DEFAULT_PA_ENTRY macro is defined in RF.h and requires the following arguments:
    // RF_TxPowerTable_DEFAULT_PA_ENTRY(bias, gain, boost coefficient)
    // See the Technical Reference Manual for further details about the "txPower" Command field.
    // The PA settings require the CCFG_FORCE_VDDR_HH = 0 unless stated otherwise.
    RF_TxPowerTable_Entry txPowerTable[] = 
    { 
        {-21, RF_TxPowerTable_DEFAULT_PA_ENTRY(7, 3, 0, 6) },
        {-18, RF_TxPowerTable_DEFAULT_PA_ENTRY(9, 3, 0, 6) },
        {-15, RF_TxPowerTable_DEFAULT_PA_ENTRY(11, 3, 0, 6) },
        {-12, RF_TxPowerTable_DEFAULT_PA_ENTRY(11, 1, 0, 10) },
        {-9, RF_TxPowerTable_DEFAULT_PA_ENTRY(14, 1, 1, 12) },
        {-6, RF_TxPowerTable_DEFAULT_PA_ENTRY(18, 1, 1, 14) },
        {-3, RF_TxPowerTable_DEFAULT_PA_ENTRY(24, 1, 1, 18) },
        {0, RF_TxPowerTable_DEFAULT_PA_ENTRY(33, 1, 1, 24) },
        {1, RF_TxPowerTable_DEFAULT_PA_ENTRY(20, 0, 0, 33) },
        {2, RF_TxPowerTable_DEFAULT_PA_ENTRY(24, 0, 0, 39) },
        {3, RF_TxPowerTable_DEFAULT_PA_ENTRY(28, 0, 0, 45) },
        {4, RF_TxPowerTable_DEFAULT_PA_ENTRY(36, 0, 1, 73) },
        {5, RF_TxPowerTable_DEFAULT_PA_ENTRY(48, 0, 1, 73) },
        RF_TxPowerTable_TERMINATION_ENTRY
    };
    
    
    // Overrides for CMD_BLE5_RADIO_SETUP
    uint32_t pOverridesCommon[] =
    {
        // override_ble5_setup_override_common.xml
        // 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),
        // Rx: Set LNA IB offset used for automatic software compensation to 0
        (uint32_t)0x00008883,
        // Synth: Use 24 MHz crystal, enable extra PLL filtering
        (uint32_t)0x02010403,
        // Synth: Set fine top and bottom code to 127 and 0
        HW_REG_OVERRIDE(0x4020, 0x7F00),
        // Synth: Configure faster calibration
        HW32_ARRAY_OVERRIDE(0x4004, 1),
        // Synth: Configure faster calibration
        (uint32_t)0x1C0C0618,
        // Synth: Configure faster calibration
        (uint32_t)0xC00401A1,
        // Synth: Configure faster calibration
        (uint32_t)0x21010101,
        // Synth: Configure faster calibration
        (uint32_t)0xC0040141,
        // Synth: Configure faster calibration
        (uint32_t)0x00214AD3,
        // Synth: Decrease synth programming time-out by 90 us (0x0298 RAT ticks = 166 us)
        (uint32_t)0x02980243,
        // 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
    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
    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
    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
    // Bluetooth 5 Radio Setup Command for all 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 = 0x1,
        .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 = 0x097A,
        .fractFreq = 0x0000,
        .synthConf.bTxMode = 0x0,
        .synthConf.refFreq = 0x0,
        .__dummy0 = 0x00,
        .__dummy1 = 0x00,
        .__dummy2 = 0x00,
        .__dummy3 = 0x0000,
    };
    
    // 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
    // Bluetooth 5 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 = 0x26,
        .whitening.init = 0x66,
        .whitening.bOverride = 0x1,
        .phyMode.mainMode = 0x1,
        .phyMode.coding = 0x0,
        .rangeDelay = 0x00,
        .txPower = 0x9330,
        .pParams = &bleGenericRxPar,
        .pOutput = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    };
    
    // 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
    // Bluetooth 5 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 = 0x7E,
        .whitening.init = 0x66,
        .whitening.bOverride = 0x1,
        .phyMode.mainMode = 0x1,
        .phyMode.coding = 0x0,
        .rangeDelay = 0x00,
        .txPower = 0x9330,
        .pParams = &ble5AdvAuxPar,
        .pOutput = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    };
    

     smartrf_settings_hsm.h