Other Parts Discussed in Thread: CC1101, , CC1020
Tool/software: TI-RTOS
I want to use the Carrier-Sense command to scan multiple channels for activity using the RSSI threshold. In order to know what is a reasonable threshold to use I need some feedback on the detected RSSI on the channel.
Currently I have set up a command chain that looks like this:
CMD_FS [Set the channel frequency] -> CMD_CS [wait up to 2 ms if IDLE, exit as soon as it is BUSY] -> CMD_GET_RSSI [Immediate command] -> CMD_FS_OFF[turn off the radio]
This is executed via the RF_runCmd function in a TIRTOS thread.
My problem is that all of the RSSI measurements come back with a value of -128 (0xFF80).
Is there a way to get the RSSI data I need using a command chain like this, or do I need to figure out how to do it asynchronously?
The parameters of the CMD_CS command is:
static rfc_CMD_PROP_CS_t RF_Scan_cmdCs =
{
.commandNo = CMD_PROP_CS,
.status = 0x0000,
.pNextOp = (rfc_radioOp_t *) &RF_Scan_cmdReadRSSI,
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = COND_ALWAYS,
.condition.nSkip = 0x0,
.csFsConf = 0, // keep the RF on, independent of a carrier detect
.csConf.bEnaRssi = 1,
.csConf.bEnaCorr = 0,
.csConf.operation = 0,
.csConf.busyOp = 1, // halt Carrier detect if we detect a busy condition
.csConf.idleOp = 0, // Keep scanning as long as it is idle
.csConf.timeoutRes = 1, // if we timeout, treat invalid result as Idle
.rssiThr = -100, // start with an RSSI threshold of -60 dB
.numRssiIdle = 2,
.numRssiBusy = 2,
// Set the end trigger for 2 ms after we start the carrier detect operation.
.csEndTrigger.triggerType = TRIG_REL_START,
.csEndTime = 8000,
};