CC26xx Driver Library
rf_prop_cmd.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: rf_prop_cmd.h
3 * Revised: $ $
4 * Revision: $ $
5 *
6 * Description: CC26xx API for Proprietary mode commands
7 *
8 * Copyright (c) 2015 - 2016, Texas Instruments Incorporated
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions are met:
13 *
14 * 1) Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
16 *
17 * 2) Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 *
21 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 ******************************************************************************/
38 
39 #ifndef __PROP_CMD_H
40 #define __PROP_CMD_H
41 
42 #ifndef __RFC_STRUCT
43 #ifdef __GNUC__
44 #define __RFC_STRUCT __attribute__ ((aligned (4)))
45 #else
46 #define __RFC_STRUCT
47 #endif
48 #endif
49 
52 
55 
56 #include <stdint.h>
57 #include <driverlib/rf_mailbox.h>
59 
69 
72 #define CMD_PROP_TX 0x3801
75  uint16_t commandNo;
76  uint16_t status;
77  rfc_radioOp_t *pNextOp;
81  struct {
82  uint8_t triggerType:4;
83  uint8_t bEnaCmd:1;
84  uint8_t triggerNo:2;
86  uint8_t pastTrig:1;
87  } startTrigger;
89  struct {
90  uint8_t rule:4;
91  uint8_t nSkip:4;
92  } condition;
93  struct {
94  uint8_t bFsOff:1;
95  uint8_t :2;
97  uint8_t bUseCrc:1;
98  uint8_t bVarLen:1;
100  } pktConf;
102  uint8_t pktLen;
103  uint32_t syncWord;
104  uint8_t* pPkt;
105 };
106 
108 
111 #define CMD_PROP_RX 0x3802
114  uint16_t commandNo;
115  uint16_t status;
116  rfc_radioOp_t *pNextOp;
120  struct {
121  uint8_t triggerType:4;
122  uint8_t bEnaCmd:1;
123  uint8_t triggerNo:2;
125  uint8_t pastTrig:1;
126  } startTrigger;
128  struct {
129  uint8_t rule:4;
130  uint8_t nSkip:4;
131  } condition;
132  struct {
133  uint8_t bFsOff:1;
134  uint8_t bRepeatOk:1;
136  uint8_t bRepeatNok:1;
138  uint8_t bUseCrc:1;
140  uint8_t bVarLen:1;
142  uint8_t bChkAddress:1;
144  uint8_t endType:1;
146  uint8_t filterOp:1;
148  } pktConf;
150  struct {
151  uint8_t bAutoFlushIgnored:1;
152  uint8_t bAutoFlushCrcErr:1;
153  uint8_t :1;
154  uint8_t bIncludeHdr:1;
155  uint8_t bIncludeCrc:1;
156  uint8_t bAppendRssi:1;
157  uint8_t bAppendTimestamp:1;
158  uint8_t bAppendStatus:1;
159  } rxConf;
160  uint32_t syncWord;
161  uint8_t maxPktLen;
162  uint8_t address0;
164  uint8_t address1;
165  struct {
167  uint8_t triggerType:4;
168  uint8_t bEnaCmd:1;
169  uint8_t triggerNo:2;
171  uint8_t pastTrig:1;
172  } endTrigger;
176  uint8_t* pOutput;
177 };
178 
180 
183 #define CMD_PROP_TX_ADV 0x3803
186  uint16_t commandNo;
187  uint16_t status;
188  rfc_radioOp_t *pNextOp;
192  struct {
193  uint8_t triggerType:4;
194  uint8_t bEnaCmd:1;
195  uint8_t triggerNo:2;
197  uint8_t pastTrig:1;
198  } startTrigger;
200  struct {
201  uint8_t rule:4;
202  uint8_t nSkip:4;
203  } condition;
204  struct {
205  uint8_t bFsOff:1;
206  uint8_t :2;
208  uint8_t bUseCrc:1;
209  uint8_t bCrcIncSw:1;
211  uint8_t bCrcIncHdr:1;
213  } pktConf;
215  uint8_t numHdrBits;
216  uint16_t pktLen;
217  struct {
218  uint8_t bExtTxTrig:1;
219  uint8_t inputMode:2;
221  uint8_t source:5;
226  } startConf;
227  struct {
228  uint8_t triggerType:4;
229  uint8_t bEnaCmd:1;
230  uint8_t triggerNo:2;
232  uint8_t pastTrig:1;
233  } preTrigger;
236  uint32_t syncWord;
240  uint8_t* pPkt;
241 };
242 
244 
247 #define CMD_PROP_RX_ADV 0x3804
250  uint16_t commandNo;
251  uint16_t status;
252  rfc_radioOp_t *pNextOp;
256  struct {
257  uint8_t triggerType:4;
258  uint8_t bEnaCmd:1;
259  uint8_t triggerNo:2;
261  uint8_t pastTrig:1;
262  } startTrigger;
264  struct {
265  uint8_t rule:4;
266  uint8_t nSkip:4;
267  } condition;
268  struct {
269  uint8_t bFsOff:1;
270  uint8_t bRepeatOk:1;
272  uint8_t bRepeatNok:1;
274  uint8_t bUseCrc:1;
276  uint8_t bCrcIncSw:1;
278  uint8_t bCrcIncHdr:1;
280  uint8_t endType:1;
282  uint8_t filterOp:1;
284  } pktConf;
286  struct {
287  uint8_t bAutoFlushIgnored:1;
288  uint8_t bAutoFlushCrcErr:1;
289  uint8_t :1;
290  uint8_t bIncludeHdr:1;
291  uint8_t bIncludeCrc:1;
292  uint8_t bAppendRssi:1;
293  uint8_t bAppendTimestamp:1;
294  uint8_t bAppendStatus:1;
295  } rxConf;
296  uint32_t syncWord0;
297  uint32_t syncWord1;
298  uint16_t maxPktLen;
299  struct {
301  uint16_t numHdrBits:6;
302  uint16_t lenPos:5;
303  uint16_t numLenBits:5;
304  } hdrConf;
305  struct {
306  uint16_t addrType:1;
307  uint16_t addrSize:5;
309  uint16_t addrPos:5;
311  uint16_t numAddr:5;
313  } addrConf;
314  int8_t lenOffset;
315  struct {
316  uint8_t triggerType:4;
317  uint8_t bEnaCmd:1;
318  uint8_t triggerNo:2;
320  uint8_t pastTrig:1;
321  } endTrigger;
324  uint8_t* pAddr;
326  uint8_t* pOutput;
327 };
328 
330 
333 #define CMD_PROP_RADIO_SETUP 0x3806
336  uint16_t commandNo;
337  uint16_t status;
338  rfc_radioOp_t *pNextOp;
342  struct {
343  uint8_t triggerType:4;
344  uint8_t bEnaCmd:1;
345  uint8_t triggerNo:2;
347  uint8_t pastTrig:1;
348  } startTrigger;
350  struct {
351  uint8_t rule:4;
352  uint8_t nSkip:4;
353  } condition;
354  struct {
355  uint16_t modType:3;
356  uint16_t deviation:13;
359  } modulation;
360  struct {
361  uint32_t preScale:4;
362  uint32_t :4;
363  uint32_t rateWord:21;
364  } symbolRate;
365  uint8_t rxBw;
366  struct {
367  uint8_t nPreamBytes:6;
368  uint8_t preamMode:2;
370  } preamConf;
374  struct {
375  uint16_t nSwBits:6;
376  uint16_t bBitReversal:1;
377  uint16_t bMsbFirst:1;
379  uint16_t fecMode:4;
381  uint16_t bOuterCode:1;
384  uint16_t whitenMode:2;
385  uint16_t bAgcDisable:1;
389  } formatConf;
390  struct {
391  uint16_t frontEndMode:3;
392  uint16_t biasMode:1;
398  uint16_t analogCfgMode:6;
400  uint16_t bNoFsPowerUp:1;
407  } config;
409  uint16_t txPower;
410  uint32_t* pRegOverride;
411 };
412 
414 
417 #define CMD_PROP_SET_LEN 0x3401
420  uint16_t commandNo;
421  uint16_t rxLen;
422 };
423 
425 
428 #define CMD_PROP_RESTART_RX 0x3402
431  uint16_t commandNo;
432 };
433 
435 
439 
441  uint16_t nRxOk;
442  uint16_t nRxNok;
443  uint8_t nRxIgnored;
444  uint8_t nRxStopped;
445  uint8_t nRxBufFull;
446  int8_t lastRssi;
448 };
449 
451 
455 
457  struct {
458  uint8_t addressInd:5;
459  uint8_t syncWordId:1;
460  uint8_t result:2;
461  } status;
465 };
466 
468 
471 #endif
uint32_t syncWord1
Alternative sync word if non-zero.
Definition: rf_prop_cmd.h:297
uint16_t status
An integer telling the status of the command. This value is updated by the radio CPU during operation...
Definition: rf_prop_cmd.h:337
uint8_t * pOutput
Pointer to output structure.
Definition: rf_prop_cmd.h:326
uint8_t pktLen
Packet length.
Definition: rf_prop_cmd.h:102
ratmr_t preTime
Time used together with preTrigger for transition from preamble to sync word. If preTrigger.triggerType is set to "now", one preamble as configured in the setup will be sent. Otherwise, the preamble will be repeated until this trigger is observed.
Definition: rf_prop_cmd.h:235
uint8_t address1
Address (set equal to address0 to accept only one address. If 0xFF, accept 0x00 as well) ...
Definition: rf_prop_cmd.h:164
ratmr_t startTime
Absolute or relative start time (depending on the value of startTrigger)
Definition: rf_prop_cmd.h:255
uint8_t * pPkt
Pointer to packet.
Definition: rf_prop_cmd.h:104
uint16_t nRxOk
Number of packets that have been received with payload, CRC OK and not ignored.
Definition: rf_prop_cmd.h:441
uint16_t commandNo
The command ID number 0x3801.
Definition: rf_prop_cmd.h:75
uint16_t status
An integer telling the status of the command. This value is updated by the radio CPU during operation...
Definition: rf_prop_cmd.h:76
Set Packet Length Command.
Definition: rf_prop_cmd.h:419
struct __RFC_STRUCT rfc_propRxStatus_s rfc_propRxStatus_t
Definition: rf_prop_cmd.h:68
struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s rfc_CMD_PROP_TX_ADV_t
Definition: rf_prop_cmd.h:62
#define __RFC_STRUCT
Definition: rf_prop_cmd.h:46
uint8_t nRxBufFull
Number of packets that have been received and discarded due to lack of buffer space.
Definition: rf_prop_cmd.h:445
uint16_t commandNo
The command ID number 0x3402.
Definition: rf_prop_cmd.h:431
uint16_t maxPktLen
Packet length for fixed length, maximum packet length for variable length 0: Unlimited or unknown le...
Definition: rf_prop_cmd.h:298
ratmr_t endTime
Time used together with endTrigger for ending the operation.
Definition: rf_prop_cmd.h:323
int8_t lastRssi
RSSI of last received packet.
Definition: rf_prop_cmd.h:446
uint8_t nRxIgnored
Number of packets that have been received with CRC OK and ignored due to address mismatch.
Definition: rf_prop_cmd.h:443
Proprietary Mode Advanced Transmit Command.
Definition: rf_prop_cmd.h:185
struct __RFC_STRUCT rfc_radioOp_s rfc_radioOp_t
Definition: rf_common_cmd.h:60
ratmr_t startTime
Absolute or relative start time (depending on the value of startTrigger)
Definition: rf_prop_cmd.h:119
ratmr_t startTime
Absolute or relative start time (depending on the value of startTrigger)
Definition: rf_prop_cmd.h:191
uint16_t commandNo
The command ID number 0x3802.
Definition: rf_prop_cmd.h:114
Proprietary Mode Radio Setup Command.
Definition: rf_prop_cmd.h:335
uint16_t commandNo
The command ID number 0x3804.
Definition: rf_prop_cmd.h:250
uint8_t * pOutput
Pointer to output structure.
Definition: rf_prop_cmd.h:176
uint16_t nRxNok
Number of packets that have been received with CRC error.
Definition: rf_prop_cmd.h:442
Proprietary Mode Receive Command.
Definition: rf_prop_cmd.h:113
struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s rfc_CMD_PROP_RESTART_RX_t
Definition: rf_prop_cmd.h:66
struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s rfc_CMD_PROP_RADIO_SETUP_t
Definition: rf_prop_cmd.h:64
ratmr_t startTime
Absolute or relative start time (depending on the value of startTrigger)
Definition: rf_prop_cmd.h:341
struct __RFC_STRUCT rfc_CMD_PROP_RX_s rfc_CMD_PROP_RX_t
Definition: rf_prop_cmd.h:61
uint8_t maxPktLen
Packet length for fixed length, maximum packet length for variable length 0: Unlimited or unknown le...
Definition: rf_prop_cmd.h:161
ratmr_t endTime
Time used together with endTrigger for ending the operation.
Definition: rf_prop_cmd.h:174
uint16_t pktLen
Packet length. 0: Unlimited.
Definition: rf_prop_cmd.h:216
uint8_t * pPkt
Pointer to packet, or TX queue for unlimited length.
Definition: rf_prop_cmd.h:240
uint32_t * pRegOverride
Pointer to a list of hardware and configuration registers to override. If NULL, no override is used...
Definition: rf_prop_cmd.h:410
uint32_t syncWord
Sync word to listen for.
Definition: rf_prop_cmd.h:160
struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s rfc_CMD_PROP_RX_ADV_t
Definition: rf_prop_cmd.h:63
dataQueue_t * pQueue
Pointer to receive queue.
Definition: rf_prop_cmd.h:175
uint32_t ratmr_t
Type definition for RAT.
Definition: rf_mailbox.h:58
Proprietary Mode Transmit Command.
Definition: rf_prop_cmd.h:74
uint16_t status
An integer telling the status of the command. This value is updated by the radio CPU during operation...
Definition: rf_prop_cmd.h:251
int8_t lenOffset
Signed value to add to length field.
Definition: rf_prop_cmd.h:314
uint16_t rxLen
Payload length to use.
Definition: rf_prop_cmd.h:421
Restart Packet Command.
Definition: rf_prop_cmd.h:430
uint8_t * pAddr
Pointer to address list.
Definition: rf_prop_cmd.h:324
uint16_t status
An integer telling the status of the command. This value is updated by the radio CPU during operation...
Definition: rf_prop_cmd.h:115
uint8_t nRxStopped
Number of packets not received due to illegal length or address mismatch with pktConf.filterOp = 1.
Definition: rf_prop_cmd.h:444
uint32_t syncWord
Sync word to transmit.
Definition: rf_prop_cmd.h:103
struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s rfc_CMD_PROP_SET_LEN_t
Definition: rf_prop_cmd.h:65
struct __RFC_STRUCT rfc_propRxOutput_s rfc_propRxOutput_t
Definition: rf_prop_cmd.h:67
ratmr_t startTime
Absolute or relative start time (depending on the value of startTrigger)
Definition: rf_prop_cmd.h:80
ratmr_t timeStamp
Time stamp of last received packet.
Definition: rf_prop_cmd.h:447
uint16_t commandNo
The command ID number 0x3803.
Definition: rf_prop_cmd.h:186
uint16_t commandNo
The command ID number 0x3806.
Definition: rf_prop_cmd.h:336
Type definition for a data queue.
Definition: rf_mailbox.h:63
uint8_t numHdrBits
Number of bits in header (0–32)
Definition: rf_prop_cmd.h:215
dataQueue_t * pQueue
Pointer to receive queue.
Definition: rf_prop_cmd.h:325
uint8_t rxBw
Receiver bandwidth.
Definition: rf_prop_cmd.h:365
uint16_t status
An integer telling the status of the command. This value is updated by the radio CPU during operation...
Definition: rf_prop_cmd.h:187
Proprietary Mode Advanced Receive Command.
Definition: rf_prop_cmd.h:249
uint16_t commandNo
The command ID number 0x3401.
Definition: rf_prop_cmd.h:420
uint32_t syncWord0
Sync word to listen for.
Definition: rf_prop_cmd.h:296
uint16_t txPower
Transmit power.
Definition: rf_prop_cmd.h:409
struct __RFC_STRUCT rfc_CMD_PROP_TX_s rfc_CMD_PROP_TX_t
Definition: rf_prop_cmd.h:60