RFFE Radio Frequency Front End Macro Definition Documentation
STABILIZATION_DELAY
#define STABILIZATION_DELAY (SystemCoreClock * 3 / 625)
Location: rffe.h:46
MEASUREMENT_DELAY
#define MEASUREMENT_DELAY (SystemCoreClock / 625)
Location: rffe.h:49
V_TO_MV
#define V_TO_MV 1000
Location: rffe.h:52
V_TO_MV_F
#define V_TO_MV_F 1000.0f
Location: rffe.h:55
DEF_CHANNEL
#define DEF_CHANNEL 6
Location: rffe.h:58
MAX_LSAD_CHANNEL
#define MAX_LSAD_CHANNEL 7
Location: rffe.h:61
VDDPA_EN
#define VDDPA_EN 1
Location: rffe.h:64
VDDPA_DIS
#define VDDPA_DIS 0
Location: rffe.h:67
VCC_VDDRF_MARGIN
#define VCC_VDDRF_MARGIN 50
Location: rffe.h:70
TRIM_MARGIN
#define TRIM_MARGIN 10 /*mv*/
Location: rffe.h:74
MV_PER_DBM_VDDPA
#define MV_PER_DBM_VDDPA 100
Location: rffe.h:77
MV_PER_DBM_VDDRF
#define MV_PER_DBM_VDDRF 75
Location: rffe.h:80
STEPS_PER_DBM_VDDRF
#define STEPS_PER_DBM_VDDRF 6
Location: rffe.h:83
STEPS_PER_DBM_VDDPA
#define STEPS_PER_DBM_VDDPA 10
Location: rffe.h:86
RF_MAX_POWER
#define RF_MAX_POWER 6
Location: rffe.h:89
RF_MAX_POWER_NO_VDDPA
#define RF_MAX_POWER_NO_VDDPA 2
Location: rffe.h:92
RF_NO_VDDPA_TYPICAL_POWER
#define RF_NO_VDDPA_TYPICAL_POWER 0
Location: rffe.h:95
RF_DEFAULT_POWER
#define RF_DEFAULT_POWER 0
Location: rffe.h:98
RF_MIN_POWER
#define RF_MIN_POWER -17
Location: rffe.h:101
PA_PWR_BYTE_0DBM
#define PA_PWR_BYTE_0DBM 0x0C
Location: rffe.h:104
PA_ENABLE_BIAS_SETTING
#define PA_ENABLE_BIAS_SETTING 0xF3
Location: rffe.h:107
PA_DISABLE_BIAS_SETTING
#define PA_DISABLE_BIAS_SETTING 0x73
Location: rffe.h:110
SW_CTRL_DELAY_3_BYTE
#define SW_CTRL_DELAY_3_BYTE ((uint8_t)0x2U)
Location: rffe.h:114
RAMPUP_DELAY_3_BYTE
#define RAMPUP_DELAY_3_BYTE ((uint8_t)0x2U)
Location: rffe.h:117
DISABLE_DELAY_3_BYTE
#define DISABLE_DELAY_3_BYTE ((uint8_t)0x2U)
Location: rffe.h:120
ERRNO_TX_POWER_MARKER
#define ERRNO_TX_POWER_MARKER 0x30
Location: rffe.h:124
ERRNO_NO_TRIMS
#define ERRNO_NO_TRIMS (0x01 | ERRNO_TX_POWER_MARKER)
Location: rffe.h:127
ERRNO_RFFE_MISSINGSETTING_ERROR
#define ERRNO_RFFE_MISSINGSETTING_ERROR (0x02 | ERRNO_TX_POWER_MARKER)
Location: rffe.h:130
ERRNO_RFFE_INVALIDSETTING_ERROR
#define ERRNO_RFFE_INVALIDSETTING_ERROR (0x03 | ERRNO_TX_POWER_MARKER)
Location: rffe.h:133
ERRNO_RFFE_VCC_INSUFFICIENT
#define ERRNO_RFFE_VCC_INSUFFICIENT (0x04 | ERRNO_TX_POWER_MARKER)
Location: rffe.h:136
WARNING_RFFE_VLOW_POWER_STATE
#define WARNING_RFFE_VLOW_POWER_STATE (0x05 | ERRNO_TX_POWER_MARKER)
Location: rffe.h:140
WARNING_RFFE_PA_ENABLED_STATE
#define WARNING_RFFE_PA_ENABLED_STATE (0x06 | ERRNO_TX_POWER_MARKER)
Location: rffe.h:143
CONVERT
#define CONVERT ((uint32_t)((x * 1000) >> 13))
Location: rffe.h:154
Parameters
Direction | Name | Description |
---|---|---|
in |
x |
the ADC code input |
Return
Assumptions
Low frequency mode for the ADC is used, meaning that the resolution of the ADC is 14-bits. CONVERT provides voltage level as a milliVolt value based on the input ADC code.
SWAP
#define SWAP ((t) = (a), (a) = (b), (b) = (t))
Location: rffe.h:164
Parameters
Direction | Name | Description |
---|---|---|
in |
a |
holds the value that must go to b |
in |
b |
holds the value that must go to a |
in |
t |
a temporary buffer for the swap |
Return
SYS_RFFE_SETTXPOWER
#define SYS_RFFE_SETTXPOWER Sys_RFFE_SetTXPower(target, DEF_CHANNEL, VDDPA_DIS)
Location: rffe.h:208
Parameters
Direction | Name | Description |
---|---|---|
in |
target |
Target transmission power in the range from -17 to +6 dBm in 1 dBm increments. |
Return
Example Code for SYS_RFFE_SETTXPOWER |
// Reads the current register settings and measures VDDRF, if requried, to // determine the current TX power setting. result = SYS_RFFE_SETTXPOWER(0); |