1 /****************************************************************************** 2 * Filename: rf_common_cmd.h 3 * 4 * Description: CC13x2/CC26x2 API for common/generic commands 5 * 6 * Copyright (c) 2015 - 2020, Texas Instruments Incorporated 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * 1) Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * 15 * 2) Redistributions in binary form must reproduce the above copyright notice, 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materials provided with the distribution. 18 * 19 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 20 * be used to endorse or promote products derived from this software without 21 * specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. 34 * 35 ******************************************************************************/ 36 37 #ifndef __COMMON_CMD_H 38 #define __COMMON_CMD_H 39 40 #ifndef __RFC_STRUCT 41 #define __RFC_STRUCT 42 #endif 43 44 #ifndef __RFC_STRUCT_ATTR 45 #if defined(__GNUC__) 46 #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4))) 47 #elif defined(__TI_ARM__) 48 #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4))) 49 #else 50 #define __RFC_STRUCT_ATTR 51 #endif 52 #endif 53 54 //! \addtogroup rfc 55 //! @{ 56 57 //! \addtogroup common_cmd 58 //! @{ 59 60 #include <stdint.h> 61 #include "rf_mailbox.h" 62 63 typedef struct __RFC_STRUCT rfc_command_s rfc_command_t; 64 typedef struct __RFC_STRUCT rfc_radioOp_s rfc_radioOp_t; 65 typedef struct __RFC_STRUCT rfc_CMD_NOP_s rfc_CMD_NOP_t; 66 typedef struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s rfc_CMD_RADIO_SETUP_t; 67 typedef struct __RFC_STRUCT rfc_CMD_FS_s rfc_CMD_FS_t; 68 typedef struct __RFC_STRUCT rfc_CMD_FS_OFF_s rfc_CMD_FS_OFF_t; 69 typedef struct __RFC_STRUCT rfc_CMD_RX_TEST_s rfc_CMD_RX_TEST_t; 70 typedef struct __RFC_STRUCT rfc_CMD_TX_TEST_s rfc_CMD_TX_TEST_t; 71 typedef struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s rfc_CMD_SYNC_STOP_RAT_t; 72 typedef struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s rfc_CMD_SYNC_START_RAT_t; 73 typedef struct __RFC_STRUCT rfc_CMD_RESYNC_RAT_s rfc_CMD_RESYNC_RAT_t; 74 typedef struct __RFC_STRUCT rfc_CMD_COUNT_s rfc_CMD_COUNT_t; 75 typedef struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s rfc_CMD_FS_POWERUP_t; 76 typedef struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s rfc_CMD_FS_POWERDOWN_t; 77 typedef struct __RFC_STRUCT rfc_CMD_SCH_IMM_s rfc_CMD_SCH_IMM_t; 78 typedef struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s rfc_CMD_COUNT_BRANCH_t; 79 typedef struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s rfc_CMD_PATTERN_CHECK_t; 80 typedef struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_PA_s rfc_CMD_RADIO_SETUP_PA_t; 81 typedef struct __RFC_STRUCT rfc_CMD_ABORT_s rfc_CMD_ABORT_t; 82 typedef struct __RFC_STRUCT rfc_CMD_STOP_s rfc_CMD_STOP_t; 83 typedef struct __RFC_STRUCT rfc_CMD_GET_RSSI_s rfc_CMD_GET_RSSI_t; 84 typedef struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s rfc_CMD_UPDATE_RADIO_SETUP_t; 85 typedef struct __RFC_STRUCT rfc_CMD_TRIGGER_s rfc_CMD_TRIGGER_t; 86 typedef struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s rfc_CMD_GET_FW_INFO_t; 87 typedef struct __RFC_STRUCT rfc_CMD_START_RAT_s rfc_CMD_START_RAT_t; 88 typedef struct __RFC_STRUCT rfc_CMD_PING_s rfc_CMD_PING_t; 89 typedef struct __RFC_STRUCT rfc_CMD_READ_RFREG_s rfc_CMD_READ_RFREG_t; 90 typedef struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s rfc_CMD_ADD_DATA_ENTRY_t; 91 typedef struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s rfc_CMD_REMOVE_DATA_ENTRY_t; 92 typedef struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s rfc_CMD_FLUSH_QUEUE_t; 93 typedef struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s rfc_CMD_CLEAR_RX_t; 94 typedef struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s rfc_CMD_REMOVE_PENDING_ENTRIES_t; 95 typedef struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s rfc_CMD_SET_RAT_CMP_t; 96 typedef struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s rfc_CMD_SET_RAT_CPT_t; 97 typedef struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s rfc_CMD_DISABLE_RAT_CH_t; 98 typedef struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s rfc_CMD_SET_RAT_OUTPUT_t; 99 typedef struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s rfc_CMD_ARM_RAT_CH_t; 100 typedef struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s rfc_CMD_DISARM_RAT_CH_t; 101 typedef struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s rfc_CMD_SET_TX_POWER_t; 102 typedef struct __RFC_STRUCT rfc_CMD_SET_TX20_POWER_s rfc_CMD_SET_TX20_POWER_t; 103 typedef struct __RFC_STRUCT rfc_CMD_CHANGE_PA_s rfc_CMD_CHANGE_PA_t; 104 typedef struct __RFC_STRUCT rfc_CMD_UPDATE_HPOSC_FREQ_s rfc_CMD_UPDATE_HPOSC_FREQ_t; 105 typedef struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s rfc_CMD_UPDATE_FS_t; 106 typedef struct __RFC_STRUCT rfc_CMD_MODIFY_FS_s rfc_CMD_MODIFY_FS_t; 107 typedef struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s rfc_CMD_BUS_REQUEST_t; 108 typedef struct __RFC_STRUCT rfc_CMD_SET_CMD_START_IRQ_s rfc_CMD_SET_CMD_START_IRQ_t; 109 110 //! \addtogroup command 111 //! @{ 112 struct __RFC_STRUCT rfc_command_s { 113 uint16_t commandNo; //!< The command ID number 114 } __RFC_STRUCT_ATTR; 115 116 //! @} 117 118 //! \addtogroup radioOp 119 //! @{ 120 //! Common definition for radio operation commands 121 122 struct __RFC_STRUCT rfc_radioOp_s { 123 uint16_t commandNo; //!< The command ID number 124 uint16_t status; //!< \brief An integer telling the status of the command. This value is 125 //!< updated by the radio CPU during operation and may be read by the 126 //!< system CPU at any time. 127 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 128 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 129 struct { 130 uint8_t triggerType:4; //!< The type of trigger 131 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 132 //!< 1: CMD_TRIGGER can be used as an alternative trigger 133 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 134 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 135 //!< 1: A trigger in the past is triggered as soon as possible 136 } startTrigger; //!< Identification of the trigger that starts the operation 137 struct { 138 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 139 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 140 } condition; 141 } __RFC_STRUCT_ATTR; 142 143 //! @} 144 145 //! \addtogroup CMD_NOP 146 //! @{ 147 #define CMD_NOP 0x0801 148 //! No Operation Command 149 struct __RFC_STRUCT rfc_CMD_NOP_s { 150 uint16_t commandNo; //!< The command ID number 0x0801 151 uint16_t status; //!< \brief An integer telling the status of the command. This value is 152 //!< updated by the radio CPU during operation and may be read by the 153 //!< system CPU at any time. 154 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 155 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 156 struct { 157 uint8_t triggerType:4; //!< The type of trigger 158 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 159 //!< 1: CMD_TRIGGER can be used as an alternative trigger 160 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 161 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 162 //!< 1: A trigger in the past is triggered as soon as possible 163 } startTrigger; //!< Identification of the trigger that starts the operation 164 struct { 165 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 166 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 167 } condition; 168 } __RFC_STRUCT_ATTR; 169 170 //! @} 171 172 //! \addtogroup CMD_RADIO_SETUP 173 //! @{ 174 #define CMD_RADIO_SETUP 0x0802 175 //! Radio Setup Command for Pre-Defined Schemes 176 struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s { 177 uint16_t commandNo; //!< The command ID number 0x0802 178 uint16_t status; //!< \brief An integer telling the status of the command. This value is 179 //!< updated by the radio CPU during operation and may be read by the 180 //!< system CPU at any time. 181 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 182 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 183 struct { 184 uint8_t triggerType:4; //!< The type of trigger 185 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 186 //!< 1: CMD_TRIGGER can be used as an alternative trigger 187 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 188 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 189 //!< 1: A trigger in the past is triggered as soon as possible 190 } startTrigger; //!< Identification of the trigger that starts the operation 191 struct { 192 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 193 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 194 } condition; 195 uint8_t mode; //!< \brief The main mode to use<br> 196 //!< 0x00: BLE<br> 197 //!< 0x01: IEEE 802.15.4<br> 198 //!< 0x02: 2 Mbps GFSK<br> 199 //!< 0x05: 5 Mbps coded 8-FSK<br> 200 //!< 0xFF: Keep existing mode; update overrides only<br> 201 //!< Others: <i>Reserved</i> 202 uint8_t loDivider; //!< \brief LO divider setting to use. Supported values: 0, 2, 4, 203 //!< 5, 6, 10, 12, 15, and 30. 204 struct { 205 uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode<br> 206 //!< 0x01: Single-ended mode RFP<br> 207 //!< 0x02: Single-ended mode RFN<br> 208 //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br> 209 //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br> 210 //!< Others: <i>Reserved</i> 211 uint16_t biasMode:1; //!< \brief 0: Internal bias<br> 212 //!< 1: External bias 213 uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.<br> 214 //!< Required first time after boot and when changing frequency band 215 //!< or front-end configuration<br> 216 //!< 0x2D: Keep analog configuration.<br> 217 //!< May be used after standby or when changing mode with the same frequency 218 //!< band and front-end configuration<br> 219 //!< Others: <i>Reserved</i> 220 uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth<br> 221 //!< 1: Do not power up frequency synth 222 uint16_t :1; 223 uint16_t bSynthNarrowBand:1; //!< \brief 0: Normal synth mode<br> 224 //!< 1: Narrow-band synth mode 225 } config; //!< Configuration options 226 uint16_t txPower; //!< Transmit power 227 uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no 228 //!< override is used. 229 } __RFC_STRUCT_ATTR; 230 231 //! @} 232 233 //! \addtogroup CMD_FS 234 //! @{ 235 #define CMD_FS 0x0803 236 //! Frequency Synthesizer Programming Command 237 struct __RFC_STRUCT rfc_CMD_FS_s { 238 uint16_t commandNo; //!< The command ID number 0x0803 239 uint16_t status; //!< \brief An integer telling the status of the command. This value is 240 //!< updated by the radio CPU during operation and may be read by the 241 //!< system CPU at any time. 242 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 243 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 244 struct { 245 uint8_t triggerType:4; //!< The type of trigger 246 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 247 //!< 1: CMD_TRIGGER can be used as an alternative trigger 248 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 249 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 250 //!< 1: A trigger in the past is triggered as soon as possible 251 } startTrigger; //!< Identification of the trigger that starts the operation 252 struct { 253 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 254 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 255 } condition; 256 uint16_t frequency; //!< The frequency in MHz to tune to 257 uint16_t fractFreq; //!< Fractional part of the frequency to tune to 258 struct { 259 uint8_t bTxMode:1; //!< \brief 0: Start synth in RX mode<br> 260 //!< 1: Start synth in TX mode 261 uint8_t refFreq:6; //!< \brief 0: Use default reference frequency<br> 262 //!< Others: Use reference frequency 48 MHz/<code>refFreq</code> 263 } synthConf; 264 uint8_t __dummy0; //!< <i>Reserved</i>, always write 0 265 uint8_t __dummy1; //!< <i>Reserved</i> 266 uint8_t __dummy2; //!< <i>Reserved</i> 267 uint16_t __dummy3; //!< <i>Reserved</i> 268 } __RFC_STRUCT_ATTR; 269 270 //! @} 271 272 //! \addtogroup CMD_FS_OFF 273 //! @{ 274 #define CMD_FS_OFF 0x0804 275 //! Command for Turning off Frequency Synthesizer 276 struct __RFC_STRUCT rfc_CMD_FS_OFF_s { 277 uint16_t commandNo; //!< The command ID number 0x0804 278 uint16_t status; //!< \brief An integer telling the status of the command. This value is 279 //!< updated by the radio CPU during operation and may be read by the 280 //!< system CPU at any time. 281 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 282 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 283 struct { 284 uint8_t triggerType:4; //!< The type of trigger 285 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 286 //!< 1: CMD_TRIGGER can be used as an alternative trigger 287 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 288 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 289 //!< 1: A trigger in the past is triggered as soon as possible 290 } startTrigger; //!< Identification of the trigger that starts the operation 291 struct { 292 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 293 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 294 } condition; 295 } __RFC_STRUCT_ATTR; 296 297 //! @} 298 299 //! \addtogroup CMD_RX_TEST 300 //! @{ 301 #define CMD_RX_TEST 0x0807 302 //! Receiver Test Command 303 struct __RFC_STRUCT rfc_CMD_RX_TEST_s { 304 uint16_t commandNo; //!< The command ID number 0x0807 305 uint16_t status; //!< \brief An integer telling the status of the command. This value is 306 //!< updated by the radio CPU during operation and may be read by the 307 //!< system CPU at any time. 308 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 309 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 310 struct { 311 uint8_t triggerType:4; //!< The type of trigger 312 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 313 //!< 1: CMD_TRIGGER can be used as an alternative trigger 314 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 315 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 316 //!< 1: A trigger in the past is triggered as soon as possible 317 } startTrigger; //!< Identification of the trigger that starts the operation 318 struct { 319 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 320 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 321 } condition; 322 struct { 323 uint8_t bEnaFifo:1; //!< \brief 0: Do not enable FIFO in modem, so that received data is not available<br> 324 //!< 1: Enable FIFO in modem -- the data must be read out by the application 325 uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command<br> 326 //!< 1: Turn frequency synth off after command 327 uint8_t bNoSync:1; //!< \brief 0: Run sync search as normal for the configured mode<br> 328 //!< 1: Write correlation thresholds to the maximum value to avoid getting sync 329 } config; 330 struct { 331 uint8_t triggerType:4; //!< The type of trigger 332 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 333 //!< 1: CMD_TRIGGER can be used as an alternative trigger 334 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 335 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 336 //!< 1: A trigger in the past is triggered as soon as possible 337 } endTrigger; //!< Trigger classifier for ending the operation 338 uint32_t syncWord; //!< Sync word to use for receiver 339 ratmr_t endTime; //!< Time to end the operation 340 } __RFC_STRUCT_ATTR; 341 342 //! @} 343 344 //! \addtogroup CMD_TX_TEST 345 //! @{ 346 #define CMD_TX_TEST 0x0808 347 //! Transmitter Test Command 348 struct __RFC_STRUCT rfc_CMD_TX_TEST_s { 349 uint16_t commandNo; //!< The command ID number 0x0808 350 uint16_t status; //!< \brief An integer telling the status of the command. This value is 351 //!< updated by the radio CPU during operation and may be read by the 352 //!< system CPU at any time. 353 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 354 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 355 struct { 356 uint8_t triggerType:4; //!< The type of trigger 357 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 358 //!< 1: CMD_TRIGGER can be used as an alternative trigger 359 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 360 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 361 //!< 1: A trigger in the past is triggered as soon as possible 362 } startTrigger; //!< Identification of the trigger that starts the operation 363 struct { 364 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 365 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 366 } condition; 367 struct { 368 uint8_t bUseCw:1; //!< \brief 0: Send modulated signal<br> 369 //!< 1: Send continuous wave 370 uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command<br> 371 //!< 1: Turn frequency synth off after command 372 uint8_t whitenMode:2; //!< \brief 0: No whitening<br> 373 //!< 1: Default whitening<br> 374 //!< 2: PRBS-15<br> 375 //!< 3: PRBS-32 376 } config; 377 uint8_t __dummy0; 378 uint16_t txWord; //!< Value to send to the modem before whitening 379 uint8_t __dummy1; 380 struct { 381 uint8_t triggerType:4; //!< The type of trigger 382 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 383 //!< 1: CMD_TRIGGER can be used as an alternative trigger 384 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 385 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 386 //!< 1: A trigger in the past is triggered as soon as possible 387 } endTrigger; //!< Trigger classifier for ending the operation 388 uint32_t syncWord; //!< Sync word to use for transmitter 389 ratmr_t endTime; //!< Time to end the operation 390 } __RFC_STRUCT_ATTR; 391 392 //! @} 393 394 //! \addtogroup CMD_SYNC_STOP_RAT 395 //! @{ 396 #define CMD_SYNC_STOP_RAT 0x0809 397 //! Synchronize and Stop Radio Timer Command 398 struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s { 399 uint16_t commandNo; //!< The command ID number 0x0809 400 uint16_t status; //!< \brief An integer telling the status of the command. This value is 401 //!< updated by the radio CPU during operation and may be read by the 402 //!< system CPU at any time. 403 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 404 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 405 struct { 406 uint8_t triggerType:4; //!< The type of trigger 407 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 408 //!< 1: CMD_TRIGGER can be used as an alternative trigger 409 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 410 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 411 //!< 1: A trigger in the past is triggered as soon as possible 412 } startTrigger; //!< Identification of the trigger that starts the operation 413 struct { 414 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 415 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 416 } condition; 417 uint16_t __dummy0; 418 ratmr_t rat0; //!< \brief The returned RAT timer value corresponding to the value the RAT would have had when the 419 //!< RTC was zero 420 } __RFC_STRUCT_ATTR; 421 422 //! @} 423 424 //! \addtogroup CMD_SYNC_START_RAT 425 //! @{ 426 #define CMD_SYNC_START_RAT 0x080A 427 //! Synchrously Start Radio Timer Command 428 struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s { 429 uint16_t commandNo; //!< The command ID number 0x080A 430 uint16_t status; //!< \brief An integer telling the status of the command. This value is 431 //!< updated by the radio CPU during operation and may be read by the 432 //!< system CPU at any time. 433 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 434 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 435 struct { 436 uint8_t triggerType:4; //!< The type of trigger 437 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 438 //!< 1: CMD_TRIGGER can be used as an alternative trigger 439 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 440 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 441 //!< 1: A trigger in the past is triggered as soon as possible 442 } startTrigger; //!< Identification of the trigger that starts the operation 443 struct { 444 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 445 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 446 } condition; 447 uint16_t __dummy0; 448 ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the 449 //!< RTC was zero. This parameter is returned by CMD_SYNC_STOP_RAT 450 } __RFC_STRUCT_ATTR; 451 452 //! @} 453 454 //! \addtogroup CMD_RESYNC_RAT 455 //! @{ 456 #define CMD_RESYNC_RAT 0x0816 457 //! Re-calculate rat0 value while RAT is running 458 struct __RFC_STRUCT rfc_CMD_RESYNC_RAT_s { 459 uint16_t commandNo; //!< The command ID number 0x0816 460 uint16_t status; //!< \brief An integer telling the status of the command. This value is 461 //!< updated by the radio CPU during operation and may be read by the 462 //!< system CPU at any time. 463 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 464 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 465 struct { 466 uint8_t triggerType:4; //!< The type of trigger 467 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 468 //!< 1: CMD_TRIGGER can be used as an alternative trigger 469 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 470 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 471 //!< 1: A trigger in the past is triggered as soon as possible 472 } startTrigger; //!< Identification of the trigger that starts the operation 473 struct { 474 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 475 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 476 } condition; 477 uint16_t __dummy0; 478 ratmr_t rat0; //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the 479 //!< RTC was zero 480 } __RFC_STRUCT_ATTR; 481 482 //! @} 483 484 //! \addtogroup CMD_COUNT 485 //! @{ 486 #define CMD_COUNT 0x080B 487 //! Counter Command 488 struct __RFC_STRUCT rfc_CMD_COUNT_s { 489 uint16_t commandNo; //!< The command ID number 0x080B 490 uint16_t status; //!< \brief An integer telling the status of the command. This value is 491 //!< updated by the radio CPU during operation and may be read by the 492 //!< system CPU at any time. 493 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 494 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 495 struct { 496 uint8_t triggerType:4; //!< The type of trigger 497 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 498 //!< 1: CMD_TRIGGER can be used as an alternative trigger 499 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 500 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 501 //!< 1: A trigger in the past is triggered as soon as possible 502 } startTrigger; //!< Identification of the trigger that starts the operation 503 struct { 504 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 505 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 506 } condition; 507 uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation 508 //!< differs if the result is zero 509 } __RFC_STRUCT_ATTR; 510 511 //! @} 512 513 //! \addtogroup CMD_FS_POWERUP 514 //! @{ 515 #define CMD_FS_POWERUP 0x080C 516 //! Power up Frequency Syntheszier Command 517 struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s { 518 uint16_t commandNo; //!< The command ID number 0x080C 519 uint16_t status; //!< \brief An integer telling the status of the command. This value is 520 //!< updated by the radio CPU during operation and may be read by the 521 //!< system CPU at any time. 522 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 523 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 524 struct { 525 uint8_t triggerType:4; //!< The type of trigger 526 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 527 //!< 1: CMD_TRIGGER can be used as an alternative trigger 528 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 529 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 530 //!< 1: A trigger in the past is triggered as soon as possible 531 } startTrigger; //!< Identification of the trigger that starts the operation 532 struct { 533 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 534 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 535 } condition; 536 uint16_t __dummy0; 537 uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override. If NULL, no override is used. 538 } __RFC_STRUCT_ATTR; 539 540 //! @} 541 542 //! \addtogroup CMD_FS_POWERDOWN 543 //! @{ 544 #define CMD_FS_POWERDOWN 0x080D 545 //! Power down Frequency Syntheszier Command 546 struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s { 547 uint16_t commandNo; //!< The command ID number 0x080D 548 uint16_t status; //!< \brief An integer telling the status of the command. This value is 549 //!< updated by the radio CPU during operation and may be read by the 550 //!< system CPU at any time. 551 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 552 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 553 struct { 554 uint8_t triggerType:4; //!< The type of trigger 555 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 556 //!< 1: CMD_TRIGGER can be used as an alternative trigger 557 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 558 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 559 //!< 1: A trigger in the past is triggered as soon as possible 560 } startTrigger; //!< Identification of the trigger that starts the operation 561 struct { 562 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 563 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 564 } condition; 565 } __RFC_STRUCT_ATTR; 566 567 //! @} 568 569 //! \addtogroup CMD_SCH_IMM 570 //! @{ 571 #define CMD_SCH_IMM 0x0810 572 //! Run Immidiate Command as Radio Operation Command 573 struct __RFC_STRUCT rfc_CMD_SCH_IMM_s { 574 uint16_t commandNo; //!< The command ID number 0x0810 575 uint16_t status; //!< \brief An integer telling the status of the command. This value is 576 //!< updated by the radio CPU during operation and may be read by the 577 //!< system CPU at any time. 578 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 579 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 580 struct { 581 uint8_t triggerType:4; //!< The type of trigger 582 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 583 //!< 1: CMD_TRIGGER can be used as an alternative trigger 584 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 585 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 586 //!< 1: A trigger in the past is triggered as soon as possible 587 } startTrigger; //!< Identification of the trigger that starts the operation 588 struct { 589 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 590 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 591 } condition; 592 uint16_t __dummy0; 593 uint32_t cmdrVal; //!< Value as would be written to CMDR 594 uint32_t cmdstaVal; //!< Value as would be returned in CMDSTA 595 } __RFC_STRUCT_ATTR; 596 597 //! @} 598 599 //! \addtogroup CMD_COUNT_BRANCH 600 //! @{ 601 #define CMD_COUNT_BRANCH 0x0812 602 //! Counter Command with Branch of Command Chain 603 struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s { 604 uint16_t commandNo; //!< The command ID number 0x0812 605 uint16_t status; //!< \brief An integer telling the status of the command. This value is 606 //!< updated by the radio CPU during operation and may be read by the 607 //!< system CPU at any time. 608 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 609 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 610 struct { 611 uint8_t triggerType:4; //!< The type of trigger 612 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 613 //!< 1: CMD_TRIGGER can be used as an alternative trigger 614 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 615 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 616 //!< 1: A trigger in the past is triggered as soon as possible 617 } startTrigger; //!< Identification of the trigger that starts the operation 618 struct { 619 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 620 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 621 } condition; 622 uint16_t counter; //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation 623 //!< differs if the result is zero 624 rfc_radioOp_t *pNextOpIfOk; //!< Pointer to next operation if counter did not expire 625 } __RFC_STRUCT_ATTR; 626 627 //! @} 628 629 //! \addtogroup CMD_PATTERN_CHECK 630 //! @{ 631 #define CMD_PATTERN_CHECK 0x0813 632 //! Command for Checking a Value in Memory aginst a Pattern 633 struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s { 634 uint16_t commandNo; //!< The command ID number 0x0813 635 uint16_t status; //!< \brief An integer telling the status of the command. This value is 636 //!< updated by the radio CPU during operation and may be read by the 637 //!< system CPU at any time. 638 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 639 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 640 struct { 641 uint8_t triggerType:4; //!< The type of trigger 642 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 643 //!< 1: CMD_TRIGGER can be used as an alternative trigger 644 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 645 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 646 //!< 1: A trigger in the past is triggered as soon as possible 647 } startTrigger; //!< Identification of the trigger that starts the operation 648 struct { 649 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 650 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 651 } condition; 652 struct { 653 uint16_t operation:2; //!< \brief Operation to perform<br> 654 //!< 0: True if value == <code>compareVal</code><br> 655 //!< 1: True if value < <code>compareVal</code><br> 656 //!< 2: True if value > <code>compareVal</code><br> 657 //!< 3: <i>Reserved</i> 658 uint16_t bByteRev:1; //!< \brief If 1, interchange the four bytes of the value, so that they are read 659 //!< most-significant-byte-first. 660 uint16_t bBitRev:1; //!< If 1, perform bit reversal of the value 661 uint16_t signExtend:5; //!< \brief 0: Treat value and <code>compareVal</code> as unsigned<br> 662 //!< 1--31: Treat value and <code>compareVal</code> as signed, where the value 663 //!< gives the number of the most significant bit in the signed number. 664 uint16_t bRxVal:1; //!< \brief 0: Use <code>pValue</code> as a pointer<br> 665 //!< 1: Use <code>pValue</code> as a signed offset to the start of the last 666 //!< committed RX entry element 667 } patternOpt; //!< Options for comparison 668 rfc_radioOp_t *pNextOpIfOk; //!< Pointer to next operation if comparison result was true 669 uint8_t* pValue; //!< Pointer to read from, or offset from last RX entry if <code>patternOpt.bRxVal</code> == 1 670 uint32_t mask; //!< Bit mask to apply before comparison 671 uint32_t compareVal; //!< Value to compare to 672 } __RFC_STRUCT_ATTR; 673 674 //! @} 675 676 #define CMD_RADIO_SETUP_PA CMD_RADIO_SETUP 677 678 //! \addtogroup CMD_RADIO_SETUP_PA 679 //! @{ 680 //! Radio Setup Command for Pre-Defined Schemes with PA Switching Fields 681 struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_PA_s { 682 uint16_t commandNo; //!< The command ID number 683 uint16_t status; //!< \brief An integer telling the status of the command. This value is 684 //!< updated by the radio CPU during operation and may be read by the 685 //!< system CPU at any time. 686 rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done 687 ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>) 688 struct { 689 uint8_t triggerType:4; //!< The type of trigger 690 uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br> 691 //!< 1: CMD_TRIGGER can be used as an alternative trigger 692 uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action 693 uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br> 694 //!< 1: A trigger in the past is triggered as soon as possible 695 } startTrigger; //!< Identification of the trigger that starts the operation 696 struct { 697 uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed 698 uint8_t nSkip:4; //!< Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ... 699 } condition; 700 uint8_t mode; //!< \brief The main mode to use<br> 701 //!< 0x00: BLE<br> 702 //!< 0x01: IEEE 802.15.4<br> 703 //!< 0x02: 2 Mbps GFSK<br> 704 //!< 0x05: 5 Mbps coded 8-FSK<br> 705 //!< 0xFF: Keep existing mode; update overrides only<br> 706 //!< Others: <i>Reserved</i> 707 uint8_t loDivider; //!< \brief LO divider setting to use. Supported values: 0, 2, 4, 708 //!< 5, 6, 10, 12, 15, and 30. 709 struct { 710 uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode<br> 711 //!< 0x01: Single-ended mode RFP<br> 712 //!< 0x02: Single-ended mode RFN<br> 713 //!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br> 714 //!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br> 715 //!< Others: <i>Reserved</i> 716 uint16_t biasMode:1; //!< \brief 0: Internal bias<br> 717 //!< 1: External bias 718 uint16_t analogCfgMode:6; //!< \brief 0x00: Write analog configuration.<br> 719 //!< Required first time after boot and when changing frequency band 720 //!< or front-end configuration<br> 721 //!< 0x2D: Keep analog configuration.<br> 722 //!< May be used after standby or when changing mode with the same frequency 723 //!< band and front-end configuration<br> 724 //!< Others: <i>Reserved</i> 725 uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth<br> 726 //!< 1: Do not power up frequency synth 727 uint16_t :1; 728 uint16_t bSynthNarrowBand:1; //!< \brief 0: Normal synth mode<br> 729 //!< 1: Narrow-band synth mode 730 } config; //!< Configuration options 731 uint16_t txPower; //!< Transmit power 732 uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no 733 //!< override is used. 734 uint32_t* pRegOverrideTxStd; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to 735 //!< standard PA. Used by RF driver only, not radio CPU. 736 uint32_t* pRegOverrideTx20; //!< \brief Pointer to a list of hardware and configuration registers to override when switching to 737 //!< 20-dBm PA. Used by RF driver only, not radio CPU. 738 } __RFC_STRUCT_ATTR; 739 740 //! @} 741 742 //! \addtogroup CMD_ABORT 743 //! @{ 744 #define CMD_ABORT 0x0401 745 //! Abort Running Radio Operation Command 746 struct __RFC_STRUCT rfc_CMD_ABORT_s { 747 uint16_t commandNo; //!< The command ID number 0x0401 748 } __RFC_STRUCT_ATTR; 749 750 //! @} 751 752 //! \addtogroup CMD_STOP 753 //! @{ 754 #define CMD_STOP 0x0402 755 //! Stop Running Radio Operation Command Gracefully 756 struct __RFC_STRUCT rfc_CMD_STOP_s { 757 uint16_t commandNo; //!< The command ID number 0x0402 758 } __RFC_STRUCT_ATTR; 759 760 //! @} 761 762 //! \addtogroup CMD_GET_RSSI 763 //! @{ 764 #define CMD_GET_RSSI 0x0403 765 //! Read RSSI Command 766 struct __RFC_STRUCT rfc_CMD_GET_RSSI_s { 767 uint16_t commandNo; //!< The command ID number 0x0403 768 } __RFC_STRUCT_ATTR; 769 770 //! @} 771 772 //! \addtogroup CMD_UPDATE_RADIO_SETUP 773 //! @{ 774 #define CMD_UPDATE_RADIO_SETUP 0x0001 775 //! Update Radio Settings Command 776 struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s { 777 uint16_t commandNo; //!< The command ID number 0x0001 778 uint16_t __dummy0; 779 uint32_t* pRegOverride; //!< Pointer to a list of hardware and configuration registers to override 780 } __RFC_STRUCT_ATTR; 781 782 //! @} 783 784 //! \addtogroup CMD_TRIGGER 785 //! @{ 786 #define CMD_TRIGGER 0x0404 787 //! Generate Command Trigger 788 struct __RFC_STRUCT rfc_CMD_TRIGGER_s { 789 uint16_t commandNo; //!< The command ID number 0x0404 790 uint8_t triggerNo; //!< Command trigger number 791 } __RFC_STRUCT_ATTR; 792 793 //! @} 794 795 //! \addtogroup CMD_GET_FW_INFO 796 //! @{ 797 #define CMD_GET_FW_INFO 0x0002 798 //! Request Information on the RF Core ROM Firmware 799 struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s { 800 uint16_t commandNo; //!< The command ID number 0x0002 801 uint16_t versionNo; //!< Firmware version number 802 uint16_t startOffset; //!< The start of free RAM 803 uint16_t freeRamSz; //!< The size of free RAM 804 uint16_t availRatCh; //!< Bitmap of available RAT channels 805 } __RFC_STRUCT_ATTR; 806 807 //! @} 808 809 //! \addtogroup CMD_START_RAT 810 //! @{ 811 #define CMD_START_RAT 0x0405 812 //! Asynchronously Start Radio Timer Command 813 struct __RFC_STRUCT rfc_CMD_START_RAT_s { 814 uint16_t commandNo; //!< The command ID number 0x0405 815 } __RFC_STRUCT_ATTR; 816 817 //! @} 818 819 //! \addtogroup CMD_PING 820 //! @{ 821 #define CMD_PING 0x0406 822 //! Respond with Command ACK Only 823 struct __RFC_STRUCT rfc_CMD_PING_s { 824 uint16_t commandNo; //!< The command ID number 0x0406 825 } __RFC_STRUCT_ATTR; 826 827 //! @} 828 829 //! \addtogroup CMD_READ_RFREG 830 //! @{ 831 #define CMD_READ_RFREG 0x0601 832 //! Read RF Core Hardware Register 833 struct __RFC_STRUCT rfc_CMD_READ_RFREG_s { 834 uint16_t commandNo; //!< The command ID number 0x0601 835 uint16_t address; //!< The offset from the start of the RF core HW register bank (0x40040000) 836 uint32_t value; //!< Returned value of the register 837 } __RFC_STRUCT_ATTR; 838 839 //! @} 840 841 //! \addtogroup CMD_ADD_DATA_ENTRY 842 //! @{ 843 #define CMD_ADD_DATA_ENTRY 0x0005 844 //! Add Data Entry to Queue 845 struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s { 846 uint16_t commandNo; //!< The command ID number 0x0005 847 uint16_t __dummy0; 848 dataQueue_t* pQueue; //!< Pointer to the queue structure to which the entry will be added 849 uint8_t* pEntry; //!< Pointer to the entry 850 } __RFC_STRUCT_ATTR; 851 852 //! @} 853 854 //! \addtogroup CMD_REMOVE_DATA_ENTRY 855 //! @{ 856 #define CMD_REMOVE_DATA_ENTRY 0x0006 857 //! Remove First Data Entry from Queue 858 struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s { 859 uint16_t commandNo; //!< The command ID number 0x0006 860 uint16_t __dummy0; 861 dataQueue_t* pQueue; //!< Pointer to the queue structure from which the entry will be removed 862 uint8_t* pEntry; //!< Pointer to the entry that was removed 863 } __RFC_STRUCT_ATTR; 864 865 //! @} 866 867 //! \addtogroup CMD_FLUSH_QUEUE 868 //! @{ 869 #define CMD_FLUSH_QUEUE 0x0007 870 //! Flush Data Queue 871 struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s { 872 uint16_t commandNo; //!< The command ID number 0x0007 873 uint16_t __dummy0; 874 dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed 875 uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed 876 } __RFC_STRUCT_ATTR; 877 878 //! @} 879 880 //! \addtogroup CMD_CLEAR_RX 881 //! @{ 882 #define CMD_CLEAR_RX 0x0008 883 //! Clear all RX Queue Entries 884 struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s { 885 uint16_t commandNo; //!< The command ID number 0x0008 886 uint16_t __dummy0; 887 dataQueue_t* pQueue; //!< Pointer to the queue structure to be cleared 888 } __RFC_STRUCT_ATTR; 889 890 //! @} 891 892 //! \addtogroup CMD_REMOVE_PENDING_ENTRIES 893 //! @{ 894 #define CMD_REMOVE_PENDING_ENTRIES 0x0009 895 //! Remove Pending Entries from Queue 896 struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s { 897 uint16_t commandNo; //!< The command ID number 0x0009 898 uint16_t __dummy0; 899 dataQueue_t* pQueue; //!< Pointer to the queue structure to be flushed 900 uint8_t* pFirstEntry; //!< Pointer to the first entry that was removed 901 } __RFC_STRUCT_ATTR; 902 903 //! @} 904 905 //! \addtogroup CMD_SET_RAT_CMP 906 //! @{ 907 #define CMD_SET_RAT_CMP 0x000A 908 //! Set Radio Timer Channel in Compare Mode 909 struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s { 910 uint16_t commandNo; //!< The command ID number 0x000A 911 uint8_t ratCh; //!< The radio timer channel number 912 uint8_t __dummy0; 913 ratmr_t compareTime; //!< The time at which the compare occurs 914 } __RFC_STRUCT_ATTR; 915 916 //! @} 917 918 //! \addtogroup CMD_SET_RAT_CPT 919 //! @{ 920 #define CMD_SET_RAT_CPT 0x0603 921 //! Set Radio Timer Channel in Capture Mode 922 struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s { 923 uint16_t commandNo; //!< The command ID number 0x0603 924 struct { 925 uint16_t :3; 926 uint16_t inputSrc:5; //!< Input source indicator 927 uint16_t ratCh:4; //!< The radio timer channel number 928 uint16_t bRepeated:1; //!< \brief 0: Single capture mode<br> 929 //!< 1: Repeated capture mode 930 uint16_t inputMode:2; //!< \brief Input mode:<br> 931 //!< 0: Capture on rising edge<br> 932 //!< 1: Capture on falling edge<br> 933 //!< 2: Capture on both edges<br> 934 //!< 3: <i>Reserved</i> 935 } config; 936 } __RFC_STRUCT_ATTR; 937 938 //! @} 939 940 //! \addtogroup CMD_DISABLE_RAT_CH 941 //! @{ 942 #define CMD_DISABLE_RAT_CH 0x0408 943 //! Disable Radio Timer Channel 944 struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s { 945 uint16_t commandNo; //!< The command ID number 0x0408 946 uint8_t ratCh; //!< The radio timer channel number 947 } __RFC_STRUCT_ATTR; 948 949 //! @} 950 951 //! \addtogroup CMD_SET_RAT_OUTPUT 952 //! @{ 953 #define CMD_SET_RAT_OUTPUT 0x0604 954 //! Set Radio Timer Output to a Specified Mode 955 struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s { 956 uint16_t commandNo; //!< The command ID number 0x0604 957 struct { 958 uint16_t :2; 959 uint16_t outputSel:3; //!< Output event indicator 960 uint16_t outputMode:3; //!< \brief 0: Set output line low as default; and pulse on event. Duration of pulse is one RF Core clock period (ca. 41.67 ns).<br> 961 //!< 1: Set output line high on event<br> 962 //!< 2: Set output line low on event<br> 963 //!< 3: Toggle (invert) output line state on event<br> 964 //!< 4: Immediately set output line to low (does not change upon event)<br> 965 //!< 5: Immediately set output line to high (does not change upon event)<br> 966 //!< Others: <i>Reserved</i> 967 uint16_t ratCh:4; //!< The radio timer channel number 968 } config; 969 } __RFC_STRUCT_ATTR; 970 971 //! @} 972 973 //! \addtogroup CMD_ARM_RAT_CH 974 //! @{ 975 #define CMD_ARM_RAT_CH 0x0409 976 //! Arm Radio Timer Channel 977 struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s { 978 uint16_t commandNo; //!< The command ID number 0x0409 979 uint8_t ratCh; //!< The radio timer channel number 980 } __RFC_STRUCT_ATTR; 981 982 //! @} 983 984 //! \addtogroup CMD_DISARM_RAT_CH 985 //! @{ 986 #define CMD_DISARM_RAT_CH 0x040A 987 //! Disarm Radio Timer Channel 988 struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s { 989 uint16_t commandNo; //!< The command ID number 0x040A 990 uint8_t ratCh; //!< The radio timer channel number 991 } __RFC_STRUCT_ATTR; 992 993 //! @} 994 995 //! \addtogroup CMD_SET_TX_POWER 996 //! @{ 997 #define CMD_SET_TX_POWER 0x0010 998 //! Set Transmit Power 999 struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s { 1000 uint16_t commandNo; //!< The command ID number 0x0010 1001 uint16_t txPower; //!< New TX power setting 1002 } __RFC_STRUCT_ATTR; 1003 1004 //! @} 1005 1006 //! \addtogroup CMD_SET_TX20_POWER 1007 //! @{ 1008 #define CMD_SET_TX20_POWER 0x0014 1009 //! Set Transmit Power for 20-dBm PA 1010 struct __RFC_STRUCT rfc_CMD_SET_TX20_POWER_s { 1011 uint16_t commandNo; //!< The command ID number 0x0014 1012 uint16_t __dummy0; 1013 uint32_t tx20Power; //!< New TX power setting 1014 } __RFC_STRUCT_ATTR; 1015 1016 //! @} 1017 1018 //! \addtogroup CMD_CHANGE_PA 1019 //! @{ 1020 #define CMD_CHANGE_PA 0x0015 1021 //! Set TX power with possibility to switch between PAs 1022 struct __RFC_STRUCT rfc_CMD_CHANGE_PA_s { 1023 uint16_t commandNo; //!< The command ID number 0x0015 1024 uint16_t __dummy0; 1025 uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override as part of the 1026 //!< change, including new TX power 1027 } __RFC_STRUCT_ATTR; 1028 1029 //! @} 1030 1031 //! \addtogroup CMD_UPDATE_HPOSC_FREQ 1032 //! @{ 1033 #define CMD_UPDATE_HPOSC_FREQ 0x0608 1034 //! Set New Frequency Offset for HPOSC 1035 struct __RFC_STRUCT rfc_CMD_UPDATE_HPOSC_FREQ_s { 1036 uint16_t commandNo; //!< The command ID number 0x0608 1037 int16_t freqOffset; //!< Relative frequency offset, signed, scaled by 2<sup>-22</sup> 1038 } __RFC_STRUCT_ATTR; 1039 1040 //! @} 1041 1042 //! \addtogroup CMD_UPDATE_FS 1043 //! @{ 1044 #define CMD_UPDATE_FS 0x0011 1045 //! Set New Synthesizer Frequency without Recalibration (Deprecated; use CMD_MODIFY_FS) 1046 struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s { 1047 uint16_t commandNo; //!< The command ID number 0x0011 1048 uint16_t __dummy0; 1049 uint32_t __dummy1; 1050 uint32_t __dummy2; 1051 uint16_t __dummy3; 1052 uint16_t frequency; //!< The frequency in MHz to tune to 1053 uint16_t fractFreq; //!< Fractional part of the frequency to tune to 1054 } __RFC_STRUCT_ATTR; 1055 1056 //! @} 1057 1058 //! \addtogroup CMD_MODIFY_FS 1059 //! @{ 1060 #define CMD_MODIFY_FS 0x0013 1061 //! Set New Synthesizer Frequency without Recalibration 1062 struct __RFC_STRUCT rfc_CMD_MODIFY_FS_s { 1063 uint16_t commandNo; //!< The command ID number 0x0013 1064 uint16_t frequency; //!< The frequency in MHz to tune to 1065 uint16_t fractFreq; //!< Fractional part of the frequency to tune to 1066 } __RFC_STRUCT_ATTR; 1067 1068 //! @} 1069 1070 //! \addtogroup CMD_BUS_REQUEST 1071 //! @{ 1072 #define CMD_BUS_REQUEST 0x040E 1073 //! Request System Bus to be Availbale 1074 struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s { 1075 uint16_t commandNo; //!< The command ID number 0x040E 1076 uint8_t bSysBusNeeded; //!< \brief 0: System bus may sleep<br> 1077 //!< 1: System bus access needed 1078 } __RFC_STRUCT_ATTR; 1079 1080 //! @} 1081 1082 //! \addtogroup CMD_SET_CMD_START_IRQ 1083 //! @{ 1084 #define CMD_SET_CMD_START_IRQ 0x0411 1085 //! Enable or disable generation of IRQ when a radio operation command starts 1086 struct __RFC_STRUCT rfc_CMD_SET_CMD_START_IRQ_s { 1087 uint16_t commandNo; //!< The command ID number 0x0411 1088 uint8_t bEna; //!< 1 to enable interrupt generation; 0 to disable it 1089 } __RFC_STRUCT_ATTR; 1090 1091 //! @} 1092 1093 //! @} 1094 //! @} 1095 #endif 1096