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.

CC1311P3: RF RX with Unlimited packet length

Part Number: CC1311P3

Tool/software:

Hi,

We are working with CC1311P3 in our RF design. We have a use case to do continuous receive with unlimited packet length. Please let us know if CC1311P3, can do continuous data reception for unlimited length with or without detection of a configured Preamble and sync word.

Please let us know if we can receive all the data out of 2FSK demodulator in any mode without checking the sync word. We do not require any baseband decoding in this case.

Thanks!

  • The device supports unlimited length, and this can be achieved by settings maxPktLen in the CMD_PROP_RX/CMD_PROP_RX_ADV to 0.

    When using unlimited length you need to use the partial read entries to read out the data.

    The radio will not start receiving before a sync word is found, but by setting sync length to a minimum the device will most likely trigger on noise once you enter RX, and it will start receiving.

    We have not done any testing on this, as receiving continously will not be OK from a power consmuption point of view, and also you will have no way of knowing if there are bit errors in your received data. 

    Siri

  • Hi Siri,

    Thanks for the quick response.

    We have tried the above mentioned method using CCS in rfUARTBridge example project, but the RF_EventRxEntryDone is not received when we configured maxPktLen to 0. 

    We even tried the same configuration in SmartRF studio and observed the same behavior - RX packet are not at all received.

    Please provide any additional details that will help us narrow down on this use case.

    Thanks! 

  • I used the rfPacketRX example and modified it to use partial read entries and infinite packet length mode.

    I set the sync word to be 8 bits.

    What I see is that is takes maybe a couple of second before it starts receiving something, and then I get the RF_EventRxEntryDone interrupt at a fixed rate, as long as I handle the queue.

    If I want it to starts filling up the data entries tight away, what I had to do was to lower the sync trehold, so that it would find a "sync" word in noise immediately, and start receiving.

    However, to be able to receive som useful data, you need to search for a real sync word from the data you are sending.

    If you only sync on noise, the receiver will be bit synced to the noise, so that when your real data comes along that you are interested in, you will not receive the properly as thy are not in bit sync with the noise that you triggered on.

    I will assume that the data you want to receive have some kind of bit patterrn that can be used for bit syncing?

    I did a test where I transmit a continous preamble and use 8 bits of that preamble as sync word

    As you can see the preamble is received in the partail read buffers:

    Code shown below:

    /* Standard C Libraries */
    #include <stdlib.h>
    
    /* TI Drivers */
    #include <ti/drivers/rf/RF.h>
    #include <ti/drivers/GPIO.h>
    
    /* Driverlib Header files */
    #include DeviceFamily_constructPath(driverlib/rf_prop_mailbox.h)
    
    /* Board Header files */
    #include "ti_drivers_config.h"
    
    /* Application Header files */
    #include "RFQueue.h"
    #include <ti_radio_config.h>
    
    /***** Prototypes *****/
    static void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e);
    
    /***** Variable declarations *****/
    static RF_Object rfObject;
    static RF_Handle rfHandle;
    
    #define PARTIAL_RX_ENTRY_HEADER_SIZE    12
    #define DATA_BUFFER_SIZE                20
    
    /* Buffer which contains all Data Entries for receiving data.
     * Pragmas are needed to make sure this buffer is 4 byte aligned (requirement from the RF Core) */
    #if defined(__GNUC__)
    static uint8_t rxDataEntryBuf1[PARTIAL_RX_ENTRY_HEADER_SIZE + DATA_BUFFER_SIZE] __attribute__((aligned(4)));
    static uint8_t rxDataEntryBuf2[PARTIAL_RX_ENTRY_HEADER_SIZE + DATA_BUFFER_SIZE] __attribute__((aligned(4)));
    #else
    #error This compiler is not supported.
    #endif
    
    rfc_dataEntryPartial_t* partialReadEntry1 = (rfc_dataEntryPartial_t*)&rxDataEntryBuf1;
    rfc_dataEntryPartial_t* partialReadEntry2 = (rfc_dataEntryPartial_t*)&rxDataEntryBuf2;
    rfc_dataEntryPartial_t* currentReadEntry = (rfc_dataEntryPartial_t*)&rxDataEntryBuf1;
    
    // Receive dataQueue for RF Core to fill in data
    static dataQueue_t dataQueue;
    static uint8_t* packetDataPointer;
    
    /***** Function definitions *****/
    
    void *mainThread(void *arg0)
    {
        RF_Params rfParams;
        RF_Params_init(&rfParams);
        partialReadEntry1->length = DATA_BUFFER_SIZE + 4;
        partialReadEntry1->config.type = DATA_ENTRY_TYPE_PARTIAL;
        partialReadEntry1->status = DATA_ENTRY_PENDING;
    
        partialReadEntry2->length = DATA_BUFFER_SIZE + 4;
        partialReadEntry2->config.type = DATA_ENTRY_TYPE_PARTIAL;
        partialReadEntry2->status = DATA_ENTRY_PENDING;
    
        partialReadEntry1->pNextEntry = (uint8_t*)partialReadEntry2;
        partialReadEntry2->pNextEntry = (uint8_t*)partialReadEntry1;
    
        dataQueue.pCurrEntry = (uint8_t*)partialReadEntry1;
        dataQueue.pLastEntry = NULL;
    
        RF_cmdPropRx.syncWord = 0x55555555;
        RF_cmdPropRx.pQueue = &dataQueue;
        RF_cmdPropRx.maxPktLen = 0;
        RF_cmdPropRadioDivSetup.formatConf.nSwBits = 8;
    
        rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    
        RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
        RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx, RF_PriorityNormal, &callback, RF_EventRxEntryDone);
    
        while(1);
    }
    
    void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
    {
        if (e & RF_EventRxEntryDone)
        {
            GPIO_toggle(CONFIG_GPIO_RLED);
    
            // Get a pointer to the first byte
            packetDataPointer = &currentReadEntry->rxData;
            //---------------------------------------------------------------------------
            // Implement code for handling the incoming data
            // .
            // .
            // .
            // .
            //---------------------------------------------------------------------------
            currentReadEntry->status = DATA_ENTRY_PENDING;
            currentReadEntry = (rfc_dataEntryPartial_t*)currentReadEntry->pNextEntry;
    
        }
    }

    Siri

  • Hi Siri,

    Thanks for the code reference. This helped us to receive a packet of 1024bytes. But we are not able to receive subsequent RF_EventRxEntryDone interrupt for the continued transmission. 

    Please suggest us how to enable continued reception of longer packets.

    Thanks!

  • I am afraid I do not uderstand how you are testing and what is failing.

    The code I sent you do not have any limitations when it comes to packet size.

    It will be continously in RX and you will receive a callback everytime an RX entry has been filled up (RF_EventRxEntryDone).

    With DATA_BUFFER_SIZE set to 20, that means that if you are running the example with 50 kbps settings, you will see the LED in the callback toggle every 3.2 ms.

    • RX will not be terminated unless that you 
    • Cancel the ongoing RX cmmand
    • Use the SET_LEN command to stop the RX
    • You are not handling the RX queue correctly so that there will not be any more availabe entries to store the incoming data in status of the RX command will be PROP_ERROR_RXFULL )

    The test code I sent you simply show how to set the radio into continous RX.

    If you terminate RX, you need to clean up the buffers and queue, and restart RX by running the RX command again.

    Siri

  • Hi Siri,

    We have used the exact configuration that you have provided. But we are receiving the RX done interrupt(RF_EventRxEntryDone ) twice for every RF_runCmd. Subsequent interrupt is received only when RF_runCmd is called once again.

    Could you please provide additional clarity on this behaviour?

    Thanks

  • I am afraid I do not understand what you mean.

    With hte code example I provided previosly you will get the RF_EventRxEntryDone interrupt every 20 bytes received, and since you are using infinite mode this will NEVER stop.

    Please remember that you cannot set any breakpoint in the code when debugging infinite mode, as this will halt the MCU (while the RF Core is still running), and the radio will overflow after willing up your two data entries as you are not freeing up data entries when your MCU is halted.

    Siri