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.

RTOS/LAUNCHXL-CC1350: RTOS include path problem at IAR

Part Number: LAUNCHXL-CC1350
Other Parts Discussed in Thread: CC1350, CC1310

Tool/software: TI-RTOS

Hello , I'm trying to compile rfWsnDmConcentrator project at IAR environment my problem is with defining global argument variables for TIRTOS project.

I have to select .custom_argvars file at project global variable settings.

By the file that comes with SDK package is either empty or does not exist. My IAR version is 8.1 and my RTOS SDK package is simplelink_cc13x0_sdk_1_40_00_10.

So should I define path variables manually for this project? What all the include paths should be - need an example or existing .custom_argvals file for this project. 

  • SDK 1.30 will run with IAR version 7.80. For SDK 1.40 you need IAR 8.10 or newer. Could you confirm that your version is 8.1?
  • Yes, my version is 8.1. I need the libraries include paths for preprocessor or valid custom_argvals file, cause mine somehow is empty, so a compiler cannot see dependencies between files and cannot compile anything.
  • As I wrote in my last post you need 8.10 to use v1.4 of the SDK.
  • Sorry , my mistake, my version is 8.11. But somehow I cannot compile anything without an errors.
    I tried to use different IAR project from the same SDK - blestack->host_test, there I have valid argvars file and all include paths and dependancies are configured correctly, but still I have lot's of issues when I re-build.
  • I don't have IAR installed but I'll try to do it tomorrow and see if I see the same
  • Thanks, will wait for that. In general I wish to focus following projects for CC1350_LAUNCHXL:

    BLESTACK->HOST_TEST and simple_peripheral

    easylink->DMnode, DmConcentrator. For node and concentrator I also wish to switch to 433 Mhz (that's my actual Launchpad CW tuning) at low data rate < 2kbps.

    Will appreciate if you can explain how to perform those settings after the projects do compile.

    Mark.

  • I will look at IAR later today (at the moment I'm sitting in front of my old laptop). For low datarates, please check www.ti.com/.../swra566.pdf
  • Thanks, I looked into AN, there are a good examples there , but they refer to 868 CW, and I need 433 - that's a matching of my system, I cannot change it. So maybe I just can use the calculator for RXBW , repetition factor etc, but then how can I derive the actual registers values I should change at the code?
    Also the example mentions RF studio, but I don't use that , I have only stand alone Launchpad.
    So where I can get the data rates calculator? How can I understand the transcription of an output parameters to actual registers at the code?
  • I did a fresh install of IAR 8.11, followed dev.ti.com/.../index.html and had no issues compiling the rfWsnDmConcentrator project.

    How does your tools -> Configure Custom Argument Variables look like?

    -------

    To use the patches in the app note, select the 433 MHz settings in SmartRF Studio, do a code export and change/ add overrides as described in the app note.

    Please download SmartRF Studio here: www.ti.com/.../smartrftm-studio

    You need this to get the correct settings. You can also use this tool to calculate datarate settings. Note that you don't have to have any hardware connected, you can use the tool to generate settings and export code that you can use in you code.
  • Thanks, understood, I can get my progress now.
  • Yes, I followed the instructions and created new workspace and imported the project , my arg variables look correct now , but somehow my compiler -> preprocessor include lines are empty. So the compiler does not see any include paths , so it cannot see any dependencies between files. Is it normal , I think that's the reason I cannot compile?
  • I checked the compiler -> preprocessor settings in my working project ant that is empty in mine to.

    Do you have something under Linker -> Extra options and compiler -> extra options?
  • Thanks, I recently solved the compilation problems - just improper file linkage paths. Now all projects do compile. I'm trying to set up the RFeasylink TX/RX.

    I'm seeing TX party is transmitting packets - verifying by red and green (DIO6,7 leds blinking periodically), but RX party receives nothing- verified by leds (only green is blinking) and UART - nothing is printed out.

    See attached my smartrf_settings imported from the studio, and my full rx packets project.

    Can you check why it does not working, I need also printout from the application UART port (currently I cannot see nothing)?

    BR,

    Mark.

     iar.7z

  • Which board are you running this on? Note that the board has to support 433 MHz to give good performance.
  • Launchpad-433, so it does have good support for it. But even if it wouldn't it have to receive something I think.

    Another strange thing I noticed - I have an easylinkTX project which actually works at 433.9Mhz - I checked with spectrum analyzer I see -28 dbm signal ~ 5 meters away from transmitter , but then I wanted  to return to 868 Mhz (although knowing the board is not calibrated for that), so I downloaded a default project from SDK , but the TX stayed at 433.9Mhz with a perfect signal strength. How can it be? I'm enclosing the original TX project - should be 868Mhz, and also RFstudio 433.9 import files. Can you check how it should work for TX-RX link at 868/433 at IAR?

    Thanks.

    smartrf_settings_433.c
    //*********************************************************************************
    // Generated by SmartRF Studio version 2.6.1 (build #20)
    // Tested for SimpleLink SDK version: CC13x0 SDK 1.30.xx.xx
    // Device: CC1350 Rev. 2.1
    // 
    //*********************************************************************************
    
    
    //*********************************************************************************
    // Parameter summary
    // Address: off 
    // Address0: 0xAA 
    // Address1: 0xBB 
    // Frequency: 433.92000 MHz
    // Data Format: Serial mode disable 
    // Deviation: 25.000 kHz
    // Packet Length Config: Variable 
    // Max Packet Length: 128 
    // Packet Length: 20 
    // RX Filter BW: 98 kHz
    // Symbol Rate: 50.00000 kBaud
    // Sync Word Length: 32 Bits 
    // TX Power: 15 dBm (requires define CCFG_FORCE_VDDR_HH = 1 in ccfg.c, see CC13xx/CC26xx Technical Reference Manual)
    // Whitening: No whitening 
    
    
    #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_prop_cmd.h)
    #include <ti/drivers/rf/RF.h>
    #include DEVICE_FAMILY_PATH(rf_patches/rf_patch_cpe_genfsk.h)
    #include DEVICE_FAMILY_PATH(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
    static 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_430_510_div10.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_synth_disable_bias_div10.xml
        // Synth: Set divider bias to disabled
        HW32_ARRAY_OVERRIDE(0x405C,1),
        // Synth: Set divider bias to disabled (specific for loDivider=10)
        (uint32_t)0x18000280,
        // 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_neg2db.xml
        // Rx: Set RSSI offset to adjust reported RSSI by -2 dB
        (uint32_t)0x000288A3,
        // 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 = 0x64,
        .symbolRate.preScale = 0xF,
        .symbolRate.rateWord = 0x8000,
        .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 = 0x003F,
        .pRegOverride = pOverrides,
        .centerFreq = 0x01B2,
        .intFreq = 0x8000,
        .loDivider = 0x0A,
    };
    
    // 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 = 0x01B1,
        .fractFreq = 0xEB85,
        .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 = 0x14, // SET APPLICATION PAYLOAD LENGTH
        .syncWord = 0x930B51DE,
        .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 = 0x930B51DE,
        .maxPktLen = 0x80, // 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
    };
    
    smartrf_settings_433.hiar_tx.7z

  • I tested the project as is and I have no problems receiving packets using SmartRF Studio when this code is sending.

    But the 433 MHz files use the "old" way to define DEVICE_FAMILY (redefined from 1.3 to 1.4 of the SDK) which generate errors when compiling?

    I use the CC1310 LP since it's what I have available at the moment. 

  • Thanks for checking. For DEVICE_FAMILY definitions, those give compilation errors:

    #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_prop_cmd.h)
    #include <ti/drivers/rf/RF.h>
    #include DEVICE_FAMILY_PATH(rf_patches/rf_patch_cpe_sl_longrange.h)
    #include DEVICE_FAMILY_PATH(rf_patches/rf_patch_rfe_sl_longrange.h)
    #include DEVICE_FAMILY_PATH(rf_patches/rf_patch_mce_sl_longrange.h)
    #include "smartrf_settings.h"

    And those do not:

    #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_sl_longrange.h)
    #include DeviceFamily_constructPath(rf_patches/rf_patch_rfe_sl_longrange.h)
    #include DeviceFamily_constructPath(rf_patches/rf_patch_mce_sl_longrange.h)
    #include "smartrf_settings.h"

    I don't know which ones are new or old , but I use the same way both for TX and RX projects. As mentioned TX project does send packets and I have control over RF parameters.

    Something else I should check and maybe easiest way to debug the problem with an RX problem, currently it seem just to configure everything correctly and then going idle.

  • In the SDK we have added a construct to select the correct driver files dependent on which chip you are using. This construct has changed from SDK v1.3 to v1.4. Unfortunately, SmartRF Studio still uses the v1.3 format and the files exported have to be modified.

    The following should be used (v1.4 format):

    #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"