• Resolved

CCS/CC1310: Some questions about LBT

Intellectual 410 points

Replies: 10

Views: 119

Part Number: CC1310

Tool/software: Code Composer Studio

hi,I have encountered some problems when I use LBT routines.

1.The configuration of this smartrf_settings, using the LRM mode, is exported via SmartRF studio.I replaced the smartrf_settings file and ran the example normally.

2.When I add some delays to this normal example, such as the delay caused by sleep or timer, after the routine runs for a while, the data is no longer sent.

Please help confirm the problem.Time is very urgent.Thanks!

This is my code:

void *mainThread(void *arg0)
{
RF_Params rfParams;
RF_Params_init(&rfParams);

/* Open LED pins */
ledPinHandle = PIN_open(&ledPinState, ledPinTable);
if (ledPinHandle == NULL)
{
while(1);
}

/* Customize the CMD_PROP_TX command for this application */
RF_cmdPropTx.pktLen = PAYLOAD_LENGTH;
RF_cmdPropTx.pPkt = packet;

/* Set up the next pointers for the command chain */
RF_cmdNop.pNextOp = (rfc_radioOp_t*)&RF_cmdPropCs;
RF_cmdPropCs.pNextOp = (rfc_radioOp_t*)&RF_cmdCountBranch;
RF_cmdCountBranch.pNextOp = (rfc_radioOp_t*)&RF_cmdPropTx;
RF_cmdCountBranch.pNextOpIfOk = (rfc_radioOp_t*)&RF_cmdPropCs;

/* Customize the API commands with application specific defines */
RF_cmdPropCs.rssiThr = RSSI_THRESHOLD_DBM;
RF_cmdPropCs.csEndTime = (IDLE_TIME_US + 150) * 4; /* Add some margin */
RF_cmdCountBranch.counter = CS_RETRIES_WHEN_BUSY;
RF_cmdNop.startTrigger.triggerType = TRIG_ABSTIME;
RF_cmdNop.startTrigger.pastTrig = 1;

/* Request access to the radio */
#if defined(DeviceFamily_CC26X0R2)
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioSetup, &rfParams);
#else
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
#endif// DeviceFamily_CC26X0R2

/* Set the frequency */
RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);

/* Get current time */
time1 = RF_getCurrentTime();

/* Run forever */
while(true)
{
sleep(10);
/* Create packet with incrementing sequence number & random payload */
packet[0] = (uint8_t)0x19;
memcpy(packet+1,&macAddress,8);
memcpy(packet+9,&CPUTemp,2);
memcpy(packet+11,&objectRTD,2);
memcpy(packet+13,&VOL,2);

/* Set absolute TX time to utilize automatic power management */
time1 += (PACKET_INTERVAL_US * 4);
RF_cmdNop.startTime = time1;

/* Send packet */
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdNop, RF_PriorityNormal,&callback, 0);
// RF_postCmd(rfHandle, (RF_Op*)&RF_cmdNop, RF_PriorityNormal,NULL, 0);
RF_cmdNop.status = IDLE;
RF_cmdPropCs.status = IDLE;
RF_cmdCountBranch.status = IDLE;
RF_cmdPropTx.status = IDLE;
RF_cmdCountBranch.counter = CS_RETRIES_WHEN_BUSY;
}
}

 

  • Hi,

    Did you check our LBT examples under the following link? Please check the examples under both in Easy Link and TI Drivers.

    Thanks,

    PM

  • In reply to PM:

    Hi,

    Yes,I am using this link to view an example.

    You can test it by adding a timer or sleep to the LBT routine.

    Thanks,

    lin

  • In reply to lin shi chang:

    Hi,

    We are little behind the Schedule because of Holidays,  etc.. Your post is in our que list. We will get back to you ASAP. Please bear with us.

    Thanks,

    PM

  • In reply to PM:

    You are using an abosolute trigger for the command, and then you are messing up the timing by inserting sleep in the loop. If you want the packet interval to increase by 10 s, add this to the PACKET_INTERVAL_US instead.

    Siri

     

  • In reply to Siri:

    Hi Siri,

    Can I use absolute acceleration? I want to use sleep or semaphore to control the interval of sending packets?

    Because I want to trigger the sending of data through another event.

  • In reply to lin shi chang:

    Not sure what you mean by absolute acceleration.

    If you want transmission to be triggered on an event you can use a semaphore, and then pend on that semaphore.

    When you call the RF_cmdNop command, it should have TRIG_NOW instead of TRIG_ABSTIME.

    You can look at the rfWakeOnRadioTx to see how a transission is initiated by a button push.

    BR

    Siri

     

  • In reply to Siri:

    Yes,I want to use the semaphore to control this sending cycle.

    you mean is RF_cmdNop.startTrigger.triggerType = TRIG_ABSTIME;   --------->    RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW;

    It is still unable to communicate for more than 5 minutes

  • In reply to lin shi chang:

    Yes, I mean RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW.

    You need to do some debugging and not just state that it stops working after some time.

    What exactly is happening?

    Where does the code hang?

    What is the status of the commands?

    I recommend that you start with the original example, and then modify and test one thing at the time. That way you know what changes makes your code fail, and we can also try to reproduce the problem here, if necessary.

    Siri

     

  • In reply to Siri:

    OK,because I want to add the function of LBT in the rfpacket routine.

    Then I will start with the original example.

    BR 

    lin shi chang

  • In reply to Siri:

    Due to my mistake, the program stopped running for a while.

    IF you want to use a semaphore.You should replace TRIG_ABSTIME with TRIG_NOW based on the LBT routine.

    After that it worked fine.

    Thank You!