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.

rfpacket例程相关问题

我在使用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 &currentDataEntry->data:
         * - Length is the first byte with the current configuration
         * - Data starts from the second byte */
        packetLength      = *(uint8_t*)(&currentDataEntry->data);
        packetDataPointer = (uint8_t*)(&currentDataEntry->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中。请问能不能解决这个问题?

在线等!