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.

LP-CC1312R7: CC1312R7 Transmit and Receive Data Rate Calculation

Part Number: LP-CC1312R7
Other Parts Discussed in Thread: CC1312R7

Hello everyone,

Transmit and Receive data rates have a difference of exactly /2. I do my calculations like this:

-  1second timer is installed on both systems.

-  callbak interrupt is defined in my RF_runCmd command. and this callback function is processed when the send/receive is completed.

- I collect the received and sent data in a variable every time a callback is invoked.

- I divide these values collected every 1 second by the constant dt and multiply by 8 to convert them to bits.

- In the results, transmit is found at 1mbits, while rx remains at 500kbits. And this rate is always the same.

I cannot receive exactly as much data at the receiver as I sent. And there are serious losses. receive_thread are given below:

Receive_thread;

static RF_Object RFObject;
static RF_Handle rfHandle;
static rfc_dataEntryPointer_t rxEntry;

static dataQueue_t dataQueue;
static rfc_dataEntryGeneral_t *currentDataEntry;
uint8_t packetLength;
uint8_t *packetDataPointer;


void *rf_receiverThread(void *arg0)
{
    RFQueue_defineQueue,rxDataEntryBuffer,sizeof(rxDataEntryBuffer),NUM_DATA_ENTRIES,MAX_LENGTH+NUM_APPEND_BYTES));
    
    RF_cmdPropRxAdv.pQueue = &dataQueue;
    RF_cmdPropRxAdv.rxConf.bAutoFlushIgnored = 1;
    RF_cmdPropRxAdv.rxConf.bAutoFlushCrcErr = 1;
    RF_cmdPropRxAdv.maxPktLen = MAX_LENGTH;
    
    RF_cmdPropRadioDivSetup.formatConf.bMsbFirst = 0;
    RF_cmdPropRadioDivSetup.formatConf.whitenMode = 0;
    
    rfHandle = RF_open(&rfObject, &RF_propFs, RF_PriorityNormal, NULL, 0);
    
    RF_postCmd(rfHandle,(RF_Op*)&RF_cmdFs,RF_PriorityNormal,NULL,0);
    
    while(1)
    {
        RF_runCmd(rfHandle,(RF_Op*)&RF_cmdPropRxAdv,RF_PriorityNormal,&callback,RF_EventRxEntryDone);
    }
    
void callback(RF_handle h,RF_CmdHandle ch, RF_EventMask e)
{
    if (e & RF_EventRxEntryDone)
    {
        currentDataEntry = RFQueue_getDataEntry();
        packetLength = *(uint8_t)(&currentDataEntry->data);
        packetDataPointer = (uint8_t *)(&currentDataEntry->data+1);
        memcpy(packet,packetDataPointer,packetLength+1);
        RFQueue_nextEntry();
        // todo: calculation data_rate += packetLength;
    }
}

}

Sincelery