# RFFE Radio Frequency Front End

Radio Frequency Front End (RFFE) hardware abstraction layer.

## Summary

Macros

- STABILIZATION_DELAY : External include files.
- MEASUREMENT_DELAY : Corresponds to sample rate of the LSAD as configured (625 Hz)
- V_TO_MV : Factor for converting back and forth from mV to V.
- V_TO_MV_F : Float iteration of factor for converting back and forth from mV to V.
- DEF_CHANNEL : Default LSAD channel used to measure voltage rails.
- MAX_LSAD_CHANNEL : Maximum number of LSAD channels in the design.
- VDDPA_EN : VDDPA enable selection.
- VDDPA_DIS : VDDPA disable selection.
- VCC_VDDRF_MARGIN : We strongly recommended having VCC at least 50mV higher than VDDRF.
- TRIM_MARGIN : Trim margin.
- MV_PER_DBM_VDDPA : Estimated voltage increase per 1dBm increased TX power.
- MV_PER_DBM_VDDRF : Estimated voltage increase per 1dBm increased TX power.
- STEPS_PER_DBM_VDDRF : Estimated trim steps per 1dBm increased TX power.
- STEPS_PER_DBM_VDDPA : Estimated trim steps per 1dBm increased TX power.
- RF_MAX_POWER : Maximum RF output power possible.
- RF_MAX_POWER_NO_VDDPA : Maximum RF output power possible without using VDDPA.
- RF_NO_VDDPA_TYPICAL_POWER : Typical RF output power when VDDPA is not used, with default trims.
- RF_DEFAULT_POWER : RF output power used by default.
- RF_MIN_POWER : Minimum possible RF output power.
- PA_PWR_BYTE_0DBM : RF Output Power code for 0dBm.
- PA_ENABLE_BIAS_SETTING : Power amplifier bias enable.
- PA_DISABLE_BIAS_SETTING : Power amplifier bias disable.
- SW_CTRL_DELAY_3_BYTE : Switch control delay.
- RAMPUP_DELAY_3_BYTE : Ramp-up delay.
- DISABLE_DELAY_3_BYTE : Disable delay.
- ERRNO_TX_POWER_MARKER : Error marker for RFFE errors.
- ERRNO_NO_TRIMS : No trims found when attempting to adjust voltage rails.
- ERRNO_RFFE_MISSINGSETTING_ERROR : Setting does not exist.
- ERRNO_RFFE_INVALIDSETTING_ERROR : Setting is not possible.
- ERRNO_RFFE_VCC_INSUFFICIENT : VCC is too low to increase VDDRF sufficiently to suppor the requested RF output power.
- WARNING_RFFE_VLOW_POWER_STATE : Warning that the device is in a very low RF output power state.
- WARNING_RFFE_PA_ENABLED_STATE : Warning that the device has the power amplifier enabled.
- CONVERT : Converts an ADC code to a voltage, calculated as follows voltage = adc_code * (2 V * 1000 [mV]/1 V / 2^14 steps).
- SWAP : Swap the values in variables a and b.
- SYS_RFFE_SETTXPOWER : Set the TX Power according to the desired target value with an accuracy of +/-1 dBm for +6 dBm to -17 dBm.

Functions

- Sys_RFFE_GetTXPower : Retrieve the current setting for RF output power by using the values retrieved from the appropriate registers.
- Sys_RFFE_SetTXPower : Set the TX Power according to the desired target value with an accuracy of +/-1 dBm for +6 dBm to -17 dBm.