我在使用rfpacketRX端进行debug时,发现在接收的callback停留太久,之后就再也进入不了callback这个函数中了。
void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
{
if (e & RF_EventRxEntryDone)
{
/* Toggle pin to indicate RX */
PIN_setOutputValue(ledPinHandle, Board_PIN_LED2,
!PIN_getOutputValue(Board_PIN_LED2));
/* Get current unhandled data entry */
currentDataEntry = RFQueue_getDataEntry();
/* Handle the packet data, located at ¤tDataEntry->data:
* - Length is the first byte with the current configuration
* - Data starts from the second byte */
packetLength = *(uint8_t*)(¤tDataEntry->data);
packetDataPointer = (uint8_t*)(¤tDataEntry->data + 1);
/* Copy the payload + the status byte to the packet variable */
memcpy(packet, packetDataPointer, (packetLength + 1));
RFQueue_nextEntry();
}
}
1.请问是不是在debug时callback中停留太长的时间,tx在发送,RX接收数据,但没有使用队列中的数据,导致队列溢出?
2.如果在多对一的通信,发送的节点太多,接收端来不及处理,可能导致队列溢出。这样就一直进不了callback中。请问能不能解决这个问题?
在线等!