SDAA260 April 2026 CC1310 , CC1311P3 , CC1312PSIP , CC1312R , CC1312R7 , CC1314R10 , CC1350 , CC1352P , CC1352P7 , CC1352R , CC1354P10 , CC1354R10
In some cases, the user would want to use the advanced command to transmit a packet, even if the packet format is the standard one. This could be because they eventually want to transmit a longer preamble than what is supported by the standard TX command, for example in a Sniff Mode application.
Both SysConfig (3) and SmartRF Studio (2) support importing and exporting other commands than what is used for a PHY by default. Figure 2-2 shows how to select extra commands to be imported to a project using SysConfig, and Figure 2-3 shows how this is done with code exports using SmartRF Studio.
Figure 2-2 Importing the Advanced TX
Command in addition to the Standard Command in SysConfig
Figure 2-3 Exporting the Advanced TX
Command in addition to the Standard Command in SmartRF StudioSmartRF Studio and SysConfig are not giving the exact same settings when adding an extra command like this, so the code example is written to cover both cases. When using the advanced TX command, the length byte must be manually written to the packet together with the payload, and the .pktLen field of the command must include both the length field and the payload length. A code example is shown below.
1: //---------------------------------------------------------------------------------------------
2: // Transmit Standard Packet Format with CMD_PROP_TX_ADV (1 Length Byte)
3: //---------------------------------------------------------------------------------------------
4:
5: // Defines
6: #define PAYLOAD_LENGTH 3 // Max 255 bytes
7: #define LENGTH_FIELD 1
8:
9: uint8_t packet[LENGTH_FIELD + PAYLOAD_LENGTH];
10:
11: static RF_Object rfObject;
12: static RF_Handle rfHandle;
13:
14: void *mainThread(void *arg0)
15: {
16: RF_Params rfParams;
17: RF_Params_init(&rfParams);
18:
19: RF_cmdPropTxAdv.numHdrBits = 0x0; // Settings that must change to support
20: // the standard packet format
21:
22: RF_cmdPropTxAdv.pktLen = LENGTH_FIELD + PAYLOAD_LENGTH; // Application specific settings
23: RF_cmdPropTxAdv.pPkt = packet;
24:
25: // Settings to modify if going from a PHY that uses the standard TX command
26: // to use the advanced TX command
27: RF_cmdPropTxAdv.condition.rule = 0x1;
28: RF_cmdPropTxAdv.pktConf.bUseCrc = 0x1;
29:
30: rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup,
31: &rfParams);
31: RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
32:
33: while(1)
34: {
35: //-------------------------------------------------------------------------------------
36: // Could be placed outside the while(1) since the packet does not change
37: packet[0] = PAYLOAD_LENGTH;
38:
39: for (uint16_t i = 1; i < (LENGTH_FIELD + PAYLOAD_LENGTH); i++)
40: {
41: packet[i] = i;
42: }
43: //-------------------------------------------------------------------------------------
44: RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);
45: RF_yield(rfHandle);
46: usleep(500000);
47: }
48: }