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.

CC1310: WOR example rfWakeOnRadioTx_CC1310_LAUNCHXL_tirtos_ccs not working with 2.4kbps datarate

Part Number: CC1310
Other Parts Discussed in Thread: CC1101

WOR example rfWakeOnRadioTx_CC1310_LAUNCHXL_tirtos_ccs works with given Default RF setting. 

On receiving side there is Smart RF studio with same RF setting. 

But on changing RF setting in code to 2.4kbps as shown bellow and similar setting applied to smart RF studio RF communication is not working. Using SDK 3.10

//*********************************************************************************
// Generated by SmartRF Studio version 2.12.0 (build#147)
// The applied template is compatible with CC13x0 SDK 2.30.xx.xx
// Device: CC1310 Rev. B (2.1)
//
//*********************************************************************************


//*********************************************************************************
// Parameter summary
// RX Address0: 0xAA 
// RX Address1: 0xBB 
// RX Address Mode: No address check 
// Frequency: 868.00000 MHz
// Data Format: Serial mode disable 
// Deviation: 5.250 kHz
// Packet Length Config: Variable 
// Packet Length: 20 
// Packet Data: 255 
// RX Filter BW: 49 kHz
// Symbol Rate: 2.40021 kBaud
// Sync Word Length: 32 Bits 
// TX Power: 14 dBm (requires define CCFG_FORCE_VDDR_HH = 1 in ccfg.c, see CC13xx/CC26xx Technical Reference Manual)
// Whitening: No whitening 

#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_prop_cmd.h)
#include <ti/drivers/rf/RF.h>
#include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_brepeat.h)
#include DeviceFamily_constructPath(rf_patches/rf_patch_rfe_brepeat.h)
#include DeviceFamily_constructPath(rf_patches/rf_patch_mce_brepeat.h)
#include "SRWRG_GFSK_2.4kbps_10dbm_868MHz_5.1KHzDev.h"


// TI-RTOS RF Mode Object
RF_Mode RF_prop =
{
    .rfMode = RF_MODE_PROPRIETARY_SUB_1,
    .cpePatchFxn = &rf_patch_cpe_brepeat,
    .mcePatchFxn = &rf_patch_mce_brepeat,
    .rfePatchFxn = &rf_patch_rfe_brepeat
};


// Overrides for CMD_PROP_RADIO_DIV_SETUP
uint32_t pOverrides[] =
{
    // override_use_patch_prop_brepeat.xml
    // PHY: Use MCE RAM patch, RFE RAM patch
    MCE_RFE_OVERRIDE(1,0,0,1,0,0),
    // override_synth_prop_863_930_div5_lbw60k.xml
    // Synth: Set recommended RTRIM to 7
    HW_REG_OVERRIDE(0x4038,0x0037),
    // Synth: Set Fref to 4 MHz
    (uint32_t)0x000684A3,
    // Synth: Configure fine calibration setting
    HW_REG_OVERRIDE(0x4020,0x7F00),
    // Synth: Configure fine calibration setting
    HW_REG_OVERRIDE(0x4064,0x0040),
    // Synth: Configure fine calibration setting
    (uint32_t)0xB1070503,
    // Synth: Configure fine calibration setting
    (uint32_t)0x05330523,
    // Synth: Set loop bandwidth after lock to 60 kHz
    (uint32_t)0x40410583,
    // Synth: Set loop bandwidth after lock to 60 kHz
    (uint32_t)0x32CC0603,
    // Synth: Set loop bandwidth after lock to 60 kHz
    (uint32_t)0x00010623,
    // Synth: Configure VCO LDO (in ADI1, set VCOLDOCFG=0x9F to use voltage input reference)
    ADI_REG_OVERRIDE(1,4,0x9F),
    // Synth: Configure synth LDO (in ADI1, set SLDOCTL0.COMP_CAP=1)
    ADI_HALFREG_OVERRIDE(1,7,0x4,0x4),
    // Synth: Use 24 MHz XOSC as synth clock, enable extra PLL filtering
    (uint32_t)0x02010403,
    // Synth: Configure extra PLL filtering
    (uint32_t)0x00108463,
    // Synth: Increase synth programming timeout (0x04B0 RAT ticks = 300 us)
    (uint32_t)0x04B00243,
    // override_synth_disable_bias_div5.xml
    // Synth: Set divider bias to disabled
    HW32_ARRAY_OVERRIDE(0x405C,1),
    // Synth: Set divider bias to disabled (specific for loDivider=5)
    (uint32_t)0x18000200,
    // override_phy_tc189.xml
    // Rx: Set RSSI offset to adjust reported RSSI by +5 dB (default: 0), trimmed for external bias and differential configuration
    (uint32_t)0x00FB88A3,
    // Rx: Set anti-aliasing filter bandwidth to 0xD (in ADI0, set IFAMPCTL3[7:4]=0xD)
    ADI_HALFREG_OVERRIDE(0,61,0xF,0xD),
    // Tx: Configure PA ramping setting (0xC1) for approximately 210 us PA ramp time. Rx: Set AGC reference level to 0x18.
    HW_REG_OVERRIDE(0x6088,0xC118),
    // Tx: Configure PA ramping setting (0xC1) for approximately 210 us PA ramp time
    HW_REG_OVERRIDE(0x608C,0xC113),
    // Rx: Set LNA bias current trim offset to 3
    (uint32_t)0x00038883,
    // Rx: Freeze RSSI on sync found event
    HW_REG_OVERRIDE(0x6084,0x35F1),
    // No SW pream configuration from RadioDivSetup command
    (uint32_t)0x000C8103,
    // 32b SW word, repeat 8 symbol preamble 8 times
    HW_REG_OVERRIDE(0x5050,0x1F77),
    // Tx: Set Preamble pattern
    HW_REG_OVERRIDE(0x5058,0x00CC),
    // Part of Sync Word (sync0)
    HW_REG_OVERRIDE(0x510C,0xF0CF),
    // Part of Sync Word (sync1)
    HW_REG_OVERRIDE(0x5110,0xC0C3),
    // Part of Sync Word (sync2)
    HW_REG_OVERRIDE(0x5114,0xF0CF),
    // Part of Sync Word (sync3)
    HW_REG_OVERRIDE(0x5118,0xC0C3),
    // Repetition factor
    HW_REG_OVERRIDE(0x5178,0x0002),
    // Increase sync threshold
    HW_REG_OVERRIDE(0x5104,0x3030),
    // TX power override
    // Tx: Set PA trim to max (in ADI0, set PACTL0=0xF8)
    ADI_REG_OVERRIDE(0,12,0xF8),
    (uint32_t)0xFFFFFFFF
};


// CMD_PROP_RADIO_DIV_SETUP
// Proprietary Mode Radio Setup Command for All Frequency Bands
rfc_CMD_PROP_RADIO_DIV_SETUP_t RF_cmdPropRadioDivSetup =
{
    .commandNo = 0x3807,
    .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,
    .modulation.deviation = 0x15,
    .symbolRate.preScale = 0xF,
    .symbolRate.rateWord = 0xC4A,
    .symbolRate.decimMode = 0x0,
    .rxBw = 0x21,
    .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,
    .txPower = 0xA73F,
    .pRegOverride = pOverrides,
    .centerFreq = 0x0364,
    .intFreq = 0x8000,
    .loDivider = 0x05
};

// 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 = 0x0364,
    .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, // 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 = 0x1E,
    .syncWord = 0x00000000,
    .pPkt = 0 // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
};


// CMD_PROP_RX
// Proprietary Mode Receive Command
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 = 0x00000000,
    .maxPktLen = 0xFF,
    .address0 = 0xAA,
    .address1 = 0xBB,
    .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
};


code stuck at 

   /* Send packet */
        RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);

  • It looks like the commands defined in the code is PropTx but when you try to send a packet you use cmdPropTxAdv. Please try to use the same command both places. I would also do this only with code and not use SmartRF Studio.
  • /*
     * Copyright (c) 2016-2017, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    /***** Includes *****/
    #include <stdlib.h>
    #include <unistd.h>
    /* XDCtools Header files */
    #include <xdc/std.h>
    #include <xdc/runtime/Assert.h>
    
    /* BIOS Header files */
    #include <ti/sysbios/BIOS.h>
    #include <ti/sysbios/knl/Semaphore.h>
    #include <ti/sysbios/knl/Task.h>
    
    /* TI-RTOS Header files */
    #include <ti/drivers/rf/RF.h>
    #include <ti/drivers/PIN.h>
    #include <ti/display/Display.h>
    
    #include <ti/devices/DeviceFamily.h>
    #include DeviceFamily_constructPath(driverlib/cpu.h)
    
    /* Board Header files */
    #include "Board.h"
    
    /* RF settings */
    #include "smartrf_settings/smartrf_settings.h"
    
    /***** Defines *****/
    /* Wake-on-Radio configuration */
    #define WOR_WAKEUPS_PER_SECOND 2
    
    /* TX number of random payload bytes */
    #define PAYLOAD_LENGTH 30
    
    /* WOR Example configuration defines */
    #define WOR_PREAMBLE_TIME_RAT_TICKS(x) \
        ((uint32_t)(4000000*(1.0f/(x))))
    
    /* TX task stack size and priority */
    #define TX_TASK_STACK_SIZE 1024
    #define TX_TASK_PRIORITY   2
    
    
    /***** Prototypes *****/
    static void txTaskFunction(UArg arg0, UArg arg1);
    static void initializeTxAdvCmdFromTxCmd(rfc_CMD_PROP_TX_ADV_t* RF_cmdPropTxAdv, rfc_CMD_PROP_TX_t* RF_cmdPropTx);
    
    
    /***** Variable declarations *****/
    /* TX task objects and task stack */
    static Task_Params txTaskParams;
    Task_Struct txTask;    /* not static so you can see in ROV */
    static uint8_t txTaskStack[TX_TASK_STACK_SIZE];
    
    /* TX packet payload (length +1 to fit length byte) and sequence number */
    static uint8_t packet[PAYLOAD_LENGTH +1];
    static uint16_t seqNumber;
    
    /* RF driver objects and handles */
    static RF_Object rfObject;
    static RF_Handle rfHandle;
    
    /* Pin driver objects and handles */
    static PIN_Handle ledPinHandle;
    static PIN_Handle buttonPinHandle;
    static PIN_State ledPinState;
    static PIN_State buttonPinState;
    
    /* TX Semaphore */
    static Semaphore_Struct txSemaphore;
    static Semaphore_Handle txSemaphoreHandle;
    
    /* Advanced TX command for sending long preamble */
    static rfc_CMD_PROP_TX_ADV_t RF_cmdPropTxAdv;
    
    /*
     * Application LED pin configuration table:
     *   - All LEDs board LEDs are off.
     */
    PIN_Config pinTable[] =
    {
        Board_PIN_LED0 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
        Board_PIN_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,   
    	PIN_TERMINATE
    };
    
    /*
     * Application button pin configuration table:
     *   - Buttons interrupts are configured to trigger on falling edge.
     */
    PIN_Config buttonPinTable[] = {
        Board_PIN_BUTTON0 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_NEGEDGE,
        PIN_TERMINATE
    };
    
    
    /***** Function definitions *****/
    /* Pin interrupt Callback function board buttons configured in the pinTable. */
    void buttonCallbackFunction(PIN_Handle handle, PIN_Id pinId) {
    
        /* Simple debounce logic, only toggle if the button is still pushed (low) */
        CPUdelay((uint32_t)((48000000/3)*0.050f));
        if (!PIN_getInputValue(pinId)) {
            /* Post TX semaphore to TX task */
            Semaphore_post(txSemaphoreHandle);
        }
    }
    
    /* TX task initialization function. Runs once from main() */
    void txTaskInit()
    {
        /* Initialize TX semaphore */
        Semaphore_construct(&txSemaphore, 0, NULL);
        txSemaphoreHandle = Semaphore_handle(&txSemaphore);
    
        /* Initialize and create TX task */
        Task_Params_init(&txTaskParams);
        txTaskParams.stackSize = TX_TASK_STACK_SIZE;
        txTaskParams.priority = TX_TASK_PRIORITY;
        txTaskParams.stack = &txTaskStack;
        Task_construct(&txTask, txTaskFunction, &txTaskParams, NULL);
    }
    
    /* TX task function. Executed in Task context by TI-RTOS when the scheduler starts. */
    static void txTaskFunction(UArg arg0, UArg arg1)
    {
    //    /* Initialize the display and try to open both UART and LCD types of display. */
    //    Display_Params params;
    //    Display_Params_init(&params);
    //    params.lineClearMode = DISPLAY_CLEAR_BOTH;
    //    Display_Handle uartDisplayHandle = Display_open(Display_Type_UART, &params);
    //    Display_Handle lcdDisplayHandle = Display_open(Display_Type_LCD, &params);
    //
    //    /* Print initial display content on both UART and any LCD present */
    //    Display_printf(uartDisplayHandle, 0, 0, "Wake-on-Radio TX");
    //    Display_printf(uartDisplayHandle, 0, 0, "Pkts sent: %u", seqNumber);
    //    Display_printf(lcdDisplayHandle, 0, 0, "Wake-on-Radio TX");
    //    Display_printf(lcdDisplayHandle, 1, 0, "Pkts sent: %u", seqNumber);
    //
    //    /* Setup callback for button pins */
    //    PIN_Status status = PIN_registerIntCb(buttonPinHandle, &buttonCallbackFunction);
    //    Assert_isTrue((status == PIN_SUCCESS), NULL);
    
        /* Initialize the radio */
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        /* Initialize TX_ADV command from TX command */
        initializeTxAdvCmdFromTxCmd(&RF_cmdPropTxAdv, &RF_cmdPropTx);
    
        /* Set application specific fields */
        RF_cmdPropTxAdv.pktLen = PAYLOAD_LENGTH +1; /* +1 for length byte */
        RF_cmdPropTxAdv.pPkt = packet;
        RF_cmdPropTxAdv.preTrigger.triggerType = TRIG_REL_START;
        RF_cmdPropTxAdv.preTime = WOR_PREAMBLE_TIME_RAT_TICKS(WOR_WAKEUPS_PER_SECOND);
    
        /* Request access to the radio */
        rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    
        /* Set the frequency */
        RF_runCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
        /* Enter main TX loop */
        while(1)
        {
    //        /* Wait for a button press */
    //        Semaphore_pend(txSemaphoreHandle, BIOS_WAIT_FOREVER);
            sleep(1);
    
            /* Create packet with incrementing sequence number and random payload */
            packet[0] = PAYLOAD_LENGTH;
            packet[1] = (uint8_t)(seqNumber >> 8);
            packet[2] = (uint8_t)(seqNumber++);
            uint8_t i;
            for (i = 3; i < PAYLOAD_LENGTH +1; i++)
            {
                packet[i] = rand();
            }
    
            /* Send packet */
            RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);
    //
    //        /* Update display */
    //        Display_printf(uartDisplayHandle, 0, 0, "Pkts sent: %u", seqNumber);
    //        Display_printf(lcdDisplayHandle, 1, 0, "Pkts sent: %u", seqNumber);
    
            /* Toggle LED */
            PIN_setOutputValue(ledPinHandle, Board_PIN_LED1, !PIN_getOutputValue(Board_PIN_LED1));
        }
    }
    
    /* Copy the basic RX configuration from CMD_PROP_RX to CMD_PROP_RX_SNIFF command. */
    static void initializeTxAdvCmdFromTxCmd(rfc_CMD_PROP_TX_ADV_t* RF_cmdPropTxAdv, rfc_CMD_PROP_TX_t* RF_cmdPropTx)
    {
        #define RADIO_OP_HEADER_SIZE 14
    
        /* Copy general radio operation header from TX commmand to TX_ADV */
        memcpy(RF_cmdPropTxAdv, RF_cmdPropTx, RADIO_OP_HEADER_SIZE);
    
        /* Set command to CMD_PROP_TX_ADV */
        RF_cmdPropTxAdv->commandNo = CMD_PROP_TX_ADV;
    
        /* Copy over relevant parameters */
        RF_cmdPropTxAdv->pktConf.bFsOff = RF_cmdPropTx->pktConf.bFsOff;
        RF_cmdPropTxAdv->pktConf.bUseCrc = RF_cmdPropTx->pktConf.bUseCrc;
        RF_cmdPropTxAdv->syncWord = RF_cmdPropTx->syncWord;
    }
    
    
    /*
     *  ======== main ========
     */
    int main(void)
    {
        /* Call driver init functions. */
        Board_initGeneral();
       // Display_init();
    
    //    /* Open LED pins */
    //    ledPinHandle = PIN_open(&ledPinState, pinTable);
    //    Assert_isTrue(ledPinHandle != NULL, NULL);
    
    //    /* Open Button pins */
    //    buttonPinHandle = PIN_open(&buttonPinState, buttonPinTable);
    //    Assert_isTrue(buttonPinHandle != NULL, NULL);
    
        /* Initialize task */
        txTaskInit();
    
        /* Start BIOS */
        BIOS_start();
    
        return (0);
    }
    

    No I used Example code in that 

      /* Initialize TX_ADV command from TX command */
        initializeTxAdvCmdFromTxCmd(&RF_cmdPropTxAdv, &RF_cmdPropTx);

    I just updated smartrf_settings.c with 2.4 kbps RF setting from Smart RF studio. In example it was for 50kbps.


  • I would also do this only with code and not use SmartRF Studio.
    - I tried with code but it stuck inside

    /* Send packet */

           RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);

    So Smart RF studio does not concern. First at least this function return. it stuck there.

    if I use default 50kbps as shown bellow everything works fine.

    Smart RF studio 2.12, CCS 9.0, SDK  3.10

    //*********************************************************************************
    // Generated by SmartRF Studio version 2.11.0 (build #122)
    // Tested for SimpleLink SDK version: CC13x0 SDK 2.30.xx.xx
    // Device: CC1310 Rev. 2.1
    //
    //*********************************************************************************
    
    
    //*********************************************************************************
    // Parameter summary
    // Address: 0 
    // Address0: 0xAA 
    // Address1: 0xBB 
    // Frequency: 868.00000 MHz
    // Data Format: Serial mode disable 
    // Deviation: 25.000 kHz
    // pktLen: 30 
    // 802.15.4g Mode: 0 
    // Select bit order to transmit PSDU octets:: 1 
    // Packet Length Config: Variable 
    // Max Packet Length: 255 
    // Packet Length: 30 
    // Packet Data: 255 
    // RX Filter BW: 98 kHz
    // Symbol Rate: 50.00000 kBaud
    // Sync Word Length: 32 Bits 
    // TX Power: 14 dBm (requires define CCFG_FORCE_VDDR_HH = 1 in ccfg.c, see CC13xx/CC26xx Technical Reference Manual)
    // Whitening: No whitening 
    
    
    #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_prop_cmd.h)
    #include <ti/drivers/rf/RF.h>
    #include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_genfsk.h)
    #include DeviceFamily_constructPath(rf_patches/rf_patch_rfe_genfsk.h)
    #include "smartrf_settings.h"
    
    
    // TI-RTOS RF Mode Object
    RF_Mode RF_prop =
    {
        .rfMode = RF_MODE_PROPRIETARY_SUB_1,
        .cpePatchFxn = &rf_patch_cpe_genfsk,
        .mcePatchFxn = 0,
        .rfePatchFxn = &rf_patch_rfe_genfsk,
    };
    
    // Overrides for CMD_PROP_RADIO_DIV_SETUP
    uint32_t pOverrides[] =
    {
        // override_use_patch_prop_genfsk.xml
        // PHY: Use MCE ROM bank 4, RFE RAM patch
        MCE_RFE_OVERRIDE(0,4,0,1,0,0),
        // override_synth_prop_863_930_div5.xml
        // Synth: Set recommended RTRIM to 7
        HW_REG_OVERRIDE(0x4038,0x0037),
        // Synth: Set Fref to 4 MHz
        (uint32_t)0x000684A3,
        // Synth: Configure fine calibration setting
        HW_REG_OVERRIDE(0x4020,0x7F00),
        // Synth: Configure fine calibration setting
        HW_REG_OVERRIDE(0x4064,0x0040),
        // Synth: Configure fine calibration setting
        (uint32_t)0xB1070503,
        // Synth: Configure fine calibration setting
        (uint32_t)0x05330523,
        // Synth: Set loop bandwidth after lock to 20 kHz
        (uint32_t)0x0A480583,
        // Synth: Set loop bandwidth after lock to 20 kHz
        (uint32_t)0x7AB80603,
        // Synth: Configure VCO LDO (in ADI1, set VCOLDOCFG=0x9F to use voltage input reference)
        ADI_REG_OVERRIDE(1,4,0x9F),
        // Synth: Configure synth LDO (in ADI1, set SLDOCTL0.COMP_CAP=1)
        ADI_HALFREG_OVERRIDE(1,7,0x4,0x4),
        // Synth: Use 24 MHz XOSC as synth clock, enable extra PLL filtering
        (uint32_t)0x02010403,
        // Synth: Configure extra PLL filtering
        (uint32_t)0x00108463,
        // Synth: Increase synth programming timeout (0x04B0 RAT ticks = 300 us)
        (uint32_t)0x04B00243,
        // override_phy_rx_aaf_bw_0xd.xml
        // Rx: Set anti-aliasing filter bandwidth to 0xD (in ADI0, set IFAMPCTL3[7:4]=0xD)
        ADI_HALFREG_OVERRIDE(0,61,0xF,0xD),
        // override_phy_gfsk_rx.xml
        // Rx: Set LNA bias current trim offset to 3
        (uint32_t)0x00038883,
        // Rx: Freeze RSSI on sync found event
        HW_REG_OVERRIDE(0x6084,0x35F1),
        // override_phy_gfsk_pa_ramp_agc_reflevel_0x1a.xml
        // Tx: Configure PA ramping setting (0x41). Rx: Set AGC reference level to 0x1A.
        HW_REG_OVERRIDE(0x6088,0x411A),
        // Tx: Configure PA ramping setting
        HW_REG_OVERRIDE(0x608C,0x8213),
        // override_phy_rx_rssi_offset_5db.xml
        // Rx: Set RSSI offset to adjust reported RSSI by +5 dB (default: 0), trimmed for external bias and differential configuration
        (uint32_t)0x00FB88A3,
    #if (CCFG_FORCE_VDDR_HH)
        // TX power override
        // Tx: Set PA trim to max (in ADI0, set PACTL0=0xF8)
        ADI_REG_OVERRIDE(0,12,0xF8),
    #endif
        (uint32_t)0xFFFFFFFF,
    };
    
    
    // CMD_PROP_RADIO_DIV_SETUP
    rfc_CMD_PROP_RADIO_DIV_SETUP_t RF_cmdPropRadioDivSetup =
    {
        .commandNo = 0x3807,
        .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,
        .modulation.deviation = 0x64,
        .symbolRate.preScale = 0xF,
        .symbolRate.rateWord = 0x8000,
        .symbolRate.decimMode = 0x0,
        .rxBw = 0x24,
        .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,
        .txPower = 0xA73F,
        .pRegOverride = pOverrides,
        .centerFreq = 0x0364,
        .intFreq = 0x8000,
        .loDivider = 0x05,
    };
    
    // 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 = 0x0364,
        .fractFreq = 0x0000,
        .synthConf.bTxMode = 0x0,
        .synthConf.refFreq = 0x0,
        .__dummy0 = 0x00,
        .__dummy1 = 0x00,
        .__dummy2 = 0x00,
        .__dummy3 = 0x0000,
    };
    
    // 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 = 0x1E, // SET APPLICATION PAYLOAD LENGTH
        .syncWord = 0x930B51DE,
        .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 = 0x930B51DE,
        .maxPktLen = 0xFF, // MAKE SURE DATA ENTRY IS LARGE ENOUGH
        .address0 = 0xAA,
        .address1 = 0xBB,
        .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
    };
    
    // CMD_TX_TEST
    rfc_CMD_TX_TEST_t RF_cmdTxTest =
    {
        .commandNo = 0x0808,
        .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,
        .config.bUseCw = 0x0,
        .config.bFsOff = 0x1,
        .config.whitenMode = 0x2,
        .__dummy0 = 0x00,
        .txWord = 0xABCD,
        .__dummy1 = 0x00,
        .endTrigger.triggerType = 0x1,
        .endTrigger.bEnaCmd = 0x0,
        .endTrigger.triggerNo = 0x0,
        .endTrigger.pastTrig = 0x0,
        .syncWord = 0x930B51DE,
        .endTime = 0x00000000,
    };
    

  • Please reread my answer: It looks like the commands defined in the code is PropTx but when you try to send a packet you use cmdPropTxAdv. Please try to use the same command both places.

    See e2e.ti.com/.../764204
  • I still do not understand.

    SDK WOR TX Example flow is in this way. PropTx is defined first in smartrf_settings.c then in rfWakeOnRadioTx.c   PropTx  copied to RF_cmdPropTxAdv. so RF_cmdPropTxAdv has all the default defined in PropTx. 

    /* Initialize the radio */
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        /* Initialize TX_ADV command from TX command */
        initializeTxAdvCmdFromTxCmd(&RF_cmdPropTxAdv, &RF_cmdPropTx);
    
        /* Set application specific fields */
        RF_cmdPropTxAdv.pktLen = PAYLOAD_LENGTH +1; /* +1 for length byte */
        RF_cmdPropTxAdv.pPkt = packet;
        RF_cmdPropTxAdv.preTrigger.triggerType = TRIG_REL_START;
        RF_cmdPropTxAdv.preTime = WOR_PREAMBLE_TIME_RAT_TICKS(WOR_WAKEUPS_PER_SECOND);
    

    static void initializeTxAdvCmdFromTxCmd(rfc_CMD_PROP_TX_ADV_t* RF_cmdPropTxAdv, rfc_CMD_PROP_TX_t* RF_cmdPropTx)
    {
        #define RADIO_OP_HEADER_SIZE 14
    
        /* Copy general radio operation header from TX commmand to TX_ADV */
        memcpy(RF_cmdPropTxAdv, RF_cmdPropTx, RADIO_OP_HEADER_SIZE);
    
        /* Set command to CMD_PROP_TX_ADV */
        RF_cmdPropTxAdv->commandNo = CMD_PROP_TX_ADV;
    
        /* Copy over relevant parameters */
        RF_cmdPropTxAdv->pktConf.bFsOff = RF_cmdPropTx->pktConf.bFsOff;
        RF_cmdPropTxAdv->pktConf.bUseCrc = RF_cmdPropTx->pktConf.bUseCrc;
        RF_cmdPropTxAdv->syncWord = RF_cmdPropTx->syncWord;
    }
    

    So If still do you think I am making mistake(most probably I am as It should work and it is not working) let me know. But I did not changed anything in example code I just updated new generated smart rf setting file.

  • My bad, overlooked the copy part and looked to generic on the issue.

    I assume that you have tested the 2.4 kbps settings using the packetRX/ TX example to verify that they work with the "normal" commands before you starting on the adv commands?

    According to www.ti.com/.../swra566.pdf some of the overrides is for the preamble and sync. I have to check if using the adv commands impact this in some way.

    Have you been able to see why the code hangs? I would assume that the command should be able to something if not returning an error.
  • In side,
    /* Send packet */
    RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);

    There is RF_postCmd() after that call to RF_pendCmd() >> inside RF_pendCmd() code stuck at

    /* Wait for semaphore */
    SemaphoreP_pend(&h->state.semSync, SemaphoreP_WAIT_FOREVER);
  • Is there any update?

  • In the smartrf_settings.c file, search for this section and comment out as shown:

    // No SW pream configuration from RadioDivSetup command
    //(uint32_t)0x000C8103,
    // 32b SW word, repeat 8 symbol preamble 8 times
    //HW_REG_OVERRIDE(0x5050,0x1F77),
    // Tx: Set Preamble pattern
    //HW_REG_OVERRIDE(0x5058,0x00CC),

    Add these overrides below what you marked out: 

    (uint32_t)0x00c08103,
    (uint32_t)0x00f58033,
    (uint32_t)0x00388043,

  • After changing 

    //    // No SW pream configuration from RadioDivSetup command
    //    (uint32_t)0x000C8103,
    //    // 32b SW word, repeat 8 symbol preamble 8 times
    //    HW_REG_OVERRIDE(0x5050,0x1F77),
    //    // Tx: Set Preamble pattern
    //    HW_REG_OVERRIDE(0x5058,0x00CC),
        (uint32_t)0x00c08103,
        (uint32_t)0x00f58033,
        (uint32_t)0x00388043,

    @2.5kbps data is transmitting but there is CRC error showing in smart RF studio but in case of 50kbps everything is working fine.

    See Attached image for both test case.

    /* TX task function. Executed in Task context by TI-RTOS when the scheduler starts. */
    static void txTaskFunction(UArg arg0, UArg arg1)
    {
        /* Initialize the radio */
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        /* Initialize TX_ADV command from TX command */
        initializeTxAdvCmdFromTxCmd(&RF_cmdPropTxAdv, &RF_cmdPropTx);
    
        /* Set application specific fields */
        RF_cmdPropTxAdv.pktLen = PAYLOAD_LENGTH +1; /* +1 for length byte */
        RF_cmdPropTxAdv.pPkt = packet;
        RF_cmdPropTxAdv.preTrigger.triggerType = TRIG_REL_START;
        RF_cmdPropTxAdv.preTime = WOR_PREAMBLE_TIME_RAT_TICKS(WOR_WAKEUPS_PER_SECOND);
    
        /* Request access to the radio */
        rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    
        /* Set the frequency */
        RF_runCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
        /* Enter main TX loop */
        while(1)
        {
            sleep(1);
    
            /* Create packet with incrementing sequence number and random payload */
            packet[0] = PAYLOAD_LENGTH;
            packet[1] = 0xCC;
            packet[2] = 0xBB;
            uint8_t i;
            for (i = 3; i < PAYLOAD_LENGTH +1; i++)
            {
                packet[i] = 0x55;
            }
    
            /* Send packet */
            RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);
    
            /* Toggle LED */
            PIN_setOutputValue(ledPinHandle, Board_PIN_LED1, !PIN_getOutputValue(Board_PIN_LED1));
        }
    }
    

  • I have started to look into it. Not sure which override that causes this.

  • Thanks for looking into it. I have also tried WOR Rx and WOR Tx TiRTOS example when both side 50 kbps default setting is set both example in two launchpad kit works fine when I changed 2.4kbps setting with your suggestion it is not communicating. 

  • Did you find anything?

  • I have been working 100 % on some SDK doc lately so I picked this up earlier today but haven't had enough time to figure out which override I have to change. But I'm working on it.  

  • Hi
    I also ran into this problem. This example does not work with settings from SmartRF Studio for 625bps and 2.5kbs. Although the 5kbs works well.

    I am confused by one moment. If you run the default example (50kbps) in the rfWakeOnRadioRx_CC1310_LAUNCHXL_tirtos_ccs project, then in the variable "datarate" is set to "50000", and if you load the project for 2.5kbs, then the same variable contains the value 10000.

  • Artem: For the datarate question (10 k vs 2.5 k), see http://www.ti.com/lit/an/swra566/swra566.pdf

  • Hi, Artem

    As per my understanding you tried with Long Range mode RF settings. I am not using long range mode RF settings. 

  • I'm not used to decipher what the overrides mean so it took some time to understand what was going on. It looks like the overrides you got sends LSB first over the air. If I used 

    (uint32_t)0x00c48103, //no modification of SW registers, please check the other fields as well
    (uint32_t)0x00f78033, //Set one byte preamble
    (uint32_t)0x00CC8043, //Set preamble pattern to 11001100

    I manage to receive correctly with a CC1101. 

    The highlighted number is the bit that set MSB or LSB first. 

  • With your suggested changes in firmware Tx: rfWakeOnRadioTx_CC1310_LAUNCHXL_nortos_ccs example loaded in CC1310 Launchpad,

    (uint32_t)0x00c48103, //no modification of SW registers, please check the other fields as well
    (uint32_t)0x00f78033, //Set one byte preamble
    (uint32_t)0x00CC8043, //Set preamble pattern to 11001100

    When Device Tx data I was able to receive in Smart RF studio 

    (Rx CC1310 Launchpad connected to smart RF studio).

    But when I tried to receive in Rx: rfWakeOnRadioRx_CC1310_LAUNCHXL_nortos_ccs example loaded in CC1310 Launchpad, it does not get received.


    I have used default WOR Rx and Tx example provided in SDK 3.10 and not modified code at all  just SRWRG_GFSK_2.4kbps_10dbm_915MHz_5.2KHzDev.c , SRWRG_GFSK_50kbps_10dbm_915MHz.c included in project.

    rfWakeOnRadioRx_CC1310_LAUNCHXL_nortos_ccs.rar

    rfWakeOnRadioTx_CC1310_LAUNCHXL_nortos_ccs.rar

    Test scenario 1: 868MHz 50kbps

    using default example with smartrf_settings.c(868MHz 50kbps)  and excluding  SRWRG_GFSK_2.4kbps_10dbm_915MHz_5.2KHzDev.c , SRWRG_GFSK_50kbps_10dbm_915MHz.c  from project :Working OK.

    Test scenario 2915MHz 50kbps

    using default example with SRWRG_GFSK_50kbps_10dbm_915MHz.c and  excluding smartrf_settings.c(868MHz 50kbps)  , SRWRG_GFSK_2.4kbps_10dbm_915MHz_5.2KHzDev.c from project :Working OK.

    Test scenario 3915MHz 2.4kbps

    using default example with SRWRG_GFSK_2.4kbps_10dbm_915MHz_5.2KHzDev.c and  excluding smartrf_settings.c(868MHz 50kbps)  , SRWRG_GFSK_50kbps_10dbm_915MHz.c from project :Working Not Ok. Data not received on Rx Side.

     Kindly find attached project for Rx and Tx.

    rfWakeOnRadioRx_CC1310_LAUNCHXL_nortos_ccs.rar

    rfWakeOnRadioTx_CC1310_LAUNCHXL_nortos_ccs.rar

     

     

  • Have you looked into the timing? I believe you should be able to use the Smartrf_settings directly from SmartRF studio on the RX side without modifications but as you see from the code the timing is set according to the datarate (See the WOR_RF_PHY_DATARATE define). The example is only written for much faster datarates hence you have to adjust the timing for 2.4 kbps.