Other Parts Discussed in Thread: SIMPLICITI
I am trying to use CMD_PROP_CS command to tell me IDLE or BUSY after a reasonable amount of time (e.g. 8 symbols worth).
Here is my current understanding of how I need to fill in rfc_CMD_PROP_CS_t (using rfListenBeforeTalk example as a starting place):
rfc_CMD_PROP_CS_t RF_cmdPropCs =
{
.commandNo = CMD_PROP_CS,
.status = 0x0000,
.pNextOp = 0,
.startTime = 0x00000000,
.startTrigger.triggerType = TRIG_NOW,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = COND_NEVER, // Do not run a next command
// End causes for the CMD_PROP_CS command:
// Observed channel state Busy with csConf.busyOp = 1: PROP_DONE_BUSY TRUE
// 0bserved channel state Idle with csConf.idleOp = 1: PROP_DONE_IDLE FALSE
// Timeout trigger observed with channel state Busy: PROP_DONE_BUSY TRUE
// Timeout trigger observed with channel state Idle: PROP_DONE_IDLE FALSE
// Timeout trigger observed with channel state Invalid and csConf.timeoutRes = 0:
// PROP_DONE_BUSYTIMEOUT TRUE
// Received CMD_STOP after command started: PROP_DONE_STOPPED FALSE
.condition.nSkip = 0x0, // Not used (rule does not involve skipping)
.csFsConf.bFsOffIdle = 0x0, // Keep synthesizer running if command ends with channel Idle
.csFsConf.bFsOffBusy = 0x0, // Keep synthesizer running if command ends with Busy
.__dummy0 = 0x00,
.csConf.bEnaRssi = 0x1, // Enable RSSI as a criterion
.csConf.bEnaCorr = 0x0, // Disable correlation (PQT) as a criterion
.csConf.operation = 0x0, // Busy if either RSSI or correlation indicates Busy
.csConf.busyOp = 0x1, // End carrier sense on channel Busy
.csConf.idleOp = 0x1, // End carrier sense on channel Idle
.csConf.timeoutRes = 0x0, // Timeout with channel state Invalid treated as Busy
.rssiThr = -90, // Set the RSSI threshold in the application
.numRssiIdle = 0x4, // Number of consecutive RSSI measurements - 1 below the threshold
// before the channel is Idle
.numRssiBusy = 0x4, // Number of consecutive RSSI measurements -1 above the threshold
// before the channel is Busy
.corrPeriod = 0x0000, // N/A since .csConf.bEnaCorr = 0
.corrConfig.numCorrInv = 0x0, // N/A since .csConf.bEnaCorr = 0
.corrConfig.numCorrBusy = 0x0, // N/A since .csConf.bEnaCorr = 0
.csEndTrigger.triggerType = TRIG_REL_START, // Trigs at a time relative to the command started
.csEndTrigger.bEnaCmd = 0x0,
.csEndTrigger.triggerNo = 0x0,
.csEndTrigger.pastTrig = 0x0,
.csEndTime = <radio-tics>, // Set the CS end time in the application
};
<radio-tics> = microseconds * 4, where microseconds should be the maximum time to wait.
Here is what happens (I think):
- If 4 consecutive symbols come in above or below the threshold, CMD_PROP_CS will end with PROP_DONE_BUSY or PROP_DONE_IDLE.
- If 4 consecutive symbols do not occur above or below the threshold within <radio-tics>, CMD_PROP_CS will end with PROP_DONE_BUSYTIMEOUT
Question:
- Is there a way to get CMD_PROP_CS to report 4 symbols above/below threshold without having to give an csEndTime?
- If I need to give a csEndTime (otherwise, CMD_PROP_CS could possibly hang), how do I calculate this time for FSK, LRM, and HighSpeed?
-
- I want to set the csEndTime to be about 8 symbols worth for FSK, LRM, and HighSpeed. How do I do this?
- For example, with 2-GFSK@50Kbps waiting 8 symbols for CMD_PROP_CS would be as follows:
- 1bit/symbol gives 20us/symbol. For 8 symbols, microseconds = 8 * 20 = 160us. Thus, <radio-tics> = 160 * 4. Is this a correct for csEndTime?.
- How do I do equivalent calculations for LRM or HighSpeed? What is the bit-encoding?
