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: PROP_ERROR_RXBUF

Part Number: CC1310

What exactly is the cause of PROP_ERROR_RXBUF?

From the example code we have

RF_cmdPropRx.maxPktLen = MAX_LENGTH; /* Implement packet length filtering to avoid PROP_ERROR_RXBUF */

however I am still getting the PROP_ERROR_RXBUF.

I am using 2 x data queue entries

#define NUM_DATA_ENTRIES    2 // Number of packets which the queue will have space for

My application runs fine for a long time, but then the Rx stops working and if I halt the code then I can see that

RF_cmdPropRx.status == PROP_ERROR_RXBUF

The error persists even if I reset the status to IDLE and re-run the command.

From the Technical Reference Manual we have the explanation "No RX buffer large enough for the received data available at the start of a
packet".

Looking at the status of both Data Queue entries, they are both DATA_ENTRY_FINISHED - the rfCallback routine should however be calling RFQueue_nextEntry() which should reset the entry status to DATA_ENTRY_PENDING, so I am not sure how I am ending up with both entries stuck as DATA_ENTRY_FINISHED?

Thanks :-)

  • There can be several reasons for why you get PROP_ERROR_RXBUF.

    If you use the default rfPacketRX example and you set a breakpoint in the code, you need to remember that you are only halting the main CPU and not the RF Code, meaning that the radio still receives packets while the application is not making the data entries available for new data.

    Another reason that can cause the RX buffer to overflow is if you are not making room for all appended status bytes. In the default example there are 2 status bytes appended and NUM_APPENDED_BYTES is 2. If you change this to 0 and send a packet with packet length = MAX_LENGTH, or you enable more status bytes, you will also get the same error.

    BR

    Siri

  • Hi Siri

    Thanks!

    "There can be several reasons for why you get PROP_ERROR_RXBUF."

    1. Queue is full

    2. Received packet length is longer than available (MAX_LENGTH + NUM_APPENDED_BYTES)

    Do I have the above correct? Any others?

    I am still not understanding how we are ending up with all Data Queue entries having a status of DATA_ENTRY_FINISHED, and not being cleared in the rfCallback routine which calls RFQueue_nextEntry() - is there a situation in which the rfCallback routine will not be called for each packet received? 

    Thanks & Regards

    Dane

  • Without knowing how your code is implemented, what PHY you are suing, and how you are configuring your RX command, this is not possible for me to answer.

    With the default rfPacketRX and rfPacketTx example, I cannot find any other reasons for getting PROP_ERROR_RXBUF, other that breakpoints in the code, preventing the data entries to be handled before new data is received.

    BR

    Siri

  • I have used the examples (rfPacketRX and rfPacketTx) and modified them, yes.

    What would be the correct way to recover from PROP_ERROR_RXBUF, in order to get the receiver working again? I am currently trying with running CMD_CLEAR_RX, however this [usually] seems to work once, but not again thereafter.

    I also seem to be struggling with my tasks getting blocked on "Internal Error", however I will start a new question/thread for this.

    Thanks :-)

  • There is no need for anything else than running the RX command again (as long as you have handled the queues).

    In the original rxPacketRX example, you could simply do this:

    void *mainThread(void *arg0)
    {
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        /* Open LED pins */
        ledPinHandle = PIN_open(&ledPinState, pinTable);
        if (ledPinHandle == NULL)
        {
            while(1);
        }
    
        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 */
        /* Set the Data Entity queue for received data */
        RF_cmdPropRx.pQueue = &dataQueue;
        /* Discard ignored packets from Rx queue */
        RF_cmdPropRx.rxConf.bAutoFlushIgnored = 1;
        /* Discard packets with CRC error from Rx queue */
        RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 1;
        /* Implement packet length filtering to avoid PROP_ERROR_RXBUF */
        RF_cmdPropRx.maxPktLen = MAX_LENGTH;
        RF_cmdPropRx.pktConf.bRepeatOk = 1;
        RF_cmdPropRx.pktConf.bRepeatNok = 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);
    
        while(1)
        {
    
            /* Enter RX mode and stay forever in RX */
            RF_EventMask terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx,
                                                       RF_PriorityNormal, &callback,
                                                       RF_EventRxEntryDone);
    
            switch(terminationReason)
            {
                case RF_EventLastCmdDone:
                    // A stand-alone radio operation command or the last radio
                    // operation command in a chain finished.
                    break;
                case RF_EventCmdCancelled:
                    // Command cancelled before it was started; it can be caused
                    // by RF_cancelCmd() or RF_flushCmd().
                    break;
                case RF_EventCmdAborted:
                    // Abrupt command termination caused by RF_cancelCmd() or
                    // RF_flushCmd().
                    break;
                case RF_EventCmdStopped:
                    // Graceful command termination caused by RF_cancelCmd() or
                    // RF_flushCmd().
                    break;
                default:
                    // Uncaught error event
                    while(1);
            }
    
            uint32_t cmdStatus = ((volatile RF_Op*)&RF_cmdPropRx)->status;
            switch(cmdStatus)
            {
                case PROP_DONE_OK:
                    // Packet received with CRC OK
                    break;
                case PROP_DONE_RXERR:
                    // Packet received with CRC error
                    break;
                case PROP_DONE_RXTIMEOUT:
                    // Observed end trigger while in sync search
                    break;
                case PROP_DONE_BREAK:
                    // Observed end trigger while receiving packet when the command is
                    // configured with endType set to 1
                    break;
                case PROP_DONE_ENDED:
                    // Received packet after having observed the end trigger; if the
                    // command is configured with endType set to 0, the end trigger
                    // will not terminate an ongoing reception
                    break;
                case PROP_DONE_STOPPED:
                    // received CMD_STOP after command started and, if sync found,
                    // packet is received
                    break;
                case PROP_DONE_ABORT:
                    // Received CMD_ABORT after command started
                    break;
                case PROP_ERROR_RXBUF:
                    // No RX buffer large enough for the received data available at
                    // the start of a packet
                    break;
                case PROP_ERROR_RXFULL:
                    while(1);
                    // Out of RX buffer space during reception in a partial read
                    break;
                case PROP_ERROR_PAR:
                    // Observed illegal parameter
                    break;
                case PROP_ERROR_NO_SETUP:
                    // Command sent without setting up the radio in a supported
                    // mode using CMD_PROP_RADIO_SETUP or CMD_RADIO_SETUP
                    break;
                case PROP_ERROR_NO_FS:
                    // Command sent without the synthesizer being programmed
                    break;
                case PROP_ERROR_RXOVF:
                    // RX overflow observed during operation
                    break;
                default:
                    // Uncaught error event - these could come from the
                    // pool of states defined in rf_mailbox.h
                    while(1);
            }
        }
    }

    Siri

  • I ended up adding a while loop in the rfCallback to process more than one data entry if necessary. In my main loop I check if the command ended with PROP_ERROR_RXBUF and if so then I issue CMD_CLEAR_RX. This seems to have solved things and the radio seems to be running reliably now.