Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

CC2652P: CMD_PROP_RADIO_DIV_SETUP fails (CMD_PROP_RADIO_SETUP succeeds, but not with PA)

Part Number: CC2652P
Other Parts Discussed in Thread: CC1352P,

Hi, I have  a code that works on CC1352P and transmits and receivers proprietary mode packets; the radio is setup using CMD_PROP_RADIO_DIV_SETUP. The same code fails on CC2652P with a PROP_ERROR_NO_SETUP error (0x3803) from CMD_PROP_TX. 

When I change the commandNo from CMD_PROP_RADIO_DIV_SETUP to CMD_PROP_RADIO_SETUP, the code runs on CC2652P, but only without the PA. When I try to configure the PA by putting 0xFFFF in the txPower field and adding pointers to the the TxStd and Tx20 overrides to the struct, setup fails with 0x0803, and the transmit commands also fail with 0x3803. This happens whether I fill in the TxStd and Tx20 in the appropriate fields in rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t and when I cast the pointer to the struct to a pointer to rfc_CMD_PROP_RADIO_SETUP_PA_t (so these overrides follow directly the normal override field).

Any help would be appreciated. 

Thanks, Sivan

  • Hi Sivan,

    What frequency and tx Power was your CC1352P example operating at?  Please use the CMD_PROP_RADIO_DIV_SETUP_PA structure from a 2.4 GHz PropRF example but obtain pOverrides* arrays from an existing 20 dBm-enabled BLE or Zigbee project.  I did not have similar issues when evaluating the following radio configuration (only to be referenced as an example):

    /*
     *  ======== ti_radio_config.c ========
     *  Configured RadioConfig module definitions
     *
     *  DO NOT EDIT - This file is generated for the CC1352P1F3RGZ
     *  by the SysConfig tool.
     *
     *  Radio Config module version : 1.13
     *  SmartRF Studio data version : 2.25.0
     */
    
    #include "ti_radio_config.h"
    #include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_prop.h)
    
    
    // *********************************************************************************
    //   RF Frontend configuration
    // *********************************************************************************
    // RF design based on: LAUNCHXL-CC1352P-2 (LAUNCHXL-CC1352P2_20dBm)
    
    // TX Power tables
    // The RF_TxPowerTable_DEFAULT_PA_ENTRY and RF_TxPowerTable_HIGH_PA_ENTRY macros are defined in RF.h.
    // The following arguments are required:
    // RF_TxPowerTable_DEFAULT_PA_ENTRY(bias, gain, boost, coefficient)
    // RF_TxPowerTable_HIGH_PA_ENTRY(bias, ibboost, boost, coefficient, ldoTrim)
    // 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.
    
    // 868 MHz, 13 dBm
    RF_TxPowerTable_Entry txPowerTable_868_pa13[TXPOWERTABLE_868_PA13_SIZE] =
    {
        {-20, RF_TxPowerTable_DEFAULT_PA_ENTRY(0, 3, 0, 2) }, // 0x04C0
        {-15, RF_TxPowerTable_DEFAULT_PA_ENTRY(1, 3, 0, 3) }, // 0x06C1
        {-10, RF_TxPowerTable_DEFAULT_PA_ENTRY(2, 3, 0, 5) }, // 0x0AC2
        {-7, RF_TxPowerTable_DEFAULT_PA_ENTRY(3, 3, 0, 5) }, // 0x0AC3
        {-5, RF_TxPowerTable_DEFAULT_PA_ENTRY(4, 3, 0, 5) }, // 0x0AC4
        {-3, RF_TxPowerTable_DEFAULT_PA_ENTRY(5, 3, 0, 6) }, // 0x0CC5
        {0, RF_TxPowerTable_DEFAULT_PA_ENTRY(8, 3, 0, 8) }, // 0x10C8
        {1, RF_TxPowerTable_DEFAULT_PA_ENTRY(9, 3, 0, 9) }, // 0x12C9
        {2, RF_TxPowerTable_DEFAULT_PA_ENTRY(10, 3, 0, 9) }, // 0x12CA
        {3, RF_TxPowerTable_DEFAULT_PA_ENTRY(11, 3, 0, 10) }, // 0x14CB
        {4, RF_TxPowerTable_DEFAULT_PA_ENTRY(13, 3, 0, 11) }, // 0x16CD
        {5, RF_TxPowerTable_DEFAULT_PA_ENTRY(14, 3, 0, 14) }, // 0x1CCE
        {6, RF_TxPowerTable_DEFAULT_PA_ENTRY(17, 3, 0, 16) }, // 0x20D1
        {7, RF_TxPowerTable_DEFAULT_PA_ENTRY(20, 3, 0, 19) }, // 0x26D4
        {8, RF_TxPowerTable_DEFAULT_PA_ENTRY(24, 3, 0, 22) }, // 0x2CD8
        {9, RF_TxPowerTable_DEFAULT_PA_ENTRY(28, 3, 0, 31) }, // 0x3EDC
        {10, RF_TxPowerTable_DEFAULT_PA_ENTRY(18, 2, 0, 31) }, // 0x3E92
        {11, RF_TxPowerTable_DEFAULT_PA_ENTRY(26, 2, 0, 51) }, // 0x669A
        {12, RF_TxPowerTable_DEFAULT_PA_ENTRY(16, 0, 0, 82) }, // 0xA410
        // The original PA value (12.5 dBm) has been rounded to an integer value.
        {13, RF_TxPowerTable_DEFAULT_PA_ENTRY(36, 0, 0, 89) }, // 0xB224
        // This setting requires CCFG_FORCE_VDDR_HH = 1.
        {14, RF_TxPowerTable_DEFAULT_PA_ENTRY(63, 0, 1, 0) }, // 0x013F
        RF_TxPowerTable_TERMINATION_ENTRY
    };
    
    
    // 2400 MHz, 5 dBm
    RF_TxPowerTable_Entry txPowerTable_2400_pa5[TXPOWERTABLE_2400_PA5_SIZE] =
    {
        {-20, RF_TxPowerTable_DEFAULT_PA_ENTRY(6, 3, 0, 2) }, // 0x04C6
        {-18, RF_TxPowerTable_DEFAULT_PA_ENTRY(8, 3, 0, 3) }, // 0x06C8
        {-15, RF_TxPowerTable_DEFAULT_PA_ENTRY(10, 3, 0, 3) }, // 0x06CA
        {-12, RF_TxPowerTable_DEFAULT_PA_ENTRY(12, 3, 0, 5) }, // 0x0ACC
        {-10, RF_TxPowerTable_DEFAULT_PA_ENTRY(15, 3, 0, 5) }, // 0x0ACF
        {-9, RF_TxPowerTable_DEFAULT_PA_ENTRY(16, 3, 0, 5) }, // 0x0AD0
        {-6, RF_TxPowerTable_DEFAULT_PA_ENTRY(20, 3, 0, 8) }, // 0x10D4
        {-5, RF_TxPowerTable_DEFAULT_PA_ENTRY(22, 3, 0, 9) }, // 0x12D6
        {-3, RF_TxPowerTable_DEFAULT_PA_ENTRY(19, 2, 0, 12) }, // 0x1893
        {0, RF_TxPowerTable_DEFAULT_PA_ENTRY(19, 1, 0, 20) }, // 0x2853
        {1, RF_TxPowerTable_DEFAULT_PA_ENTRY(22, 1, 0, 20) }, // 0x2856
        {2, RF_TxPowerTable_DEFAULT_PA_ENTRY(25, 1, 0, 25) }, // 0x3259
        {3, RF_TxPowerTable_DEFAULT_PA_ENTRY(29, 1, 0, 28) }, // 0x385D
        {4, RF_TxPowerTable_DEFAULT_PA_ENTRY(35, 1, 0, 39) }, // 0x4E63
        {5, RF_TxPowerTable_DEFAULT_PA_ENTRY(23, 0, 0, 57) }, // 0x7217
        RF_TxPowerTable_TERMINATION_ENTRY
    };
    
    // 2400 MHz, 20 dBm
    RF_TxPowerTable_Entry txPowerTable_2400_pa20[TXPOWERTABLE_2400_PA20_SIZE] =
    {
        {14, RF_TxPowerTable_HIGH_PA_ENTRY(22, 3, 1, 19, 27) }, // 0x1B27D6
        {15, RF_TxPowerTable_HIGH_PA_ENTRY(26, 3, 1, 23, 27) }, // 0x1B2FDA
        {16, RF_TxPowerTable_HIGH_PA_ENTRY(30, 3, 1, 28, 27) }, // 0x1B39DE
        {17, RF_TxPowerTable_HIGH_PA_ENTRY(37, 3, 1, 39, 27) }, // 0x1B4FE5
        {18, RF_TxPowerTable_HIGH_PA_ENTRY(32, 3, 1, 35, 48) }, // 0x3047E0
        {19, RF_TxPowerTable_HIGH_PA_ENTRY(34, 3, 1, 48, 63) }, // 0x3F61E2
        {20, RF_TxPowerTable_HIGH_PA_ENTRY(53, 3, 1, 58, 63) }, // 0x3F75F5
        RF_TxPowerTable_TERMINATION_ENTRY
    };
    
    
    
    //*********************************************************************************
    //  RF Setting:   Custom (100 kbps, 50 kHz Deviation, 2-GFSK, 311 kHz RX Bandwidth)
    //
    //  PHY:          custom2400
    //  Setting file: setting_tc900_custom.json
    //*********************************************************************************
    
    // PARAMETER SUMMARY
    // RX Address0: 0xAA
    // RX Address1: 0xBB
    // RX Address Mode: No address check
    // Frequency (MHz): 2440.0000
    // Deviation (kHz): 50.0
    // Fixed Packet Length: 20
    // Packet Length Config: Variable
    // Max Packet Length: 255
    // Preamble Count: 4 Bytes
    // Preamble Mode: Send 0 as the first preamble bit
    // RX Filter BW (kHz): 310.8
    // Symbol Rate (kBaud): 100.000
    // Sync Word: 0x930B51DE
    // Sync Word Length: 32 Bits
    // TX Power (dBm): 5
    // TX Power (dBm): 13
    // TX Power (dBm): 20
    // Whitening: No whitening
    
    // TI-RTOS RF Mode Object
    RF_Mode RF_prop =
    {
        .rfMode = RF_MODE_PROPRIETARY_2_4,
        .cpePatchFxn = &rf_patch_cpe_prop,
        .mcePatchFxn = 0,
        .rfePatchFxn = 0
    };
    
    // Overrides for CMD_PROP_RADIO_DIV_SETUP_PA
    uint32_t pOverrides[] =
    {
        // override_tc900.json
        // DC/DC regulator: In Tx, use DCDCCTL5[3:0]=0x3 (DITHER_EN=0 and IPEAK=3).
        (uint32_t)0x00F388D3,
        // Tx: Configure PA ramp time, PACTL2.RC=0x2 (in ADI0, set PACTL2[4:3]=0x2)
        ADI_2HALFREG_OVERRIDE(0,16,0x8,0x0,17,0x1,0x1),
        // Rx: Set AGC reference level to 0x20 (default: 0x2E)
        HW_REG_OVERRIDE(0x609C,0x0020),
        // Rx: Set anti-aliasing filter bandwidth to 0x9 (in ADI0, set IFAMPCTL3[7:4]=0x9)
        ADI_HALFREG_OVERRIDE(0,61,0xF,0x9),
        (uint32_t)0xFFFFFFFF
    };
    
    // Overrides for CMD_RADIO_SETUP_PA
    uint32_t pOverridesTxStd[] =
    {
        // The TX Power element should always be the first in the list
        TX_STD_POWER_OVERRIDE(0x7217),
        // The ANADIV radio parameter based on the LO divider (0) and front-end (0) settings
        (uint32_t)0x05320703,
        // override_txstd_settings.xml
        // Set RTIM offset to default for standard PA
        (uint32_t)0x00008783,
        // Set synth mux to default value for standard PA
        (uint32_t)0x050206C3,
        // Set TXRX pin to 0 in RX and high impedance in idle/TX.
        HW_REG_OVERRIDE(0x60A8,0x0401),
        (uint32_t)0xFFFFFFFF
    };
    
    
    // Overrides for CMD_RADIO_SETUP_PA
    uint32_t pOverridesTx20[] =
    {
        // The TX Power element should always be the first in the list
        TX20_POWER_OVERRIDE(0x003F75F5),
        // The ANADIV radio parameter based on the LO divider (0) and front-end (0) settings
        (uint32_t)0x01C20703,
        // override_tx20_settings.xml
        // Set RTIM offset to 3 for high power PA
        (uint32_t)0x00038783,
        // Set synth mux for high power PA
        (uint32_t)0x010206C3,
        // Set TXRX pin to 0 in RX/TX and high impedance in idle.
        HW_REG_OVERRIDE(0x60A8,0x0001),
        (uint32_t)0xFFFFFFFF
    };
    
    
    
    // CMD_PROP_RADIO_DIV_SETUP_PA
    // Proprietary Mode Radio Setup Command for All Frequency Bands
    rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t RF_cmdPropRadioDivSetup =
    {
        .commandNo = 0x3807,
        .status = 0x0000,
        .pNextOp = 0,
        .startTime = 0x00000000,
        .startTrigger.triggerType = 0x0,
        .startTrigger.bEnaCmd = 0x0,
        .startTrigger.triggerNo = 0x0,
        .startTrigger.pastTrig = 0x0,
        .condition.rule = 0x1,
        .condition.nSkip = 0x0,
        .modulation.modType = 0x1,
        .modulation.deviation = 0xC8,
        .modulation.deviationStepSz = 0x0,
        .symbolRate.preScale = 0xF,
        .symbolRate.rateWord = 0x10000,
        .symbolRate.decimMode = 0x0,
        .rxBw = 0x59,
        .preamConf.nPreamBytes = 0x4,
        .preamConf.preamMode = 0x0,
        .formatConf.nSwBits = 0x20,
        .formatConf.bBitReversal = 0x0,
        .formatConf.bMsbFirst = 0x1,
        .formatConf.fecMode = 0x0,
        .formatConf.whitenMode = 0x0,
        .config.frontEndMode = 0x0,
        .config.biasMode = 0x1,
        .config.analogCfgMode = 0x0,
        .config.bNoFsPowerUp = 0x0,
        .config.bSynthNarrowBand = 0x0,
        .txPower = 0xFFFF,
        .pRegOverride = pOverrides,
        .centerFreq = 0x0988,
        .intFreq = 0x0800,
        .loDivider = 0x00,
        .pRegOverrideTxStd = pOverridesTxStd,
        .pRegOverrideTx20 = pOverridesTx20
    };
    
    // CMD_FS
    // Frequency Synthesizer Programming Command
    rfc_CMD_FS_t RF_cmdFs =
    {
        .commandNo = 0x0803,
        .status = 0x0000,
        .pNextOp = 0,
        .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
    };
    
    // CMD_PROP_TX
    // Proprietary Mode Transmit Command
    rfc_CMD_PROP_TX_t RF_cmdPropTx =
    {
        .commandNo = 0x3801,
        .status = 0x0000,
        .pNextOp = 0,
        .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 = 0x14,
        .syncWord = 0x930B51DE,
        .pPkt = 0
    };
    
    // CMD_PROP_RX
    // Proprietary Mode Receive Command
    rfc_CMD_PROP_RX_t RF_cmdPropRx =
    {
        .commandNo = 0x3802,
        .status = 0x0000,
        .pNextOp = 0,
        .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 = 0x930B51DE,
        .maxPktLen = 0xFF,
        .address0 = 0xAA,
        .address1 = 0xBB,
        .endTrigger.triggerType = 0x1,
        .endTrigger.bEnaCmd = 0x0,
        .endTrigger.triggerNo = 0x0,
        .endTrigger.pastTrig = 0x0,
        .endTime = 0x00000000,
        .pQueue = 0,
        .pOutput = 0
    };
    
    
    

    Regards,
    Ryan

  • Thanks Ryan.

    I investigated more and here is what I found out.

    1. on both CC1352P and CC2652P I can get an LRM mode 2 to work at 2.4GHz. What I did is to start with the SmartRF Studio for 100kb/s 50kHz deviation GFSK settings for 2.4, to change the fecMode=8 and whitenMode=1, and to add an override HW_REG_OVERRIDE(0x5068,0x030C). This works both in my code and in SmartRF studio (with the overrides editted).

    2. In my code with the 5dBm settings from SmartRF studio, this gives good performance with CMD_PROP_RADIO_SETUP but reduced power (about -45dB for CC1352P!) with CMD_PROP_RADIO_DIV_SETUP. Very strange. This is tests in my code, not in SmartRF studio. But really the only difference is the command, and the difference in RSSI on another computer+launchpad running SmartRF Studio in Packet RX mode is dramatic.

    3.  Also, CC1352P can transmit at both 5dBm and at 20dBm with CMD_PROP_RADIO_SETUP. The normal overrides are the same, the TxStd and Tx20 are from a 802.15.4 setup in SmartRF studio. (The BLE overrides had some BLE-specific overrides and this did not work; the 802.15.4 overrides are okay for proprietary).

    4. However, CC2652P (E72 module from EBYTE) gives a 0x0803 to the CMD_PROP_RADIO_SETUP. I could not get it to work at 20dBm.

    Any advice would be appreciated.

    Thanks, Sivan

  • CMD_PROP_RADIO_SETUP is for up to 5 dBm with 2.4 GHz, CMD_PROP_RADIO_SETUP_PA would allow for 20 dBm.  CMD_PROP_RADIO_DIV_SETUP and likewise CMD_PROP_RADIO_DIV_SETUP_PA can command all frequency bands.  If you see a large degradation in performance it is likely due to a dissatisfactory output RF path.  You can consult the module manufacturer's documentation to further understand what modes of operation (frequency and output path) are allowed.

    Regards,
    Ryan