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.

[参考译文] CC1352R:RF RX 数据包接收失败、并返回 PROP_DONE_END 状态。

Guru**** 2478765 points
Other Parts Discussed in Thread: CC1352R

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1345102/cc1352r-rf-rx-packet-reception-failures-and-returns-status-as-prop_done_ended

器件型号:CC1352R

如何避免"在 RF 数据包接收期间终端触发后操作停止"。 在随机情况下、cc1352r 会 由于 PROP_DONE_END 而出现接收失败。

这是否与 端型 触发器类型 ? 如果需要、请告诉我配置以避免此类故障。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    为了帮助您正确设置命令、我需要知道您希望 RX 如何工作。

    RX 应何时结束?

    从不使用?

    会发生什么情况?

    是否会恢复数据?

    时间后?

    如果您采用 SDK 中的 rfPacketRX 示例、则它配置为始终处于 RX 状态、只有在发生错误或手动发送命令以中止/停止 RX 时才会退出。

    Siri  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    经过一段固定的时间间隔(以秒为单位)、我将去接收 Rx 8次并具有10ms 的 Rx 超时(每次尝试)。 8次接收尝试达到后、我将停止 RF Rx、然后继续执行相同操作。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    不确定您是希望在 RX 中始终运行8次、还是仅在未接收到数据包时运行8次。

    不管怎样、你希望使用下面的代码作为起始点。 它基于 rfPacketRX 示例。  

    对讲机将每2秒进入 RX 8次(10ms)。如果收到数据包、例如第5次重试、对讲机将不会再次进入 RX、但会再等待2秒:

    void *mainThread(void *arg0)
    {
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        GPIO_setConfig(CONFIG_GPIO_RLED, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
        GPIO_write(CONFIG_GPIO_RLED, CONFIG_GPIO_LED_OFF);
    
        if( RFQueue_defineQueue(&dataQueue,
                                rxDataEntryBuffer,
                                sizeof(rxDataEntryBuffer),
                                NUM_DATA_ENTRIES,
                                MAX_LENGTH + NUM_APPENDED_BYTES))
        {
            /* Failed to allocate space for all data entries */
            while(1);
        }
    
        /* Modify CMD_PROP_RX command for application needs */
        /* Set the Data Entity queue for received data */
        RF_cmdPropRx.pQueue = &dataQueue;
        /* Discard ignored packets from Rx queue */
        RF_cmdPropRx.rxConf.bAutoFlushIgnored = 1;
        /* Discard packets with CRC error from Rx queue */
        RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 1;
        /* Implement packet length filtering to avoid PROP_ERROR_RXBUF */
        RF_cmdPropRx.maxPktLen = MAX_LENGTH;
        RF_cmdPropRx.pktConf.bRepeatOk = 0;
        RF_cmdPropRx.pktConf.bRepeatNok = 0;
    
        RF_cmdPropRx.endTrigger.triggerType = TRIG_REL_START;
        RF_cmdPropRx.endTime = (uint32_t)(4000000*(0.01f)); // Stay in RX for 10 ms
    
        /* Request access to the radio */
        rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    
        /* Set the frequency */
        RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
    
        while(true)
        {
            sleep(2); // Set to a desired interval
    
            // Enter RX 8 times and stay in RX 10 ms every time
            // If a packet is received with CRC OK, it is not necessary to enter RX again
            for(i = 0; i < 8; i++)
            {
                RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx, RF_PriorityNormal, &callback, RF_EventRxEntryDone);
    
                uint32_t cmdStatus = ((volatile RF_Op*)&RF_cmdPropRx)->status;
                switch(cmdStatus)
                {
                    case PROP_DONE_OK:
                        // Packet received with CRC OK
                        // Set i = 8 to avoid re-starting RX again since packet is received
                        i = 8;
                        GPIO_toggle(CONFIG_GPIO_RLED);
                        break;
                    case PROP_DONE_RXERR:
                        // Packet received with CRC error
                        break;
                    case PROP_DONE_RXTIMEOUT:
                        // Observed end trigger while in sync search
                        break;
                    case PROP_DONE_BREAK:
                        // Observed end trigger while receiving packet when the command is
                        // configured with endType set to 1
                        break;
                    case PROP_DONE_ENDED:
                        // Received packet after having observed the end trigger; if the
                        // command is configured with endType set to 0, the end trigger
                        // will not terminate an ongoing reception
                        break;
                    case PROP_DONE_STOPPED:
                        // received CMD_STOP after command started and, if sync found,
                        // packet is received
                        break;
                    case PROP_DONE_ABORT:
                        // Received CMD_ABORT after command started
                        break;
                    case PROP_ERROR_RXBUF:
                        // No RX buffer large enough for the received data available at
                        // the start of a packet
                        break;
                    case PROP_ERROR_RXFULL:
                        // Out of RX buffer space during reception in a partial read
                        break;
                    case PROP_ERROR_PAR:
                        // Observed illegal parameter
                        break;
                    case PROP_ERROR_NO_SETUP:
                        // Command sent without setting up the radio in a supported
                        // mode using CMD_PROP_RADIO_SETUP or CMD_RADIO_SETUP
                        break;
                    case PROP_ERROR_NO_FS:
                        // Command sent without the synthesizer being programmed
                        break;
                    case PROP_ERROR_RXOVF:
                        // RX overflow observed during operation
                        break;
                    default:
                        // Uncaught error event - these could come from the
                        // pool of states defined in rf_mailbox.h
                        while(1);
                }
            }
        }
    }

    Siri