LP-EM-CC1354P10: How to send more than 255 bytes with Advanced Packet Format

Part Number: LP-EM-CC1354P10

Tool/software:

Hello,

I am trying to transmit and receive more than 255 bytes with LP-EM-CC1354P10 using CMD_PROP_TX_ADV and CMD_PROP_RX_ADV in Advanced Packet Mode.

I am using wakeonradioTX,wakeonradioTX  example.

I referred to this TI E2E thread about larger packets,but nothing receive .
https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/993297/cc1312r-transmission-of-data-which-is-1000-byte-length-stops-after-4-minute/3669128?tisearch=e2e-sitesearch&keymatch=big%252525252525252520payloads#3669128

I attach my transmitter and receiver code snippets.
Can you please check and tell me what I am doing wrong?

Transmitter:

/***** Includes *****/
#include <stdlib.h>

/* POSIX Header files */
#include <pthread.h>
#include <semaphore.h>

/* TI-RTOS Header files */
#include <ti/drivers/rf/RF.h>
#include <ti/drivers/GPIO.h>
#include <ti/display/Display.h>

#include <ti/devices/DeviceFamily.h>
#include DeviceFamily_constructPath(driverlib/cpu.h)

/* Board Header files */
#include "ti_drivers_config.h"

/* RF settings */
#include <ti_radio_config.h>

/***** Defines *****/
/* Wake-on-Radio configuration */
#define WOR_WAKEUPS_PER_SECOND 2

/* TX number of random payload bytes */
#define PAYLOAD_LENGTH 300

/* WOR Example configuration defines */
#define WOR_PREAMBLE_TIME_RAT_TICKS(x) \
((uint32_t)(4000000*(1.0f/(x))))

/* TX task stack size and priority */
#define TX_TASK_STACK_SIZE 1024
#define TX_TASK_PRIORITY 2

/* TX packet payload (length +1 to fit length byte) and sequence number */
static uint8_t packet[PAYLOAD_LENGTH +2];

/* RF driver objects and handles */
static RF_Object rfObject;
static RF_Handle rfHandle;

/* TX Semaphore */
static sem_t txSemaphore;


/***** Function definitions *****/
/* GPIO interrupt Callback function for CONFIG_GPIO_BTN1. */
void buttonCallbackFunction(uint_least8_t index) {
CPUdelay((uint32_t)((48000000/3)*0.050f));
if (!GPIO_read(index)) {
sem_post(&txSemaphore);
}
}
void *mainThread(void *arg0)
{
int retc;
Display_init();
GPIO_setConfig(CONFIG_GPIO_GLED, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
GPIO_setConfig(CONFIG_GPIO_BTN1, GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_FALLING);
GPIO_setCallback(CONFIG_GPIO_BTN1, buttonCallbackFunction);
GPIO_enableInt(CONFIG_GPIO_BTN1);
retc = sem_init(&txSemaphore, 0, 0);
if (retc != 0) {
while (1);
}
RF_Params rfParams;
RF_Params_init(&rfParams);
RF_cmdPropTxAdv.pktLen = PAYLOAD_LENGTH + 2; /* +2 for length byte */
RF_cmdPropTxAdv.pPkt = packet;
RF_cmdPropTxAdv.preTime = WOR_PREAMBLE_TIME_RAT_TICKS(WOR_WAKEUPS_PER_SECOND);
RF_cmdPropTxAdv.startTrigger.triggerType = TRIG_NOW;
RF_cmdPropTxAdv.startTrigger.pastTrig = 0x1;
RF_cmdPropTxAdv.condition.rule = 1;
RF_cmdPropTxAdv.pktConf.bUseCrc = 1;
RF_cmdPropTxAdv.pktConf.bCrcIncSw = 0;
RF_cmdPropTxAdv.pktConf.bCrcIncHdr = 0;
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
while(1)
{
int retc;
retc = sem_wait(&txSemaphore);
if (retc == -1) {
while (1);
}
packet[0] = (uint8_t)(PAYLOAD_LENGTH);
packet[1] = (uint8_t)(PAYLOAD_LENGTH >> 8);
uint16_t i;
for (i = 2; i < PAYLOAD_LENGTH + 2; i++)
{
packet[i] = i;
}
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);
GPIO_toggle(CONFIG_GPIO_GLED);
}
}

Receiver:

/***** Includes *****/
/* 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>

/***** Defines *****/

#define DATA_ENTRY_HEADER_SIZE 8 /* Constant header size of a Generic Data Entry */
#define MAX_LENGTH 300 /* Max length byte the radio will accept */
/* Must be less than 256 if SIZE_OF_LENGHT_FIELD = 1 */
#define NUM_DATA_ENTRIES 2 /* NOTE: Only two data entries supported at the moment */
#define SIZE_OF_LENGHT_FIELD 2
#define NUM_APPENDED_BYTES 1 + SIZE_OF_LENGHT_FIELD /* The Data Entries data field will contain:
* 1 or 2 header byte(s) (containing the length)
* A maximum of MAX_LENGTH payload bytes
* 1 status byte (RF_cmdPropRxAdv.rxConf.bAppendStatus = 0x1) */

/***** Prototypes *****/
static void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e);

/***** Variable declarations *****/
static RF_Object rfObject;
static RF_Handle rfHandle;

#elif defined(__GNUC__)
static uint8_t
rxDataEntryBuffer[RF_QUEUE_DATA_ENTRY_BUFFER_SIZE(NUM_DATA_ENTRIES,
MAX_LENGTH,
NUM_APPENDED_BYTES)]
__attribute__((aligned(4)));

/* Receive dataQueue for RF Core to fill in data */
static dataQueue_t dataQueue;
static rfc_dataEntryGeneral_t* currentDataEntry;
static uint16_t packetLength;
static uint8_t* packetDataPointer;
static rfc_propRxOutput_t rxStatistics;

static uint8_t packet[MAX_LENGTH + NUM_APPENDED_BYTES];

/***** Function definitions *****/

void *mainThread(void *arg0)
{
RF_Params rfParams;
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 */
/* Set the Data Entity queue for received data */
RF_cmdPropRxAdv.pQueue = &dataQueue;
/* Discard ignored packets from Rx queue */
RF_cmdPropRxAdv.rxConf.bAutoFlushIgnored = 1;
/* Discard packets with CRC error from Rx queue */
RF_cmdPropRxAdv.rxConf.bAutoFlushCrcErr = 1;
/* Implement packet length filtering to avoid PROP_ERROR_RXBUF */
RF_cmdPropRxAdv.maxPktLen = MAX_LENGTH;
RF_cmdPropRxAdv.pktConf.bRepeatOk = 1;
RF_cmdPropRxAdv.pktConf.bRepeatNok = 1;
RF_cmdPropRxAdv.pOutput = (uint8_t*)&rxStatistics;

RF_cmdPropRxAdv.condition.rule = 1;
RF_cmdPropRxAdv.pktConf.bUseCrc = 0x1;
RF_cmdPropRxAdv.rxConf.bIncludeHdr = 0x1;
RF_cmdPropRxAdv.rxConf.bAppendStatus = 0x1;
RF_cmdPropRxAdv.endTrigger.triggerType = 0x1;
RF_cmdPropRxAdv.pktConf.bCrcIncHdr = 0x1;

RF_cmdPropRxAdv.hdrConf.numHdrBits = 16;
RF_cmdPropRxAdv.hdrConf.numLenBits = 16;

/* 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_EventMask terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRxAdv, RF_PriorityNormal, &callback, RF_EventRxEntryDone);
while(1);
}

void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
{
if (e & RF_EventRxEntryDone)
{
/* Toggle pin to indicate RX */

GPIO_toggle(CONFIG_GPIO_RLED);

/* Get current unhandled data entry */
currentDataEntry = RFQueue_getDataEntry();

packetLength = ((uint16_t)((*(uint8_t*)(&currentDataEntry->data+1)) << 8) |
(uint16_t)(*(uint8_t*)(&currentDataEntry->data)));
packetDataPointer = (uint8_t*)(&currentDataEntry->data + SIZE_OF_LENGHT_FIELD);

/* Copy the payload and the status bytes to the packet variable */
memcpy(packet, packetDataPointer, (packetLength + NUM_APPENDED_BYTES - SIZE_OF_LENGHT_FIELD));
}
RFQueue_nextEntry();
}

 

  • At least for the TX side, you are doing the same mistake as I pointed out in the post you are linking to.

    A two byte packet length should be written like this:

    packet[0] = (uint8_t)(PAYLOAD_LENGTH >> 8);
    packet[1] = (uint8_t)(PAYLOAD_LENGTH);

    Not the other way around (except if you are using SLR Mode)

    Please configure your length correctly and let me know the results

    SIri

  • Hi Siri,

    Thank you for your reply.

    I have implemented the changes you suggested, but still nothing is being received on the receiver side.

    Below are the parameters I am currently using:

    // PARAMETER SUMMARY
    Frequency (MHz): 916.0000
    Deviation (kHz): 190.0
    Max Packet Length: 2047
    Preamble Count: 7 Bytes
    Preamble Mode: Send 0 as the first preamble bit
    RX Filter BW (kHz): 621.6
    Symbol Rate (kBaud): 500.000
    Sync Word: 0x55904E
    Sync Word Length: 24 Bits
    TX Power (dBm): 12
    Whitening: Dynamically IEEE 802.15.4g compatible whitener and 16/32-bit CRC

    I suspect the issue is only on the receiver side. Could you please check and help resolve this?

    Thank you,
    Anbu

  • Hi Anbu

    The PHY you have selected does not use the normal packet format, where the length is the first 1 or two bytes after sync. It uses an IEEE 802.15.4g compliant packet format, where the two first bytes after sync includes mode switch settings, info regarding CRC length, whitening, and an 11 bits long packet length field.

    The code below can be used to transmit and receive a 2047 bytes long packet using this format:

    TX:

    // Packet TX Configuration
    #define PAYLOAD_LENGTH      2045                            // Max 2045, as the length in the header is 11 bits, and can be max 2047
    
    #define SIZE_OF_HEADER      2                               // Do Not Change
    #define LENGTH_IN_HEADER    PAYLOAD_LENGTH + SIZE_OF_HEADER // Max 2047 (11 bits)
    
    #define _802_15_4_G_HEADER  0x18                            // MS = 0
                                                                // FCS = 1 (2 byte CRC)
                                                                // DW = 1 (Data Whitening enabled)
    
    #define PACKET_INTERVAL     500000                          // Set packet interval to 500000 us or 500 ms
    
    static RF_Object rfObject;
    static RF_Handle rfHandle;
    
    uint16_t header;
    uint8_t packet[SIZE_OF_HEADER + PAYLOAD_LENGTH];
    uint16_t seqNumber;
    
    void *mainThread(void *arg0)
    {
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        GPIO_setConfig(CONFIG_GPIO_GLED, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
    
        GPIO_write(CONFIG_GPIO_GLED, CONFIG_GPIO_LED_OFF);
    
        RF_cmdPropTxAdv.pktLen = LENGTH_IN_HEADER;
        RF_cmdPropTxAdv.pPkt = packet;
    
        // 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);
    
        while(1)
        {
            // IEEE_802_15_4_g Header (2 byte CRC, whitening, 11 bits length)
            header = (_802_15_4_G_HEADER << 8) + (LENGTH_IN_HEADER & 0x07FF);
    
            packet[0] = (uint8_t)(header);
            packet[1] = (uint8_t)(header >> 8);
    
            for (uint16_t i = 2; i < PAYLOAD_LENGTH + SIZE_OF_HEADER; i++)
            {
                packet[i] = (i - 1);
            }
    
            // Send packet
            RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);
    
            GPIO_toggle(CONFIG_GPIO_GLED);
    
            // Power down the radio
            RF_yield(rfHandle);
    
            // Sleep for PACKET_INTERVAL us
            usleep(PACKET_INTERVAL);
        }
    }

    RX:

    #define DATA_ENTRY_HEADER_SIZE 8    // Constant header size of a Generic Data Entry
    #define NUM_DATA_ENTRIES       2    // NOTE: Only two data entries supported at the moment
    
    #define SIZE_OF_HEADER         2    // Cannot be changed (IEEE_802_15_4_g)
    
    // Optional appended bytes at the end of the packet
    //  -------------------------------------------------------
    //  | CRC1 | CRC0 | RSSI | TS0 | TS1 | TS2 | TS3 | Status |
    //  -------------------------------------------------------
    
    #define CRC                     0   // 2 if .rxConf.bIncludeCrc = 0x1, 0 otherwise
    #define RSSI                    0   // 1 if .rxConf.bAppendRssi = 0x1, 0 otherwise
    #define TIMESTAMP               0   // 4 if .rxConf.bAppendTimestamp = 0x1, 0 otherwise
    #define STATUS                  0   // 1 if .rxConf.bAppendStatus = 0x1, 0 otherwise
    
    #define NUM_APPENDED_BYTES      CRC + RSSI + TIMESTAMP + STATUS
    
    #define MAX_LENGTH              2047 // Max length byte the radio will accept
    
    #define PAYLOAD_LENGTH          (MAX_LENGTH - SIZE_OF_HEADER)
    
    static void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e);
    
    static RF_Object rfObject;
    static RF_Handle rfHandle;
    
    /* 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) */
    static uint8_t rxDataEntryBuffer[RF_QUEUE_DATA_ENTRY_BUFFER_SIZE(NUM_DATA_ENTRIES,
                                                                     MAX_LENGTH,
                                                                     NUM_APPENDED_BYTES)]
                                                                     __attribute__((aligned(4)));
    // Receive dataQueue for RF Core to fill in data
    dataQueue_t dataQueue;
    rfc_dataEntryGeneral_t* currentDataEntry;
    uint16_t packetLength;
    uint8_t* packetDataPointer;
    rfc_propRxOutput_t rxStatistics;
    
    uint8_t packet[PAYLOAD_LENGTH + NUM_APPENDED_BYTES];
    
    void *mainThread(void *arg0)
    {
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        GPIO_setConfig(CONFIG_GPIO_RLED, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
        GPIO_write(CONFIG_GPIO_RLED, CONFIG_GPIO_LED_OFF);
    
        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_cmdPropRxAdv.pQueue = &dataQueue;
    
        // Discard ignored packets from Rx queue
        RF_cmdPropRxAdv.rxConf.bAutoFlushIgnored = 1;
    
        // Discard packets with CRC error from Rx queue
        RF_cmdPropRxAdv.rxConf.bAutoFlushCrcErr = 1;
    
        // Implement packet length filtering to avoid PROP_ERROR_RXBUF
        RF_cmdPropRxAdv.maxPktLen = MAX_LENGTH;
        RF_cmdPropRxAdv.pktConf.bRepeatOk = 1;
        RF_cmdPropRxAdv.pktConf.bRepeatNok = 1;
        RF_cmdPropRxAdv.pOutput = (uint8_t*)&rxStatistics;
    
        // Optional bytes to append:
        RF_cmdPropRxAdv.rxConf.bIncludeCrc = 0x0;
        RF_cmdPropRxAdv.rxConf.bAppendRssi = 0x0;
        RF_cmdPropRxAdv.rxConf.bAppendTimestamp = 0x0;
        RF_cmdPropRxAdv.rxConf.bAppendStatus = 0x0;
    
        // 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);
    
        RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRxAdv, RF_PriorityNormal, &callback, RF_EventRxEntryDone);
    
        while(1);
    }
    
    void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
    {
        if (e & RF_EventRxEntryDone)
        {
            // Toggle pin to indicate RX
            GPIO_toggle(CONFIG_GPIO_RLED);
    
            // Get current unhandled data entry
            currentDataEntry = RFQueue_getDataEntry();
    
            packetLength = 0x07FF & (((uint16_t)((*(uint8_t*)(&currentDataEntry->data+1)) << 8) |
                                      (uint16_t)(*(uint8_t*)(&currentDataEntry->data))));
            packetDataPointer = (uint8_t*)(&currentDataEntry->data + SIZE_OF_HEADER);
    
            // Copy the payload and the status bytes to the packet variable
            memcpy(packet, packetDataPointer, (packetLength + NUM_APPENDED_BYTES));
    
            RFQueue_nextEntry();
        }
    }
    

    BR

    Siri

  • Hi Siri,

    I tried the method you suggested, but the receiver still does not receive any packets. I’ve attached my updated TX and RX code — please review it and help identify the issue

    Observations / Behavior

    On the TX side I post the TX command (RF_cmdPropTxAdv) repeatedly in a loop and toggle the TX LED; transmission runs as expected.

    On the RX side I call RF_runCmd(..., &callback, 0) and then toggle the RX LED inside the main loop to confirm the receiver thread is running. However, after RF_runCmd executes, execution appears to return immediately and the RX LED does not toggle.

    When I pause the code in the debugger at the wfi wait-for-interrupt instruction (__asm volatile (" wfi\n");), the receiver behaves as if it is running, but the LED still does not toggle in normal execution.

    TX:
    #define PAYLOAD_LENGTH 2045
    #define SIZE_OF_HEADER 2 // Do Not Change

    #define LENGTH_IN_HEADER PAYLOAD_LENGTH + SIZE_OF_HEADER // Max 2047 (11 bits)
    #define _802_15_4_G_HEADER 0x18 // MS = 0

    #define PACKET_INTERVAL 500000 // Set packet interval to 500000 us or 500 ms
    uint16_t header;
    uint16_t total_length = PAYLOAD_LENGTH; // PHR length includes CRC but not PHR itself
    uint8_t packet[SIZE_OF_HEADER + PAYLOAD_LENGTH];
    uint16_t seqNumber;

    /********************************************/
    rfc_CMD_PROP_TX_ADV_t RF_cmdPropTxAdv;
    static RF_Object rfObject;
    static RF_Handle rfHandle;

    rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t RF_cmdPropRadioDivSetup;
    RF_Mode RF_prop;
    rfc_CMD_FS_t RF_cmdFs;
    /*
    * ======== mainThread ========
    */
    void *mainThread(void *arg0)
    {

    RF_Params rfParams;
    RF_Params_init(&rfParams);
    RF_cmdPropTxAdv.pktLen = LENGTH_IN_HEADER;
    RF_cmdPropTxAdv.pPkt = packet;
    RF_cmdPropTxAdv.startTrigger.triggerType = TRIG_NOW;

    rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    while(1)
    {
    // IEEE_802_15_4_g Header (2 byte CRC, whitening, 11 bits length)
    header = (_802_15_4_G_HEADER << 8) + (LENGTH_IN_HEADER & 0x07FF);

    packet[0] = (uint8_t)(header);
    packet[1] = (uint8_t)(header >> 8);

    uint16_t i;
    for ( i = 2; i < PAYLOAD_LENGTH + SIZE_OF_HEADER; i++)
    {
    packet[i] = (i - 1);
    }

    RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);

    GPIO_toggle(CONFIG_GPIO_GLED);
    RF_yield(rfHandle);
    usleep(500000);
    }
    }
    RX:

    /***** Defines *****/
    /* TX Configuration */
    #define DATA_ENTRY_HEADER_SIZE 8 // Constant header size of a Generic Data Entry
    #define NUM_DATA_ENTRIES 2 // NOTE: Only two data entries supported at the moment
    #define SIZE_OF_HEADER 2 // Cannot be changed (IEEE_802_15_4_g)
    #define CRC 0 // 2 if .rxConf.bIncludeCrc = 0x1, 0 otherwise
    #define RSSI 0 // 1 if .rxConf.bAppendRssi = 0x1, 0 otherwise
    #define TIMESTAMP 0 // 4 if .rxConf.bAppendTimestamp = 0x1, 0 otherwise
    #define STATUS 0 // 1 if .rxConf.bAppendStatus = 0x1, 0 otherwise

    #define NUM_APPENDED_BYTES CRC + RSSI + TIMESTAMP + STATUS

    #define MAX_LENGTH 2047 // Max length byte the radio will accept

    #define PAYLOAD_LENGTH (MAX_LENGTH - SIZE_OF_HEADER)

    /***** Variable declarations *****/

    /* RF driver object and handle */
    static RF_Object rfObject;
    static RF_Handle rfHandle;
    /* General wake-on-radio sniff status statistics and statistics from the RF Core about received packets */
    rfc_propRxOutput_t rxStatistics;
    static uint8_t rxDataEntryBuffer [RF_QUEUE_DATA_ENTRY_BUFFER_SIZE(NUM_DATA_ENTRIES,MAX_LENGTH, NUM_APPENDED_BYTES)] __attribute__ ((aligned (4)));

    /* RX Data Queue and Data Entry pointer to read out received packets */
    dataQueue_t dataQueue;
    rfc_dataEntryGeneral_t* currentDataEntry;

    /* Received packet's length and pointer to the payload */
    uint16_t packetLength;
    uint8_t* packetDataPointer;

    /* Sniff command for doing combined Carrier Sense and RX*/
    rfc_CMD_PROP_RX_ADV_t RF_cmdPropRxAdv;
    /***** Prototypes *****/
    static void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e);
    uint8_t packet[PAYLOAD_LENGTH + NUM_APPENDED_BYTES];

    /* RX task function. Executed in Task context when the scheduler starts. */
    void *mainThread(void *arg0)
    {
    RF_Params rfParams;
    RF_Params_init(&rfParams);
    /* Create queue and data entries */
    if (RFQueue_defineQueue(&dataQueue,rxDataEntryBuffer,sizeof(rxDataEntryBuffer),NUM_DATA_ENTRIES,MAX_LENGTH + NUM_APPENDED_BYTES))
    {
    while(1);
    }
    // Modify CMD_PROP_RX command for application needs
    // Set the Data Entity queue for received data
    RF_cmdPropRxAdv.pQueue = &dataQueue;

    // Discard ignored packets from Rx queue
    RF_cmdPropRxAdv.rxConf.bAutoFlushIgnored = 1;

    // Discard packets with CRC error from Rx queue
    RF_cmdPropRxAdv.rxConf.bAutoFlushCrcErr = 1;

    // Implement packet length filtering to avoid PROP_ERROR_RXBUF
    RF_cmdPropRxAdv.maxPktLen = MAX_LENGTH;
    RF_cmdPropRxAdv.pktConf.bRepeatOk = 1;
    RF_cmdPropRxAdv.pktConf.bRepeatNok = 1;
    RF_cmdPropRxAdv.pOutput = (uint8_t*)&rxStatistics;

    // Optional bytes to append:
    RF_cmdPropRxAdv.rxConf.bIncludeCrc = 0x0;
    RF_cmdPropRxAdv.rxConf.bAppendRssi = 0x0;
    RF_cmdPropRxAdv.rxConf.bAppendTimestamp = 0x0;
    RF_cmdPropRxAdv.rxConf.bAppendStatus = 0x0;

    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_cmdPropRxAdv, RF_PriorityNormal, &callback, 0);
    while(1)
    {
    GPIO_toggle(CONFIG_GPIO_RLED);
    usleep(500000);
    }
    }
    /* Called for every received packet and command done */
    void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
    {
    if (e & RF_EventRxEntryDone)
    {
    /* Toggle LED on RX */
    GPIO_toggle(CONFIG_GPIO_GLED);
    currentDataEntry = RFQueue_getDataEntry();

    // Get current unhandled data entry
    currentDataEntry = RFQueue_getDataEntry();

    packetLength = 0x07FF & (((uint16_t)((*(uint8_t*)(&currentDataEntry->data+1)) << 8) |
    (uint16_t)(*(uint8_t*)(&currentDataEntry->data))));
    packetDataPointer = (uint8_t*)(&currentDataEntry->data + SIZE_OF_HEADER);

    // Copy the payload and the status bytes to the packet variable
    memcpy(packet, packetDataPointer, (packetLength + NUM_APPENDED_BYTES));

    RFQueue_nextEntry();

    }
    }

    Please check my RX configuration, RF queue usage, and source code to find the issue.

    Thanks,
    ANBU.