Other Parts Discussed in Thread: CC1352P7
Tool/software:
Environment
- Device: CC1352P7
- SDK: SimpleLink SDK 8.30
- RF Mode: Proprietary Sub-1 GHz (868 MHz)
- Configuration: 1 Mbps, 350 kHz Deviation, 2-GFSK, 2.2 MHz RX Bandwidth
We're having issues with TX-RX command chains. The TX-only and RX-only operations work perfectly, but when chaining TX->RX commands, the RX portion never receives data, even though we know the remote device is transmitting. Our protocol requires the RX window to open shortly(with small delay) after TX completes.
Test Scenario
- Device A : Sends a request packet, then immediately listens for response packet using TX-RX chain
- Device B : Receives packet correctly, immediately sends response packet
- Issue: Device A completes the chain (EVT_CHAIN_DONE) but never receives the connection request packet
static int radio_start_tx_rx_chain(void) { /* Reset command status */ RF_cmdPropTx.status = 0; RF_cmdPropRx.status = 0; /* Configure TX */ RF_cmdPropTx.pPkt = g_radio.current_op.tx_data; RF_cmdPropTx.pktLen = g_radio.current_op.tx_length; RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW; RF_cmdPropTx.startTrigger.pastTrig = 1; RF_cmdPropTx.pNextOp = (RF_Op*)&RF_cmdPropRx; RF_cmdPropTx.condition.rule = COND_ALWAYS; /* Configure RX */ RF_cmdPropRx.maxPktLen = RADIO_MAX_PACKET_LEN; RF_cmdPropRx.pQueue = &g_radio.rx_data_queue; RF_cmdPropRx.startTrigger.triggerType = TRIG_NOW; RF_cmdPropRx.startTrigger.pastTrig = 1; RF_cmdPropRx.endTrigger.triggerType = TRIG_REL_START; RF_cmdPropRx.endTime = 8000; // 2ms window RF_cmdPropRx.pNextOp = NULL; RF_cmdPropRx.condition.rule = COND_NEVER; /* Reset RX queue */ g_radio.rx_data_entry.status = DATA_ENTRY_PENDING; /* Post chain */ g_radio.cmd_handle = RF_postCmd(g_radio.rf_handle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, radio_rf_callback, RF_EventLastCmdDone); return (g_radio.cmd_handle >= 0) ? 0 : -1; }
static int radio_start_rx(void) { /* Reset RX data entry */ g_radio.rx_data_entry.status = DATA_ENTRY_PENDING; /* Use global RF_cmdPropRx, not cmd_rx_adv */ RF_cmdPropRx.status = 0; RF_cmdPropRx.maxPktLen = RADIO_MAX_PACKET_LEN; RF_cmdPropRx.pQueue = &g_radio.rx_data_queue; /* Configure what gets appended */ RF_cmdPropRx.rxConf.bAutoFlushIgnored = 1; RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 1; RF_cmdPropRx.rxConf.bIncludeHdr = 1; /* Include length byte */ RF_cmdPropRx.rxConf.bIncludeCrc = 0; /* Don't include CRC */ RF_cmdPropRx.rxConf.bAppendRssi = 1; /* Append RSSI */ RF_cmdPropRx.rxConf.bAppendTimestamp = 1; /* Append timestamp */ RF_cmdPropRx.rxConf.bAppendStatus = 1; /* Append status */ /* Keep RX on for multiple packets */ RF_cmdPropRx.pktConf.bRepeatOk = 1; RF_cmdPropRx.pktConf.bRepeatNok = 1; if (g_radio.current_op.rx_timeout_rat > 0) { RF_cmdPropRx.endTrigger.triggerType = TRIG_REL_START; RF_cmdPropRx.endTime = g_radio.current_op.rx_timeout_rat; } else { RF_cmdPropRx.endTrigger.triggerType = TRIG_NEVER; } /* Post RX command directly (no chaining) */ g_radio.cmd_handle = RF_postCmd(g_radio.rf_handle, (RF_Op*)&RF_cmdPropRx, RF_PriorityNormal, radio_rf_callback, RF_EventRxEntryDone | RF_EventLastCmdDone); if (g_radio.cmd_handle < 0) { g_radio.state = RADIO_STATE_IDLE; return -1; } return 0; }
static int radio_start_tx(void) { /* Prepare TX packet with length byte */ g_radio.tx_packet[0] = g_radio.current_op.tx_length; memcpy(&g_radio.tx_packet[1], g_radio.current_op.tx_data, g_radio.current_op.tx_length); /* Reset global commands */ RF_cmdPropTx.status = 0; RF_cmdPropRx.status = 0; RF_cmdPropTx.pPkt = g_radio.current_op.tx_data; RF_cmdPropTx.pktLen = g_radio.current_op.tx_length; RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW; RF_cmdPropTx.startTrigger.pastTrig = 1; RF_cmdPropTx.pNextOp = NULL; RF_cmdPropTx.condition.rule = COND_ALWAYS; /* Post chain */ g_radio.cmd_handle = RF_postCmd(g_radio.rf_handle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, radio_rf_callback, RF_EventLastCmdDone); return (g_radio.cmd_handle >= 0) ? 0 : -1; }
Questions
- Is there a specific configuration required for TX-RX chains in proprietary mode that differs from the examples?
- Are there timing constraints between TX end and RX start that we should be aware of?
- Should we be using CMD_PROP_TX_ADV/CMD_PROP_RX_ADV instead of the basic commands?
- Is there a minimum or maximum gap required between TX and RX in a chain?
- Most importantly: Are there any reference examples of TX->RX command chains in proprietary mode? We've searched the SDK but only found TX-only chains and RX-only operations.
Any guidance on proper TX-RX chain configuration for proprietary mode would be greatly appreciated. We specifically need the RX to start immediately after TX completes to implement our protocol correctly.