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.

cc2650: Use Partial Read RX Entries to set packet length after start of receive.

Part Number: CC2650

I need to receive packets using a proprietary format where the packet length is determined by information in the first few bytes of the packet. I have set up a receive buffer queue using Partial Read RX Entries, each of which has a length big enough to hold the biggest possible packet. In my read command I set maxPktLen to 0 and enable a RX_N_DATA_WRITTEN interrupt.

This all works for my first packet: in the RX_N_DATA_WRITTEN interrupt I can calculate the packet length based on the first few bytes and issue a CMD_PROP_SET_LEN command. I then receive an RX_OK interrupt when the required bytes have been received. Checks show that the received data is as expected.

At this point, the head of the receive buffer queue has a partial entry whose data-entry status is DATA_ENTRY_ACTIVE and whose pktStatus field shows a single element corresponding to the packet I have received. I do not want to handle packets flowing from one buffer to another but need my next received packet to start in a new buffer. How can I do this?

I have tried issuing a CMD_REMOVE_DATA_ENTRY command pointing to the receive buffer queue. This command does not complete (RF_CMD_ACK is not raised within 500µs - is the radio processor waiting for something?).

I tried manipulating the receive buffer queue directly so on the next CMD_PROP_RX the queue pointed to has a fresh buffer but the radio processor ignores this and continues to fill the previous buffer.

What am I missing? How do I tell the radio processor to start with a fresh partial Rx entry on a new receive command?

  • Hi FI and thanks for the pointer.

    Unfortunately it does not tell me anything that I haven't found in the TRM. My specific problems are with the Data Queue Manipulation commands not working (CMD_REMOVE_DATA_ENTRY, CMD_CLEAR_RX, etc.) and these don't appear in a search of the online users guide.

  • Tiquery: Is this still an open issue?
  • Hi TER, Yes it is.

    I have worked around it for now by allowing packets to flow from one buffer to the next. However, it took a lot of work to get the tracking of where the data has gone right and it would simplify the code greatly if I could simply tell the radio to start a new buffer after each packet.

  • This is not possible with the partial read entries. they will fill need to be filled up before moving to the next entry.

    If you are not using repeat mode so that you know that you have time  empty your data entry before receiving the next packet, you can implement a "queue" with only one entry. That way your packets will always start from the beginning of the data entry.

    partialReadEntry1->length = MAX_LENGTH + LENGTH_POSITION + APPENDED_BYTES + 4;
    partialReadEntry1->config.irqIntv = LENGTH_POSITION;
    partialReadEntry1->config.type = DATA_ENTRY_TYPE_PARTIAL;
    partialReadEntry1->status = DATA_ENTRY_PENDING;
    
    partialReadEntry1->pNextEntry = (uint8_t*)partialReadEntry1;
    
    dataQueue.pCurrEntry = (uint8_t*)partialReadEntry1;
    dataQueue.pLastEntry = NULL;
    .
    .
    .
    

    and in the callback when your packet is received:

    partialReadEntry1->status = DATA_ENTRY_PENDING;

  • Thank you, I will try this as soon as I get a chance.