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: ConcentratorOadServer not working in Long range mode

Part Number: CC1310

Hello Sir, 

              We are trying to establish long range communication between two CC1310 devices and we used rfWsnConcentratorOadServer and rfWsnNodeExtFlashOadClient examples as we needed OAD for our purpose.The setup was running successfully with EasyLink_Phy_Custom settings.As we needed long range I have changed the setting to EasyLink_Phy_5kbpsSlLr and changed the smartrf settings also.I have combined the smartrf settings for Continous Tx,Continous Rx,Packet Tx. When I made this setup to run for a long time,after some time,the concentrator was not able to receive any data from the Node. I don't know what mistake I am doing with respect to smart rf settings,so If any help is guided from your side,it will be better. I have also attached the smartrf_settings.c and smartrf_settings.h files along with this for your reference.7446.smartrf_settings.h

2251.smartrf_settings.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 (Rev. B)
// 
//*********************************************************************************


//*********************************************************************************
// Parameter summary
// Address: off 
// Address0: 0xAA 
// Address1: 0xBB 
// Frequency: 868.00000 MHz
// Data Format: Serial mode disable 
// Deviation: 5.000 kHz
// Packet Length Config: Variable 
// Max Packet Length: 128 
// Packet Length: 20 
// RX Filter BW: 49 kHz
// Symbol Rate: 19.99969 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 

#define DEVICE_FAMILY cc13x0
#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"


// TI-RTOS RF Mode Object
RF_Mode RF_prop =
{
    .rfMode = RF_MODE_PROPRIETARY_SUB_1,
    .cpePatchFxn = &rf_patch_cpe_sl_longrange,
    .mcePatchFxn = &rf_patch_mce_sl_longrange,
    .rfePatchFxn = &rf_patch_rfe_sl_longrange,
};

// Overrides for CMD_PROP_RADIO_DIV_SETUP
static uint32_t pOverrides[] =
{
    // override_use_patch_simplelink_long_range.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_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_0x14.xml
    // Tx: Configure PA ramping setting (0x41). Rx: Set AGC reference level to 0x14.
    HW_REG_OVERRIDE(0x6088,0x4114),
    // Tx: Configure PA ramping setting
    HW_REG_OVERRIDE(0x608C,0x8213),
    // override_phy_long_range_dsss2.xml
    // PHY: Configure DSSS SF=2
    HW_REG_OVERRIDE(0x505C,0x0100),
    // override_phy_rx_rssi_offset_5db.xml
    // Rx: Set RSSI offset to adjust reported RSSI by +5 dB
    (uint32_t)0x00FB88A3,
    // 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 = 0x14,
    .symbolRate.preScale = 0x5,
    .symbolRate.rateWord = 0x1111,
    .rxBw = 0x21,
    .preamConf.nPreamBytes = 0x2,
    .preamConf.preamMode = 0x0,
    .formatConf.nSwBits = 0x20,
    .formatConf.bBitReversal = 0x0,
    .formatConf.bMsbFirst = 0x0,
    .formatConf.fecMode = 0x8,
    .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 = 0x14, // SET APPLICATION PAYLOAD LENGTH
    .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 = 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
};

// CMD_TX_TEST
// Transmitter Test Command
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 = 0xAAAA,
    .__dummy1 = 0x00,
    .endTrigger.triggerType = 0x1,
    .endTrigger.bEnaCmd = 0x0,
    .endTrigger.triggerNo = 0x0,
    .endTrigger.pastTrig = 0x0,
    .syncWord = 0x00000000,
    .endTime = 0x00000000,
};

// CMD_RX_TEST
// Receiver Test Command
rfc_CMD_RX_TEST_t RF_cmdRxTest =
{
    .commandNo = 0x0807,
    .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.bEnaFifo = 0x0,
    .config.bFsOff = 0x0,
    .config.bNoSync = 0x1,
    .endTrigger.triggerType = 0x1,
    .endTrigger.bEnaCmd = 0x0,
    .endTrigger.triggerNo = 0x0,
    .endTrigger.pastTrig = 0x0,
    .syncWord = 0x00000000,
    .endTime = 0x00000000,
};
   

  • The settings looks OK. It would be easier to figure out what the problem is if you could provide more feedback. What happens when the concentrator stops receiving data from the node? Is the device is RX or is it in some other state? Are you sure that the Node is still transmitting?

    Siri
  • 1.As the concentrator's radio task gets triggered from the event posted in the Rxdonecallback, the concentrator was not able to receive any data.
    2.In the concentrator task we have enabled an Non blocking UART read just for debugging purpose and it was able to receive and blink an led for our debugging purpose,so the problem is happening over receive part of concentrator radio Task.
    3.The node is still transmitting,we have checked it by giving the same concentrator short ID to other device and it was able to receive it
  • I was running the examples without modifications and I experienced that after a while the Consentrator stopped receiving. EasyLink_cmdPropRxAdv.status was then set to 0x3400, meaning that the radio was not longer in RX state. Can you check if this is the same thing that is happening at your end when you experience problems? I have reported this to the team responsible for the examples.
  • I have also seen that the EasyLink_cmdPropRxAdv.status was set to 0x3400.But doesn't it mean to PROP_DONE_OK,which means to 'Operation ended normally'(according to the macros TI has given).

  • It is true that 0x3400 means that everything ended normally, but the radio should be in active RX mode most of the time (status = 0x0002). I have reported this a an issue as I do not understand why the application does not set the radio back into RX state.

    BR
    Siri
  • Thank you for looking into it.We are looking forward for the solution ASAP.
  • Hi,
    Is there any update over the solution for this issue,we urgently need a solution to move on.
  • I am really sorry that this is taking so long. I have sent a reminder the people responsible for the examples.

    Siri
  • Hi,
    Any solution over the issue.We are stuck with our development as long range mode is not working or Is there any way to implement Long range mode using cc1310
  • First of all, sorry that this has taken so long to figure out. The problem has been to reproduce the issue often enough to be able to debug it properly.

    The problem is not related to the SLRM settings, but to the sendAck() function. In sendAck(), we allocate an EasyLink_TxPacket variable on the stack named txAck. txAck is unitialized, meaning any variables not set explicitly are undefined. In the example you are running, you want the ack to be sent right away and you should therefore set absTime to 0.

    The solution is to zero-initialize out the txAck variable before using it, e.g.

    static void sendAck(uint8_t latestSourceAddress)

    {

       EasyLink_TxPacket txAck;

       memset(&txAck, 0x0, sizeof(EasyLink_TxPacket));

       // ...

     

    When it comes to the OAD feature, OAD has only been tested with the 50 kbps PHY and because of this you settings (if using for example SLR) will be overwritten when enabling OAD (FEATURE_OAD_ONCHIP is defined). There are several timing parameters that need to be changed when doing OAD with another PHY. SLR will be supported in the next release of the SDK.

    Siri

  • Hi Siri,
    I have tried by adding memset in the SendAck but still the ConcentratoroOAD was getting stuck.
  • please set a breakpoint in the sendAck function on the line:

    if (EasyLink_transmit(&txAck) != EasyLink_Status_Success)

    and send a screenshot of the complete EasyLink_cmdPropTx struct (all fields)

    BR

    Siri
  • This is the screenshot of EasyLink_cmdPropTx with its parameters

  • In your case, the startTime of the TX command is not equal to 0.

    When doing:

    static void sendAck(uint8_t latestSourceAddress)
    {
        EasyLink_TxPacket txAck;
    
        /* Set destinationAdress, but use EasyLink layers destination address capability */
        txAck.dstAddr[0] = latestSourceAddress;
        
        memset(&txAck, 0x0, sizeof(EasyLink_TxPacket));
    

    make sure that txAck.absTime is set to 0.

    if this is not zero, you will run the following code in the EasyLink_transmit(&txAck):

    if (txPacket->absTime != 0)
    {
        EasyLink_cmdPropTx.startTrigger.triggerType = TRIG_ABSTIME;
        EasyLink_cmdPropTx.startTrigger.pastTrig = 1;
        EasyLink_cmdPropTx.startTime = txPacket->absTime;
    
    

    BR

    Siri

  • As far as I could see from the params after setting breakpoint

    EasyLink_cmdPropTx.startTime seems to be zero

    But still I have explicitly set the txAck params to zero by

    memset(&txAck, 0x0, sizeof(EasyLink_TxPacket));
    txAck.absTime = 0; 

    in the SendAck function and I ran the code overnight and did set a breakpoint inside this condition

    if (txPacket->absTime != 0)
    {
        EasyLink_cmdPropTx.startTrigger.triggerType = TRIG_ABSTIME;
        EasyLink_cmdPropTx.startTrigger.pastTrig = 1;
        EasyLink_cmdPropTx.startTime = txPacket->absTime;
    schParams_prop.endTime = EasyLink_cmdPropTx.startTime + EasyLink_ms_To_RadioTime(cmdTime);

      }

    but it never entered into this loop and by morning the concentratorOad code has got hanged as like the other case

  • Sorry, my comment regarding the tx command was wrong. I was looking at the startTime of the pNextOp. The startTime of the tx command is correctly set to 0 and triggerType is TRIG_NOW.

    Have you looked at the RX command again when it hangs and looked at the status of that command? Is status 0x0002 or 0x3400 (or something else) Are you sure that your transmitter is still transmitting?
  • When it hangs,the status of RX command was set to 0x0002 and the nodes were still transmitting by that time. 

  • There are several things you need to check.
    Start by checking that your transmitter is actually transmitting something and not just toggles the LED. There is no error handling in the code taking care of the bug described in the Errata note regarding that the synth calibration might fail (advisory 02). On the TX side you can simply make sure that the status of the TX command is not 0x3804.
    You should also check Advisory 08 and 09. If you run into the bug described in 08, the radio will start receiving again after a while. If 09 is the problem, only a reset will fix the issue.
    If you have verified that synth is not the problem and the unit does not start receiving again, you can try to add the following override to the receiver:
    HW_REG_OVERRIDE(0x5108 , 0x007F)
    Please keep me updated on your findings.

    Siri
  • case will be closed due to lack of feedback. It will be re-opened if additional info is added.

    Siri
  • Hi Siri,

               Sorry for the delay,I have been checking the conditions that you have mentioned in the last post.

                The transmitter was transmitting the data when the concentrator got hanged,it was not just blinking the led.I made sure this by connecting another concentrator with with short ID and it was able to receive the messages from those transmitters

                Regarding the advisory 08 and 09,I think advisory 08 and 09 are not applicable,as it was stated for case of continous RX,but in this case the concentrator is not continously receiving but transmitting back to the nodes by sending Ack.

                Moreover with respect to Advisory 08,if it is applicable then the Concentrator should reset by itself,which is also not happening in this case.

       Now I have added the HW_REG_OVERRIDE(0x5108 , 0x007F) to smartrf_settings.c and checking it(Does  HW_REG_OVERRIDE(0x5108 , 0x007F)  has to get added to smartrf_settings.c or some other file),meanwhile I am also trying to check whether advisory 02 is applicable or not by checking the RF_cmdFs.status.

       Can you please clarify me, whether the testings which I have been trying are right or not?

  • Hi Vishnu

    You are doing the correct steps in debugging this. Just a couple of comments.

    As long as the RX command reports active (0x0002) I do not think that there could have been problems with the synth calibration as the RX command should then report 0x3804 (PROP_ERROR_NO_FS).

    However, it might be worth checking the CMD_FS to see if it has run properly.

    When it comes to 08, this should not be a problem as long as you use the default frequency in the code example or if you are using Studio to generate new values if changing the frequency.

    For checking 09, the override should be added to the override list you are using in the smartRF_settings.c file. The overrides can be added before the 0xFFFFFFFF in the list:

        .
        .
        HW_REG_OVERRIDE(0x5108, 0x007F),
        (uint32_t)0xFFFFFFFF,
    };

    How long does it have to run before you end up in this situation? Does it happen if you run the test with any of the other PHY’s

    Please keep me updated on your findings.

    BR

    Siri

  • I will close this thread due to lack of feedback but it will be re-opened if new info is posted.