RF.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2018, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
647 #ifndef ti_drivers_rf__include
648 #define ti_drivers_rf__include
649 
650 #ifdef __cplusplus
651 extern "C" {
652 #endif
653 
654 #include <stdint.h>
655 #include <stdbool.h>
656 
657 #include <ti/drivers/dpl/ClockP.h>
658 #include <ti/drivers/dpl/SemaphoreP.h>
659 #include <ti/drivers/utils/List.h>
660 
661 #include <ti/devices/DeviceFamily.h>
662 #include DeviceFamily_constructPath(driverlib/rf_common_cmd.h)
663 #include DeviceFamily_constructPath(driverlib/rf_prop_cmd.h)
664 #include DeviceFamily_constructPath(driverlib/rf_ble_cmd.h)
665 
677 #define RF_EventCmdDone (1 << 0)
678 #define RF_EventLastCmdDone (1 << 1)
679 #define RF_EventFGCmdDone (1 << 2)
680 #define RF_EventLastFGCmdDone (1 << 3)
681 #define RF_EventTxDone (1 << 4)
682 #define RF_EventTXAck (1 << 5)
683 #define RF_EventTxCtrl (1 << 6)
684 #define RF_EventTxCtrlAck (1 << 7)
685 #define RF_EventTxCtrlAckAck (1 << 8)
686 #define RF_EventTxRetrans (1 << 9)
687 #define RF_EventTxEntryDone (1 << 10)
688 #define RF_EventTxBufferChange (1 << 11)
689 #define RF_EventPaChanged (1 << 14)
690 #define RF_EventRxOk (1 << 16)
691 #define RF_EventRxNOk (1 << 17)
692 #define RF_EventRxIgnored (1 << 18)
693 #define RF_EventRxEmpty (1 << 19)
694 #define RF_EventRxCtrl (1 << 20)
695 #define RF_EventRxCtrlAck (1 << 21)
696 #define RF_EventRxBufFull (1 << 22)
697 #define RF_EventRxEntryDone (1 << 23)
698 #define RF_EventDataWritten (1 << 24)
699 #define RF_EventNDataWritten (1 << 25)
700 #define RF_EventRxAborted (1 << 26)
701 #define RF_EventRxCollisionDetected (1 << 27)
702 #define RF_EventModulesUnlocked (1 << 29)
703 #define RF_EventInternalError (uint32_t)(1 << 31)
704 #define RF_EventMdmSoft 0x0000002000000000
705 
714 #define RF_EventCmdCancelled 0x1000000000000000
715 #define RF_EventCmdAborted 0x2000000000000000
716 #define RF_EventCmdStopped 0x4000000000000000
717 #define RF_EventRatCh 0x0800000000000000
718 #define RF_EventPowerUp 0x0400000000000000
719 #define RF_EventError 0x0200000000000000
720 #define RF_EventCmdPreempted 0x0100000000000000
721 
739 #define RF_CTRL_SET_INACTIVITY_TIMEOUT 0
740 
749 #define RF_CTRL_UPDATE_SETUP_CMD 1
750 
755 #define RF_CTRL_SET_POWERUP_DURATION_MARGIN 2
756 
763 #define RF_CTRL_SET_RAT_RTC_ERR_TOL_VAL 3
764 
775 #define RF_CTRL_SET_POWER_MGMT 4
776 
797 #define RF_CTRL_SET_HWI_PRIORITY 5
798 
819 #define RF_CTRL_SET_SWI_PRIORITY 6
820 
829 #define RF_CTRL_SET_AVAILABLE_RAT_CHANNELS_MASK 7
830 
843 #define RF_TxPowerTable_MIN_DBM -128
844 
851 #define RF_TxPowerTable_MAX_DBM 126
852 
858 #define RF_TxPowerTable_INVALID_DBM 127
859 
877 #define RF_TxPowerTable_INVALID_VALUE 0x3fffff
878 
894 #define RF_TxPowerTable_TERMINATION_ENTRY \
895  { .power = RF_TxPowerTable_INVALID_DBM, .value = { .rawValue = RF_TxPowerTable_INVALID_VALUE, .paType = RF_TxPowerTable_DefaultPA } }
896 
903 #define RF_TxPowerTable_DEFAULT_PA_ENTRY(bias, gain, boost, coefficient) \
904  { .rawValue = ((bias) << 0) | ((gain) << 6) | ((boost) << 8) | ((coefficient) << 9), .paType = RF_TxPowerTable_DefaultPA }
905 
912 #define RF_TxPowerTable_HIGH_PA_ENTRY(bias, ibboost, boost, coefficient, ldotrim) \
913  { .rawValue = ((bias) << 0) | ((ibboost) << 6) | ((boost) << 8) | ((coefficient) << 9) | ((ldotrim) << 16), .paType = RF_TxPowerTable_HighPA }
914 
915 
922 #define RF_GET_RSSI_ERROR_VAL (-128)
923 #define RF_CMDHANDLE_FLUSH_ALL (-1)
924 #define RF_ALLOC_ERROR (-2)
925 #define RF_SCHEDULE_CMD_ERROR (-3)
926 #define RF_ERROR_RAT_PROG (-255)
927 #define RF_ERROR_INVALID_RFMODE (-256)
928 #define RF_ERROR_CMDFS_SYNTH_PROG (-257)
929 
930 #define RF_NUM_SCHEDULE_ACCESS_ENTRIES 2
931 #define RF_NUM_SCHEDULE_COMMAND_ENTRIES 8
932 #define RF_NUM_SCHEDULE_MAP_ENTRIES (RF_NUM_SCHEDULE_ACCESS_ENTRIES + RF_NUM_SCHEDULE_COMMAND_ENTRIES)
933 #define RF_SCH_MAP_CURRENT_CMD_OFFSET RF_NUM_SCHEDULE_ACCESS_ENTRIES
934 #define RF_SCH_MAP_PENDING_CMD_OFFSET (RF_SCH_MAP_CURRENT_CMD_OFFSET + 2)
935 
936 #define RF_ABORT_PREEMPTION (1<<2)
937 #define RF_ABORT_GRACEFULLY (1<<0)
938 
939 #define RF_SCH_CMD_EXECUTION_TIME_UNKNOWN 0
940 
941 #define RF_RAT_ANY_CHANNEL (-1)
942 #define RF_RAT_TICKS_PER_US 4
943 
944 #define RF_LODIVIDER_MASK 0x7F
945 
946 
949 #define RF_convertUsToRatTicks(microseconds) \
950  ((microseconds) * (RF_RAT_TICKS_PER_US))
951 
955 #define RF_convertMsToRatTicks(milliseconds) \
956  ((milliseconds) * 1000 * (RF_RAT_TICKS_PER_US))
957 
961 #define RF_convertRatTicksToUs(ticks) \
962  ((ticks) / (RF_RAT_TICKS_PER_US))
963 
967 #define RF_convertRatTicksToMs(ticks) \
968  ((ticks) / (1000 * (RF_RAT_TICKS_PER_US)))
969 
970 
982 typedef struct {
983  uint32_t rawValue:22;
984  uint32_t __dummy:9;
988  uint32_t paType:1;
993 
1012 typedef struct
1013 {
1014  int8_t power;
1015 
1018 } __attribute__((packed)) RF_TxPowerTable_Entry;
1019 
1020 
1027 typedef enum {
1031 
1032 
1046 typedef rfc_radioOp_t RF_Op;
1047 
1048 
1057 typedef struct {
1058  uint8_t rfMode;
1059  void (*cpePatchFxn)(void);
1060  void (*mcePatchFxn)(void);
1061  void (*rfePatchFxn)(void);
1062 } RF_Mode;
1063 
1074 typedef enum {
1078 } RF_Priority;
1079 
1088 typedef enum {
1094  RF_StatError = 0x80,
1098 } RF_Stat;
1099 
1104 typedef uint64_t RF_EventMask;
1105 
1115 typedef union {
1116  rfc_command_t commandId;
1117  rfc_CMD_RADIO_SETUP_t common;
1119  rfc_CMD_BLE5_RADIO_SETUP_t ble5;
1120  rfc_CMD_PROP_RADIO_SETUP_t prop;
1121  rfc_CMD_PROP_RADIO_DIV_SETUP_t prop_div;
1122 
1123 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2)
1124  rfc_CMD_RADIO_SETUP_PA_t common_pa;
1125  rfc_CMD_BLE5_RADIO_SETUP_PA_t ble5_pa;
1126  rfc_CMD_PROP_RADIO_SETUP_PA_t prop_pa;
1127  rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t prop_div_pa;
1128 #endif
1129 } RF_RadioSetup;
1130 
1159 typedef enum {
1162 
1166 } RF_ClientEvent;
1167 
1205 typedef enum {
1207 
1211 } RF_GlobalEvent;
1214 
1215 
1219 typedef uint32_t RF_ClientEventMask;
1220 
1224 typedef uint32_t RF_GlobalEventMask;
1225 
1238 typedef int16_t RF_CmdHandle;
1239 
1260 #if defined (RF_SINGLEMODE)
1261  typedef struct RF_ObjectSingleMode RF_Object;
1262 #else
1263  typedef struct RF_ObjectMultiMode RF_Object;
1264 #endif
1265 
1266 /* Definition of the RF_Object structure for single-mode applications.
1267  * It is applicable with the single-mode RF driver through the #RF_Object common type.
1268  */
1269 struct RF_ObjectSingleMode{
1271  struct {
1272  uint32_t nInactivityTimeout;
1273  RF_Mode* pRfMode;
1274  RF_RadioSetup* pRadioSetup;
1275  uint32_t nPowerUpDuration;
1276  bool bMeasurePowerUpDuration;
1277  bool bUpdateSetup;
1278  uint16_t nPowerUpDurationMargin;
1279  void* pPowerCb;
1280  void* pErrCb;
1281  } clientConfig;
1283  struct {
1284  struct {
1285  rfc_CMD_FS_t cmdFs;
1286  } mode_state;
1287  SemaphoreP_Struct semSync;
1288  RF_EventMask volatile eventSync;
1289  void* pCbSync;
1290  RF_EventMask unpendCause;
1291  bool bYielded;
1292  } state;
1293 };
1294 
1298 struct RF_ObjectMultiMode{
1300  struct {
1301  uint32_t nInactivityTimeout;
1302  RF_Mode* pRfMode;
1303  RF_RadioSetup* pRadioSetup;
1304  uint32_t nPhySwitchingDuration;
1305  uint32_t nPowerUpDuration;
1306  bool bMeasurePowerUpDuration;
1307  bool bUpdateSetup;
1308  uint16_t nPowerUpDurationMargin;
1309  void* pPowerCb;
1310  void* pErrCb;
1311  void* pClientEventCb;
1312  RF_ClientEventMask nClientEventMask;
1313  } clientConfig;
1315  struct {
1316  struct {
1317  rfc_CMD_FS_t cmdFs;
1318  } mode_state;
1319  SemaphoreP_Struct semSync;
1320  RF_EventMask volatile eventSync;
1321  void* pCbSync;
1322  RF_EventMask unpendCause;
1323  ClockP_Struct clkReqAccess;
1324  bool bYielded;
1325  } state;
1326 };
1327 
1336 
1337 
1346 typedef int8_t RF_RatHandle;
1347 
1351 typedef enum {
1358 } RF_InfoType;
1359 
1365 typedef union {
1366  RF_CmdHandle ch;
1367  uint16_t availRatCh;
1369  RF_Handle pClientList[2];
1370  uint32_t phySwitchingTimeInUs[2];
1372 } RF_InfoVal;
1373 
1377 typedef struct {
1378  RF_CmdHandle ch;
1379  RF_Handle pClient;
1380  uint32_t startTime;
1381  uint32_t endTime;
1384 
1388 typedef struct {
1391 } RF_ScheduleMap;
1392 
1418 typedef void (*RF_Callback)(RF_Handle h, RF_CmdHandle ch, RF_EventMask e);
1419 
1433 typedef void (*RF_RatCallback)(RF_Handle h, RF_RatHandle rh, RF_EventMask e, uint32_t compareCaptureTime);
1434 
1450 typedef void (*RF_ClientCallback)(RF_Handle h, RF_ClientEvent event, void* arg);
1451 
1465 typedef void (*RF_GlobalCallback)(RF_Handle h, RF_GlobalEvent event, void* arg);
1466 
1475 typedef struct {
1477 
1479  uint32_t nPowerUpDuration;
1480 
1484 
1487 
1489 
1494 
1496  RF_ClientEventMask nClientEventMask;
1497 } RF_Params;
1499 
1500 /* RF command. */
1501 typedef struct RF_Cmd_s RF_Cmd;
1502 
1503 /* RF command . */
1504 struct RF_Cmd_s {
1505  List_Elem _elem; /* Pointer to next and previous elements. */
1506  RF_Callback volatile pCb; /* Pointer to callback function */
1507  RF_Op* pOp; /* Pointer to (chain of) RF operations(s) */
1508  RF_Object* pClient; /* Pointer to client */
1509  RF_EventMask bmEvent; /* Enable mask for interrupts from the command */
1510  RF_EventMask pastifg; /* Accumulated value of events happened within a command chain */
1511  RF_EventMask rfifg; /* Return value for callback 0:31 - RF_CPE0_INT, 32:63 - RF_HW_INT */
1512  uint32_t startTime; /* Command start time (in RAT ticks) */
1513  uint32_t endTime; /* Command end time (in RAT ticks) */
1514  uint32_t allowDelay; /* Delay allowed if the start time cannot be met. */
1515  RF_CmdHandle ch; /* Command handle */
1516  RF_Priority ePri; /* Priority of RF command */
1517  uint8_t volatile flags; /* [0: Aborted, 1: Stopped, 2: cancelled] */
1518 };
1519 
1525 typedef struct {
1526  uint8_t hwiPriority;
1527  uint8_t swiPriority;
1530  RF_GlobalEventMask globalEventMask;
1532 
1537 typedef enum
1538 {
1542 } RF_Conflict;
1543 
1546 typedef enum
1547 {
1555 
1574 typedef RF_ScheduleStatus (*RF_SubmitHook)(RF_Cmd* pCmdNew, RF_Cmd* pCmdBg, RF_Cmd* pCmdFg, List_List* pPendQueue, List_List* pDoneQueue);
1575 
1588 typedef RF_Conflict (*RF_ConflictHook)(RF_Cmd* pCmdBg, RF_Cmd* pCmdFg, List_List* pPendQueue, List_List* pDoneQueue);
1589 
1595 typedef struct {
1599 
1603 typedef enum {
1605  RF_AllowDelayAny = UINT32_MAX
1606 } RF_AllowDelay;
1607 
1608 /* @brief RF schedule command parameter struct
1609  *
1610  * RF schedule command parameters are used with the RF_scheduleCmd() call.
1611  */
1612 typedef struct {
1613  uint32_t endTime;
1615  uint32_t allowDelay;
1620 
1625 typedef struct {
1626  uint32_t duration;
1627  uint32_t startTime;
1629 } RF_AccessParams;
1630 
1637 typedef enum {
1643 
1649 typedef enum {
1659 
1665 typedef enum {
1671 
1678 typedef enum {
1682 
1697 typedef enum {
1705 
1715 typedef enum {
1724 
1729 typedef struct {
1731  RF_RatHandle channel;
1736 
1741 typedef struct {
1743  RF_RatHandle channel;
1744  uint32_t timeout;
1747 
1752 typedef struct {
1756 
1789 extern RF_Handle RF_open(RF_Object *pObj, RF_Mode *pRfMode, RF_RadioSetup *pRadioSetup, RF_Params *params);
1790 
1801 extern void RF_close(RF_Handle h);
1802 
1813 extern uint32_t RF_getCurrentTime(void);
1814 
1869 extern RF_CmdHandle RF_postCmd(RF_Handle h, RF_Op *pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent);
1870 
1881 extern RF_ScheduleStatus RF_defaultSubmitPolicy(RF_Cmd* pCmdNew, RF_Cmd* pCmdBg, RF_Cmd* pCmdFg, List_List* pPendQueue, List_List* pDoneQueue);
1882 
1892 extern RF_Conflict RF_defaultConflictPolicy(RF_Cmd* pCmdBg, RF_Cmd* pCmdFg, List_List* pPendQueue, List_List* pDoneQueue);
1893 
1894 
1903 extern void RF_ScheduleCmdParams_init(RF_ScheduleCmdParams *pSchParams);
1904 
1931 extern RF_CmdHandle RF_scheduleCmd(RF_Handle h, RF_Op *pOp, RF_ScheduleCmdParams *pSchParams, RF_Callback pCb, RF_EventMask bmEvent);
1932 
1992 extern RF_EventMask RF_pendCmd(RF_Handle h, RF_CmdHandle ch, RF_EventMask bmEvent);
1993 
2021 extern RF_EventMask RF_runCmd(RF_Handle h, RF_Op *pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent);
2022 
2042 extern RF_EventMask RF_runScheduleCmd(RF_Handle h, RF_Op *pOp, RF_ScheduleCmdParams *pSchParams, RF_Callback pCb, RF_EventMask bmEvent);
2043 
2063 extern RF_Stat RF_cancelCmd(RF_Handle h, RF_CmdHandle ch, uint8_t mode);
2064 
2083 extern RF_Stat RF_flushCmd(RF_Handle h, RF_CmdHandle ch, uint8_t mode);
2084 
2098 extern RF_Stat RF_runImmediateCmd(RF_Handle h, uint32_t *pCmdStruct);
2099 
2113 extern RF_Stat RF_runDirectCmd(RF_Handle h, uint32_t cmd);
2114 
2129 extern void RF_yield(RF_Handle h);
2130 
2141 extern void RF_Params_init(RF_Params *params);
2142 
2153 extern RF_Stat RF_getInfo(RF_Handle h, RF_InfoType type, RF_InfoVal *pValue);
2154 
2163 extern int8_t RF_getRssi(RF_Handle h);
2164 
2174 extern RF_Op* RF_getCmdOp(RF_Handle h, RF_CmdHandle cmdHnd);
2175 
2184 extern void RF_RatConfigCompare_init(RF_RatConfigCompare* channelConfig);
2185 
2194 extern void RF_RatConfigCapture_init(RF_RatConfigCapture* channelConfig);
2195 
2204 extern void RF_RatConfigOutput_init(RF_RatConfigOutput* ioConfig);
2205 
2247 extern RF_RatHandle RF_ratCompare(RF_Handle rfHandle, RF_RatConfigCompare* channelConfig, RF_RatConfigOutput* ioConfig);
2248 
2288 extern RF_RatHandle RF_ratCapture(RF_Handle rfHandle, RF_RatConfigCapture* channelConfig, RF_RatConfigOutput* ioConfig);
2289 
2307 extern RF_Stat RF_ratDisableChannel(RF_Handle rfHandle, RF_RatHandle ratHandle);
2308 
2319 extern RF_Stat RF_control(RF_Handle h, int8_t ctrl, void *args);
2320 
2339 extern RF_Stat RF_requestAccess(RF_Handle h, RF_AccessParams *pParams);
2340 
2360 extern RF_TxPowerTable_Value RF_getTxPower(RF_Handle h);
2361 
2381 extern RF_Stat RF_setTxPower(RF_Handle h, RF_TxPowerTable_Value value);
2382 
2402 
2427 extern RF_TxPowerTable_Value RF_TxPowerTable_findValue(RF_TxPowerTable_Entry table[], int8_t powerLevel);
2428 
2429 
2430 #ifdef __cplusplus
2431 }
2432 #endif
2433 
2434 #endif /* ti_drivers_rf__include */
RF Hardware attributes.
Definition: RF.h:1525
uint32_t allowDelay
Definition: RF.h:1615
RF_RatCaptureMode captureMode
Configuration of the mode of event to cause a capture event.
Definition: RF.h:1733
Definition: RF.h:1553
RF_CmdHandle ch
Command handle (RF_GET_CURR_CMD).
Definition: RF.h:1366
Command not executed because RF core is powered down.
Definition: RF.h:1090
Definition: RF.h:1552
RF_ScheduleStatus RF_defaultSubmitPolicy(RF_Cmd *pCmdNew, RF_Cmd *pCmdBg, RF_Cmd *pCmdFg, List_List *pPendQueue, List_List *pDoneQueue)
Sorts and adds commands to the RF driver internal command queue.
void(* RF_ClientCallback)(RF_Handle h, RF_ClientEvent event, void *arg)
Handles events related to a driver instance.
Definition: RF.h:1450
RF driver configuration parameters.
Definition: RF.h:1475
rfc_CMD_RADIO_SETUP_PA_t common_pa
Radio setup command for BLE and IEEE modes with High Gain PA.
Definition: RF.h:1124
uint32_t startTime
Start time window in RAT Time for radio access.
Definition: RF.h:1627
RF_Callback volatile pCb
Definition: RF.h:1506
RF_RatCallback callback
Callback function to be invoked upon a capture event (optional).
Definition: RF.h:1742
Use RAT user channel 2.
Definition: RF.h:1641
RF_InfoType
Selects the entry of interest in RF_getInfo().
Definition: RF.h:1351
RF_Stat RF_setTxPower(RF_Handle h, RF_TxPowerTable_Value value)
Updates the transmit power configuration of the RF core.
uint16_t nPowerUpDurationMargin
Definition: RF.h:1488
Conigure RAT_CHANNEL[x] to interface with RAT_GPO[1].
Definition: RF.h:1716
The RF core has been powered up the radio setup has been finished.
Definition: RF.h:1160
RF_ClientEvent
Client-related RF driver events.
Definition: RF.h:1159
Definition: List.h:131
RF_Stat
Status codes for various RF driver functions.
Definition: RF.h:1088
rfc_CMD_PROP_RADIO_SETUP_PA_t prop_pa
Radio setup command for PROPRIETARY mode on 2.4 GHz with High Gain PA.
Definition: RF.h:1126
uint8_t rfMode
Specifies which PHY modes should be activated. Must be set to RF_MODE_MULTIPLE for dual-mode operatio...
Definition: RF.h:1058
RF_Priority priority
Intra client priority.
Definition: RF.h:1614
void(* RF_Callback)(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
Handles events related to RF command execution.
Definition: RF.h:1418
RF_EventMask RF_pendCmd(RF_Handle h, RF_CmdHandle ch, RF_EventMask bmEvent)
Synchronizes the calling task to an RF operation command ch and returns accumulated event flags...
Conigure RAT_CHANNEL[x] to interface with RAT_GPO[7].
Definition: RF.h:1722
RF_ClientEventMask nClientEventMask
Definition: RF.h:1496
Selects the RTC update signal source.
Definition: RF.h:1650
RF_RatCaptureSource
Selects the source signal for RF_ratCapture().
Definition: RF.h:1649
RF schedule map entry structure.
Definition: RF.h:1377
RF_CmdHandle RF_postCmd(RF_Handle h, RF_Op *pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent)
Appends RF operation commands to the driver&#39;s command queue and returns a command handle...
Command finished with success.
Definition: RF.h:1095
RF_EventMask RF_runScheduleCmd(RF_Handle h, RF_Op *pOp, RF_ScheduleCmdParams *pSchParams, RF_Callback pCb, RF_EventMask bmEvent)
Runs synchronously a (chain of) RF operation(s) for dual or single-mode.
Conigure RAT_CHANNEL[x] to interface with RAT_GPO[2].
Definition: RF.h:1717
uint32_t allowDelay
Definition: RF.h:1514
Command not executed because RF driver is busy.
Definition: RF.h:1089
Highest priority. Only use this for urgent commands.
Definition: RF.h:1075
RF_EventMask rfifg
Definition: RF.h:1511
Definition: RF.h:1504
RF_Stat RF_runImmediateCmd(RF_Handle h, uint32_t *pCmdStruct)
Send any Immediate command.
High-power PA.
Definition: RF.h:1029
Definition: RF.h:1652
void RF_RatConfigCompare_init(RF_RatConfigCompare *channelConfig)
Initialize the configuration structure to be used to set up a RAT compare event.
RF_RatHandle channel
RF_RatHandle identifies the channel to be allocated.
Definition: RF.h:1731
Sets the output high independently of any RAT events.
Definition: RF.h:1703
uint64_t RF_EventMask
Data type for events during command execution.
Definition: RF.h:1104
uint32_t RF_ClientEventMask
Event mask for combining RF_ClientEvent event flags in RF_Params::nClientEventMask.
Definition: RF.h:1219
uint32_t nPowerUpDuration
Definition: RF.h:1479
Command successfully scheduled for execution.
Definition: RF.h:1096
uint8_t swiPriority
Priority for SWIs belong to the RF driver.
Definition: RF.h:1527
Provide the client to client switching times.
Definition: RF.h:1357
RF_TxPowerTable_Value RF_getTxPower(RF_Handle h)
Returns the currently configured transmit power configuration.
void RF_close(RF_Handle h)
Close client connection to RF driver.
Use RAT user channel 0.
Definition: RF.h:1639
Definition: RF.h:1549
Definition: RF.h:1161
Cmd is found in the pool but was already ended.
Definition: RF.h:1093
RF_RatOutputMode
Selects the mode of the RAT_GPO[x] for RF_ratCompare() or RF_ratCapture().
Definition: RF.h:1697
uint8_t volatile flags
Definition: RF.h:1517
rfc_CMD_PROP_RADIO_DIV_SETUP_t prop_div
Radio setup command for PROPRIETARY mode on Sub-1 Ghz.
Definition: RF.h:1121
List_Elem _elem
Definition: RF.h:1505
Use RAT user channel 1.
Definition: RF.h:1640
uint32_t RF_getCurrentTime(void)
Return current radio timer value.
Signals the client that the RF driver is about to switch over from another client.
Definition: RF.h:1165
RF_GlobalEventMask globalEventMask
Event mask which the globalCallback is invoked upon.
Definition: RF.h:1530
Selects the Generic event of Event Fabric as source.
Definition: RF.h:1651
Stores output parameters for RF_getInfo().
Definition: RF.h:1365
RF_Object * RF_Handle
A handle that is returned by to RF_open().
Definition: RF.h:1335
uint32_t RF_GlobalEventMask
Event mask for combining RF_GlobalEvent event flags in RFCC26XX_HWAttrsV2::globalEventMask.
Definition: RF.h:1224
void(* RF_GlobalCallback)(RF_Handle h, RF_GlobalEvent event, void *arg)
Handles global events as part of PHY configuration.
Definition: RF.h:1465
RF_Handle pClient
Pointer to client object.
Definition: RF.h:1379
RF_CmdHandle ch
Definition: RF.h:1515
RF_Priority ePri
Definition: RF.h:1516
Provide the client list.
Definition: RF.h:1356
void(* RF_RatCallback)(RF_Handle h, RF_RatHandle rh, RF_EventMask e, uint32_t compareCaptureTime)
Handles events related to the Radio Timer (RAT).
Definition: RF.h:1433
#define RF_NUM_SCHEDULE_ACCESS_ENTRIES
Number of access request entries.
Definition: RF.h:930
RAT related IO parameter structure.
Definition: RF.h:1752
RF_CmdHandle ch
Command handle.
Definition: RF.h:1378
RF_EventMask RF_runCmd(RF_Handle h, RF_Op *pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent)
Runs synchronously an RF operation command or a chain of commands and returns the termination reason...
int8_t RF_TxPowerTable_findPowerLevel(RF_TxPowerTable_Entry table[], RF_TxPowerTable_Value value)
Retrieves a power level in dBm for a given power configuration value.
Conigure RAT_CHANNEL[x] to interface with RAT_GPO[3].
Definition: RF.h:1718
RF_Priority priority
Priority of the command or access request.
Definition: RF.h:1382
rfc_radioOp_t RF_Op
Base type for all radio operation commands.
Definition: RF.h:1046
Definition: RF.h:1668
Default priority. Use this in single-client applications.
Definition: RF.h:1077
RF_ratCapture parameter structure.
Definition: RF.h:1729
int8_t RF_getRssi(RF_Handle h)
Get RSSI value.
bool bRadioState
Current RF core power state (RF_GET_RADIO_STATE).
Definition: RF.h:1368
RF_RatOutputSelect select
The signal which shall be connected to the GPO.
Definition: RF.h:1754
Definition: RF.h:1539
uint32_t endTime
Definition: RF.h:1513
Definition: List.h:126
uint32_t duration
Radio access duration in RAT Ticks requested by the client.
Definition: RF.h:1626
Definition: RF.h:1540
Definition: RF.h:1551
RF_RatCaptureSource source
Configuration of the event source to cause a capture event.
Definition: RF.h:1732
Definition: RF.h:1604
void RF_yield(RF_Handle h)
Signal that radio client is not going to issue more commands in a while.
RF_RatCaptureRepetition repeat
Configuration of the channel to be used in single or repeate mode.
Definition: RF.h:1734
void RF_RatConfigOutput_init(RF_RatConfigOutput *ioConfig)
Initialize the configuration structure to be used to set up a RAT IO.
#define RF_NUM_SCHEDULE_COMMAND_ENTRIES
Number of scheduled command entries.
Definition: RF.h:931
uint32_t startTime
Start time (in RAT tick) of the command or access request.
Definition: RF.h:1380
uint32_t endTime
End time in RAT Ticks for the radio command.
Definition: RF.h:1613
Rearm the channel after each capture events.
Definition: RF.h:1680
RF_GlobalCallback globalCallback
Pointer to a callback function serving client independent events listed in RF_GlobalEvent.
Definition: RF.h:1529
Definition: RF.h:1605
Definition: RF.h:1655
Create a bitmask showing available RAT channels.
Definition: RF.h:1353
RF_Stat RF_flushCmd(RF_Handle h, RF_CmdHandle ch, uint8_t mode)
Abort/stop/cancel command and any subsequent commands in command queue.
RF_Stat RF_cancelCmd(RF_Handle h, RF_CmdHandle ch, uint8_t mode)
Abort/stop/cancel single command in command queue.
Definition: RF.h:1612
Conigure RAT_CHANNEL[x] to interface with RAT_GPO[4].
Definition: RF.h:1719
RF_Callback pPowerCb
Definition: RF.h:1483
RF_RatCaptureMode
Selects the mode of RF_ratCapture().
Definition: RF.h:1665
int16_t RF_CmdHandle
Command handle that is returned by RF_postCmd().
Definition: RF.h:1238
RF_ClientCallback pClientEventCb
Definition: RF.h:1493
Definition: RF.h:1548
Definition: RF.h:1541
Definition: RF.h:1550
RF_ScheduleStatus
Describes the location within the pend queue where the new command was inserted by the scheduler...
Definition: RF.h:1546
uint16_t availRatCh
Available RAT channels (RF_GET_AVAIL_RAT_CH).
Definition: RF.h:1367
RF_TxPowerTable_PAType
Selects a power amplifier path in a TX power value.
Definition: RF.h:1027
Conigure RAT_CHANNEL[x] to interface with RAT_GPO[6].
Definition: RF.h:1721
rfc_CMD_BLE5_RADIO_SETUP_PA_t ble5_pa
Radio setup command for BLE5 mode with High Gain PA.
Definition: RF.h:1125
uint32_t timeout
Definition: RF.h:1744
RF_RatOutputSelect
Selects GPO to be used with RF_ratCompare() or RF_ratCapture().
Definition: RF.h:1715
RF_Op * RF_getCmdOp(RF_Handle h, RF_CmdHandle cmdHnd)
Get command structure pointer.
uint32_t startTime
Definition: RF.h:1512
General error specifier.
Definition: RF.h:1094
RF_Conflict RF_defaultConflictPolicy(RF_Cmd *pCmdBg, RF_Cmd *pCmdFg, List_List *pPendQueue, List_List *pDoneQueue)
Makes a final decision when a conflict in run-time is identified.
uint32_t endTime
End time (in RAT tick) of the command or access request.
Definition: RF.h:1381
int8_t power
Definition: RF.h:1014
RF_ScheduleStatus(* RF_SubmitHook)(RF_Cmd *pCmdNew, RF_Cmd *pCmdBg, RF_Cmd *pCmdFg, List_List *pPendQueue, List_List *pDoneQueue)
Handles the queue sorting algorithm when a new command is submitted to the driver from any of the ati...
Definition: RF.h:1574
Free the channel after the first capture event.
Definition: RF.h:1679
Rising edge of the selected source will trigg a capture event.
Definition: RF.h:1666
int8_t RF_RatHandle
RAT handle that is returned by RF_ratCompare() or RF_ratCapture().
Definition: RF.h:1346
RF_RatHandle RF_ratCapture(RF_Handle rfHandle, RF_RatConfigCapture *channelConfig, RF_RatConfigOutput *ioConfig)
Setup a Radio Timer (RAT) channel in capture mode.
RF request access parameter struct.
Definition: RF.h:1625
RF_Stat RF_getInfo(RF_Handle h, RF_InfoType type, RF_InfoVal *pValue)
Get value for some RF driver parameters.
Command finished with an error.
Definition: RF.h:1091
Provide a timetable of all scheduled commands.
Definition: RF.h:1355
RF_Conflict
Controls the behaviour of the state machine of the RF driver when a conflict is identified run-time b...
Definition: RF.h:1537
RF_Priority
Scheduling priority of RF operation commands.
Definition: RF.h:1074
RF_RatOutputMode mode
The mode the GPO should operate in.
Definition: RF.h:1753
Function was called with an invalid parameter.
Definition: RF.h:1092
RF_AllowDelay
Controls the behaviour of the RF_scheduleCmd() API.
Definition: RF.h:1603
TX power configuration entry in a TX power table.
Definition: RF.h:1012
High priority. Use this for time-critical commands in synchronous protocols.
Definition: RF.h:1076
void RF_RatConfigCapture_init(RF_RatConfigCapture *channelConfig)
Initialize the configuration structure to be used to set up a RAT capture event.
A unified type for radio setup commands of different PHYs.
Definition: RF.h:1115
RF_RatHandle RF_ratCompare(RF_Handle rfHandle, RF_RatConfigCompare *channelConfig, RF_RatConfigOutput *ioConfig)
Setup a Radio Timer (RAT) channel in compare mode.
RF_TxPowerTable_Value value
PA hardware configuration for that power level.
Definition: RF.h:1017
RF_Op * pOp
Definition: RF.h:1507
uint32_t nInactivityTimeout
Definition: RF.h:1476
RF schedule map structure.
Definition: RF.h:1388
RF_ratCompare parameter structure.
Definition: RF.h:1741
RF_EventMask pastifg
Definition: RF.h:1510
RF_TxPowerTable_Value RF_TxPowerTable_findValue(RF_TxPowerTable_Entry table[], int8_t powerLevel)
Retrieves a power configuration value for a given power level in dBm.
Generates a one-clock period width pulse.
Definition: RF.h:1698
RF_SubmitHook submitHook
Function hook implements the scheduling policy to be executed at the time of RF_scheduleCmd API call...
Definition: RF.h:1596
RF_RatSelectChannel
Select the preferred RAT channel through the configuration of RF_ratCompare() or RF_ratCapture().
Definition: RF.h:1637
rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t prop_div_pa
Radio setup command for PROPRIETARY mode on Sub-1 Ghz with High Gain PA.
Definition: RF.h:1127
Sets the output high on a RAT event.
Definition: RF.h:1699
Falling edge of the selected source will trigg a capture event.
Definition: RF.h:1667
Inverts the polarity of the output.
Definition: RF.h:1701
Chose the first available channel.
Definition: RF.h:1638
RF_RatHandle channel
RF_RatHandle identifies the channel to be allocated.
Definition: RF.h:1743
bool xoscHfAlwaysNeeded
Indicate that the XOSC HF should be turned on by the power driver.
Definition: RF.h:1528
RF_Stat RF_requestAccess(RF_Handle h, RF_AccessParams *pParams)
Request radio access.
RF_ConflictHook conflictHook
Function hook implements the runtime conflict resolution, if any identified at the start time of next...
Definition: RF.h:1597
RF_Stat RF_runDirectCmd(RF_Handle h, uint32_t cmd)
Send any Direct command.
void RF_ScheduleCmdParams_init(RF_ScheduleCmdParams *pSchParams)
Initialize the configuration structure to default values to be used with the RF_scheduleCmd() API...
Definition: RF.h:1210
RF_Stat RF_ratDisableChannel(RF_Handle rfHandle, RF_RatHandle ratHandle)
Disable a RAT channel.
RF scheduler policy.
Definition: RF.h:1595
Definition: RF.h:1206
Retrieve a command handle of the current command.
Definition: RF.h:1352
Specifies a RF core firmware configuration.
Definition: RF.h:1057
RF_Object * pClient
Definition: RF.h:1508
rfc_command_t commandId
Definition: RF.h:1116
RF_Handle RF_open(RF_Object *pObj, RF_Mode *pRfMode, RF_RadioSetup *pRadioSetup, RF_Params *params)
Creates a a new client instance of the RF driver.
RF_RatCaptureRepetition
Selects the repetition of RF_ratCapture().
Definition: RF.h:1678
rfc_CMD_PROP_RADIO_SETUP_t prop
Radio setup command for PROPRIETARY mode on 2.4 GHz.
Definition: RF.h:1120
rfc_CMD_BLE5_RADIO_SETUP_t ble5
Radio setup command for BLE5 mode.
Definition: RF.h:1119
PA configuration value for a certain power level.
Definition: RF.h:982
RF_RatCallback callback
Callback function to be invoked upon a capture event (optional).
Definition: RF.h:1730
Conigure RAT_CHANNEL[x] to interface with RAT_GPO[5].
Definition: RF.h:1720
Function finished with success.
Definition: RF.h:1097
RF_Callback pErrCb
Definition: RF.h:1486
Sets the output low on a RAT event.
Definition: RF.h:1700
RF_CmdHandle RF_scheduleCmd(RF_Handle h, RF_Op *pOp, RF_ScheduleCmdParams *pSchParams, RF_Callback pCb, RF_EventMask bmEvent)
Schedule an RF operation (chain) to the command queue.
Sets the output low independently of any RAT events.
Definition: RF.h:1702
RF_GlobalEvent
Global RF driver events.
Definition: RF.h:1205
RF_Stat RF_control(RF_Handle h, int8_t ctrl, void *args)
Set RF control parameters.
uint8_t hwiPriority
Priority for HWIs belong to the RF driver.
Definition: RF.h:1526
void RF_Params_init(RF_Params *params)
Function to initialize the RF_Params struct to its defaults.
RF_EventMask bmEvent
Definition: RF.h:1509
Stores the client&#39;s internal confguration and states.
Linked List interface for use in drivers.
Show the current RF core power state. 0: Radio OFF, 1: Radio ON.
Definition: RF.h:1354
RF_Priority priority
Access priority.
Definition: RF.h:1628
void * pScheduleMap
Pointer to scheduling map (RF_GET_SCHEDULE_MAP).
Definition: RF.h:1371
RF_Conflict(* RF_ConflictHook)(RF_Cmd *pCmdBg, RF_Cmd *pCmdFg, List_List *pPendQueue, List_List *pDoneQueue)
Defines the conflict resolution in runtime.
Definition: RF.h:1588
Default PA.
Definition: RF.h:1028
© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale