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: Some issue about two-way communication.

Part Number: CC1310


Hi team,

Here's the request from the customer:

Is there any way to make the device in receive mode when it is not transmitting to the outside, and in transmit mode at all other times?

Customer has made a device to send data to the sensor every 5 minutes, but now he wants to wirelessly modify its band and address, so it needs to be tuned to receive mode when it is not sending data to the outside, but once it is adjusted to receive mode, it will enter a loop and can no longer to be transmit mode.

Could you help check this case? Thanks.

Best Regards,                                                        

Nick

  • The answer is yes but without knowing how your customer has implemented this it's not possible to know why it doesn't work....

  • Please provide detailed info regarding which SDK you are using, which stack (if any), which code example from the SDK, and what settings are being modified between RX and TX.

    Details on how the changes are done is also needed.

    Siri

  • Hi Siri,

    SDK is simplelink_cc13x0_sdk_1_30_00_06 and no stack use,

    Send Parameters:

    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,
    .syncWord = 0x930B51DE,
    .pPkt = 0 
    };

    Receive Parameters:

    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 
    };

    Best Regards,                                                        

    Nick

  • First of all, why are they using such an old SDK? If they have just started to develop they should use the latest SDK (4.20)

    I still have no info on what examples they have used to start with and what they do in the code. What loop are they stuck in a nd what is the status of the different RF commands?

    There are no special things to take care of when changing between RX and TX. As long as the radio is done with a TX command, you can send a RX command, and vice versa.

    If they need to change parameters frequency in between RX and TX, they need to do a new CMF_SF. If they change the frequency mode that 1 MHz they need to change the setup command as well. To make sure that the new setup command takes effect, the RF code needs to be powered down and then up again.

    Take a look at the following for reference:

    (+) CC1310: CC1310 Examples. Change of the frequency by end program user. - Sub-1 GHz forum - Sub-1 GHz - TI E2E support forums

    If they have problems, they should try to first get a simple test program to be able to do whatever they are trying to do. Use the rfPacketRX and rfPacketTX example as a starting point.

    If they are failing to get it to work, it should be easy for us to test the same, and try to figure out what they do wrong.

  • Hi Siri,

    Here's further request from customer:

    As described in the following program, what causes the parameters executed by the RF_runCmd function to always enter the receiving mode and cannot jump out:

    static void rxTaskFunction(UArg arg0, UArg arg1)
    {
    
    set_colFreq();
    
    RF_Params_init(&rfParams);
    
    if (RFQueue_defineQueue(&dataQueue, rxDataEntryBuffer,
    sizeof(rxDataEntryBuffer),
    NUM_DATA_ENTRIES,
    MAX_LENGTH + NUM_APPENDED_BYTES))
    {
    /* Failed to allocate space for all data entries */
    while (1)
    ;
    }
    
    /* Modify CMD_PROP_RX command for application needs */
    RF_cmdPropRx.pQueue = &dataQueue; /* Set the Data Entity queue for received data */
    RF_cmdPropRx.rxConf.bAutoFlushIgnored = 1; /* Discard ignored packets from Rx queue */
    RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 1; /* Discard packets with CRC error from Rx queue */
    RF_cmdPropRx.maxPktLen = MAX_LENGTH; /* Implement packet length filtering to avoid PROP_ERROR_RXBUF */
    RF_cmdPropRx.pktConf.bRepeatOk = 1;
    RF_cmdPropRx.pktConf.bRepeatNok = 1;
    RF_cmdPropRx.pOutput = (uint8_t*)&rxStatistics; //将接收结构体赋给协议接收结构体,便于接收过程中查看接收状态及信息
    
    /* Request access to the radio */
    rfHandle = RF_open(&rfObject, &RF_prop,
    (RF_RadioSetup*) &RF_cmdPropRadioDivSetup, &rfParams);
    
    /* Set the frequency */
    RF_postCmd(rfHandle, (RF_Op*) &RF_cmdFs, RF_PriorityNormal, NULL, 0);
    /* Enter RX mode and stay forever in RX */
    RF_runCmd(rfHandle, (RF_Op*) &RF_cmdPropRx, RF_PriorityNormal, &callback,
    IRQ_RX_ENTRY_DONE);
    
    while (1)
    ;
    }

    RF_runCmd(rfHandle, (RF_Op*) &RF_cmdPropRx, RF_PriorityNormal, &callback,
    IRQ_RX_entry_done); is a loop that the program currently enters in receive mode and performs the following receive parameters:

    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,
    .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
    };

    Best Regards,                                                        

    Nick

  • In the settings above, bit repeat modes are enabled:

    RF_cmdPropRx.pktConf.bRepeatOk = 1;
    RF_cmdPropRx.pktConf.bRepeatNok = 1;

    That means that the the radio will NEVER exit RX mode (the run command will never return) unless an error occurs (No more available data entries etc.).

    The run command is blocking, so using a post instead will have the code go tot he while loop. However, RX will not be terminated unless an error occur, or the application calls a cancel command.

    Siri

  • Hi Siri,

    Customer found that the two parameters in the code are equal to 0 and not equal to 1.

    RF_cmdPropRx.pktConf.bRepeatOk = 0;
    RF_cmdPropRx.pktConf.bRepeatNok = 0;

  • as I wrote almost 2 weeks ago:

    "If they have problems, they should try to first get a simple test program to be able to do whatever they are trying to do. Use the rfPacketRX and rfPacketTX example as a starting point.

    If they are failing to get it to work, it should be easy for us to test the same, and try to figure out what they do wrong."

    We need to be able to reproduce the problem at our end to be able to help them. Bits and pieces of information regarding what they do is not enough.

    Siri