RFFE Radio Frequency Front End Macro Definition Documentation

 

STABILIZATION_DELAY

#define STABILIZATION_DELAY (SystemCoreClock * 3 / 625)

 

Location: rffe.h:46

 

External include files.

 

Three times the length of time corresponding to the minimum sample rate, which is deemed sufficient to allow the LSAD to stabilize

 

MEASUREMENT_DELAY

#define MEASUREMENT_DELAY (SystemCoreClock / 625)

 

Location: rffe.h:49

 

Corresponds to sample rate of the LSAD as configured (625 Hz)

 

V_TO_MV

#define V_TO_MV 1000

 

Location: rffe.h:52

 

Factor for converting back and forth from mV to V.

 

V_TO_MV_F

#define V_TO_MV_F 1000.0f

 

Location: rffe.h:55

 

Float iteration of factor for converting back and forth from mV to V.

 

DEF_CHANNEL

#define DEF_CHANNEL 6

 

Location: rffe.h:58

 

Default LSAD channel used to measure voltage rails.

 

MAX_LSAD_CHANNEL

#define MAX_LSAD_CHANNEL 7

 

Location: rffe.h:61

 

Maximum number of LSAD channels in the design.

 

VDDPA_EN

#define VDDPA_EN 1

 

Location: rffe.h:64

 

VDDPA enable selection.

 

VDDPA_DIS

#define VDDPA_DIS 0

 

Location: rffe.h:67

 

VDDPA disable selection.

 

VCC_VDDRF_MARGIN

#define VCC_VDDRF_MARGIN 50

 

Location: rffe.h:70

 

We strongly recommended having VCC at least 50mV higher than VDDRF.

 

TRIM_MARGIN

#define TRIM_MARGIN 10 /*mv*/

 

Location: rffe.h:74

 

Trim margin.

 

The granularity of trims for VDDRF allow for a certain error above or below the set value

 

MV_PER_DBM_VDDPA

#define MV_PER_DBM_VDDPA 100

 

Location: rffe.h:77

 

Estimated voltage increase per 1dBm increased TX power.

 

MV_PER_DBM_VDDRF

#define MV_PER_DBM_VDDRF 75

 

Location: rffe.h:80

 

Estimated voltage increase per 1dBm increased TX power.

 

STEPS_PER_DBM_VDDRF

#define STEPS_PER_DBM_VDDRF 6

 

Location: rffe.h:83

 

Estimated trim steps per 1dBm increased TX power.

 

STEPS_PER_DBM_VDDPA

#define STEPS_PER_DBM_VDDPA 10

 

Location: rffe.h:86

 

Estimated trim steps per 1dBm increased TX power.

 

RF_MAX_POWER

#define RF_MAX_POWER 6

 

Location: rffe.h:89

 

Maximum RF output power possible.

 

RF_MAX_POWER_NO_VDDPA

#define RF_MAX_POWER_NO_VDDPA 2

 

Location: rffe.h:92

 

Maximum RF output power possible without using VDDPA.

 

RF_NO_VDDPA_TYPICAL_POWER

#define RF_NO_VDDPA_TYPICAL_POWER 0

 

Location: rffe.h:95

 

Typical RF output power when VDDPA is not used, with default trims.

 

RF_DEFAULT_POWER

#define RF_DEFAULT_POWER 0

 

Location: rffe.h:98

 

RF output power used by default.

 

RF_MIN_POWER

#define RF_MIN_POWER -17

 

Location: rffe.h:101

 

Minimum possible RF output power.

 

PA_PWR_BYTE_0DBM

#define PA_PWR_BYTE_0DBM 0x0C

 

Location: rffe.h:104

 

RF Output Power code for 0dBm.

 

PA_ENABLE_BIAS_SETTING

#define PA_ENABLE_BIAS_SETTING 0xF3

 

Location: rffe.h:107

 

Power amplifier bias enable.

 

PA_DISABLE_BIAS_SETTING

#define PA_DISABLE_BIAS_SETTING 0x73

 

Location: rffe.h:110

 

Power amplifier bias disable.

 

SW_CTRL_DELAY_3_BYTE

#define SW_CTRL_DELAY_3_BYTE ((uint8_t)0x2U)

 

Location: rffe.h:114

 

Switch control delay.

 

RAMPUP_DELAY_3_BYTE

#define RAMPUP_DELAY_3_BYTE ((uint8_t)0x2U)

 

Location: rffe.h:117

 

Ramp-up delay.

 

DISABLE_DELAY_3_BYTE

#define DISABLE_DELAY_3_BYTE ((uint8_t)0x2U)

 

Location: rffe.h:120

 

Disable delay.

 

ERRNO_TX_POWER_MARKER

#define ERRNO_TX_POWER_MARKER 0x30

 

Location: rffe.h:124

 

Error marker for RFFE errors.

 

ERRNO_NO_TRIMS

#define ERRNO_NO_TRIMS (0x01 | ERRNO_TX_POWER_MARKER)

 

Location: rffe.h:127

 

No trims found when attempting to adjust voltage rails.

 

ERRNO_RFFE_MISSINGSETTING_ERROR

#define ERRNO_RFFE_MISSINGSETTING_ERROR (0x02 | ERRNO_TX_POWER_MARKER)

 

Location: rffe.h:130

 

Setting does not exist.

 

ERRNO_RFFE_INVALIDSETTING_ERROR

#define ERRNO_RFFE_INVALIDSETTING_ERROR (0x03 | ERRNO_TX_POWER_MARKER)

 

Location: rffe.h:133

 

Setting is not possible.

 

ERRNO_RFFE_VCC_INSUFFICIENT

#define ERRNO_RFFE_VCC_INSUFFICIENT (0x04 | ERRNO_TX_POWER_MARKER)

 

Location: rffe.h:136

 

VCC is too low to increase VDDRF sufficiently to suppor the requested RF output power.

 

WARNING_RFFE_VLOW_POWER_STATE

#define WARNING_RFFE_VLOW_POWER_STATE (0x05 | ERRNO_TX_POWER_MARKER)

 

Location: rffe.h:140

 

Warning that the device is in a very low RF output power state.

 

WARNING_RFFE_PA_ENABLED_STATE

#define WARNING_RFFE_PA_ENABLED_STATE (0x06 | ERRNO_TX_POWER_MARKER)

 

Location: rffe.h:143

 

Warning that the device has the power amplifier enabled.

 

CONVERT

#define CONVERT ((uint32_t)((x * 1000) >> 13))

 

Location: rffe.h:154

 

Converts an ADC code to a voltage, calculated as follows voltage = adc_code * (2 V * 1000 [mV]/1 V / 2^14 steps).

 


Returns:
The voltage output in mV

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.

 

Parameters

Direction Name Description

in

x

the ADC code input

 

SWAP

#define SWAP ((t) = (a), (a) = (b), (b) = (t))

 

Location: rffe.h:164

 

Swap the values in variables a and b.

 


Returns:
a holds the value previously in b

Returns:
b holds the value previously in a

 

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

 

SYS_RFFE_SETTXPOWER

#define SYS_RFFE_SETTXPOWER Sys_RFFE_SetTXPower(target, DEF_CHANNEL, VDDPA_DIS)

 

Location: rffe.h:208

 

Set the TX Power according to the desired target value with an accuracy of +/-1 dBm for +6 dBm to -17 dBm.

 

This function sets VDDRF, VDDPA, and PA_PWR (RF_REG1A) when applicable. Note: This function provides RF TX power configurations that match the requested levels, without considering the potential for increased power consumption due to the use of VDDPA. target Target transmission power in the range from -17 to +6 dBm in 1 dBm increments.
Returns:
Return value error value, if any

 

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);


Returns:
Return value error value, if any

 

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);

 

Parameters

Direction Name Description

in

target

Target transmission power in the range from -17 to +6 dBm in 1 dBm increments.