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?