Part Number:CC1310
RFQueue_defineQueue(dataQueue_t *dataQueue, uint8_t *buf, uint16_t buf_len, uint8_t numEntries, uint16_t length) {if (buf_len < (numEntries * (length + RF_QUEUE_DATA_ENTRY_HEADER_SIZE + RF_QUEUE_QUEUE_ALIGN_PADDING(length)))){/* queue does not fit into buffer */return (1);}/* Padding needed for 4-byte alignment? */uint8_t pad = 4-((length + RF_QUEUE_DATA_ENTRY_HEADER_SIZE)%4);/* Set the Data Entries common configuration */uint8_t *first_entry = buf;int i;for (i = 0; i < numEntries; i++){buf = first_entry + i * (RF_QUEUE_DATA_ENTRY_HEADER_SIZE + length + pad);((rfc_dataEntry_t*)buf)->status= DATA_ENTRY_PENDING;// Pending - starting state((rfc_dataEntry_t*)buf)->config.type= DATA_ENTRY_TYPE_GEN;// General Data Entry((rfc_dataEntry_t*)buf)->config.lenSz = 0;// No length indicator byte in data((rfc_dataEntry_t*)buf)->length= length;// Total length of data field((rfc_dataEntryGeneral_t*)buf)->pNextEntry = &(((rfc_dataEntryGeneral_t*)buf)->data)+length+pad;}/* Make circular Last.Next -> First */((rfc_dataEntry_t*)buf)->pNextEntry = first_entry;/* Create Data Entry Queue and configure for circular buffer Data Entries */dataQueue->pCurrEntry = first_entry;dataQueue->pLastEntry = NULL;/* Set read pointer to first entry */readEntry = (rfc_dataEntryGeneral_t*)first_entry;return (0); }
想要实现高速模式,在rfpacketTx中修改了射频配置(RF_cmdRadioSetup_hsm_4mbps),4M模式可以跑通,想要修改传输队列长度,上面是用到的队列定义,定义中uint16_t length,但是实际传输发现最大长度只能达到256字节,下面是我用串口将其整个队列结构打印出来的内容。
查找手册,数据分别代表的是4字节的*pNextEntry、一个字节的status、一个字节的config和两个字节的length,理论上说队列长度可以达到0xFFFF,但是实际上最多只能0x255。
请问:如何实现队列长度大于0x255?
Kevin Qiu1:
我需要检查一下,预计明天这个时候回复你
,
Kevin Qiu1:
参考这里类似的问题:https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/621271/rtos-launchxl-cc1310-how-to-receive-more-than-254bytes-in-hs-mode