如标题,我目前使用WOR模式通信,在168K空速,WOR周期为4000ms时间的情况下会出现丢包的情况,而当我将WOR周期时间调小到2000ms或者500ms时,接收效果明显提升,目前对于RF_cmdPropRxSniff的配置如下所示,请问我应该怎么调整我的哪些参数,使其在4000ms时间下能减少丢包。
#define WOR_WAKE_UP_MARGIN_MS 5
#define CMD_PROP_RX_SNIFF 0x3808
RF_cmdPropRxSniff.startTime += (RFEnv.wor.recv_period_ms - WOR_WAKE_UP_MARGIN_MS) * 4000UL;
RF_cmdPropRxSniff.commandNo = CMD_PROP_RX_SNIFF; // Change to RX_SNIFF command from RX command
/* enalbe RSSI and PQT */
RF_cmdPropRxSniff.csConf.bEnaRssi = 0; /* Enable RSSI */
RF_cmdPropRxSniff.csConf.bEnaCorr = 1; /* Enable PQT */
/* General Carrier Sense configuration */
RF_cmdPropRxSniff.csConf.operation = 0; /* Busy if both RSSI and correlation indicates Busy */
RF_cmdPropRxSniff.csConf.busyOp = 0; /* Continue carrier sense on channel Busy */
RF_cmdPropRxSniff.csConf.idleOp = 1; /* End on channel Idle */
RF_cmdPropRxSniff.csConf.timeoutRes = 1; /* If the channel is invalid, it will return PROP_DONE_IDLE_TIMEOUT */
/* RSSI configuration */
RF_cmdPropRxSniff.numRssiIdle = 1; /* One idle RSSI samples signals that the channel is idle */
RF_cmdPropRxSniff.numRssiBusy = 1; /* One busy RSSI samples signals that the channel is busy */
RF_cmdPropRxSniff.rssiThr = (int8_t)WOR_RSSI_THRESHOLD; /* Set the RSSI threshold in dBm */
/* PQT configuration */
RF_cmdPropRxSniff.corrConfig.numCorrInv = 1; /* One busy PQT samples signals that the channel is busy */
RF_cmdPropRxSniff.corrConfig.numCorrBusy = 1; /* One busy PQT samples signals that the channel is busy */
/* Calculate basic timing parameters */
INT32U symbolLengthUs = 1000000UL / radio_rate; // radio period unit microsecond.
INT32U preambleSymbols = (wakeup_period_ms * 1000UL) / symbolLengthUs; // the number of preamble symbols.
INT8U syncWordSymbols = RF_cmdPropRadioDivSetup.formatConf.nSwBits; // the number of sync words.
/* Calculate sniff mode parameters */
#define US_TO_RAT_TICKS 4
#define CORR_PERIOD_SYM_MARGIN 8//16
#define RX_END_TIME_SYM_MARGIN 8
#define CS_END_TIME_MIN_TIME_SYM 30
#define CS_END_TIME_MIN_TIME_STATIC_US 150
/* Represents the time in which we need to receive corrConfig.numCorr* correlation peaks to detect preamble.
* When continously checking the preamble quality, this period has to be wide enough to also contain the sync
* word, with a margin. If it is not, then there is a chance the SNIFF command will abort while receiving the
* sync word, as it no longer detects a preamble. */
INT32U correlationPeriodUs = (syncWordSymbols + CORR_PERIOD_SYM_MARGIN)*symbolLengthUs;
/* Represents the time where we will force a check if preamble is present (only done once).
* The main idea is that his should be shorter than "correlationPeriodUs" so that if we get RSSI valid, but
* there is not a valid preamble on the air, we will leave RX as quickly as possible. */
INT32U csEndTimeUs = (CS_END_TIME_MIN_TIME_SYM*symbolLengthUs + CS_END_TIME_MIN_TIME_STATIC_US);
/* Represents the maximum time from the startTrigger to when we expect a sync word to be received. */
INT32U rxEndTimeUs = (preambleSymbols + syncWordSymbols + RX_END_TIME_SYM_MARGIN)*symbolLengthUs;
/* Set sniff mode timing configuration in sniff command in RAT ticks */
RF_cmdPropRxSniff.corrPeriod = (uint16_t)(correlationPeriodUs * US_TO_RAT_TICKS);
RF_cmdPropRxSniff.csEndTime = (INT32U)(csEndTimeUs * US_TO_RAT_TICKS);
RF_cmdPropRxSniff.endTime = (INT32U)(rxEndTimeUs * US_TO_RAT_TICKS);
/* Set correct trigger types */
RF_cmdPropRxSniff.csEndTrigger.triggerType = TRIG_REL_START; // carrier sense time from command started to csEndTimeUs.
RF_cmdPropRxSniff.endTrigger.triggerType = TRIG_REL_START; // maximum time from command startd to rxEndTimeUs.
RF_cmdPropRxSniff.startTrigger.triggerType = TRIG_ABSTIME; // sinff trigger use absolute time refer to radio RAT.
RF_cmdPropRxSniff.startTrigger.pastTrig = 1;