PA Power Configs in persistent memory#
RAIL PA NVM Configs Utility#
This optional software component can be enabled to allow overriding an application's compile-time default configurations for PA mode and PA power curve/table settings for the supported modes. This might be used to calibrate a particular device or set of devices. These overriding settings must still conform to the platform's possible PA modes and curve/table sizes. This component currently supports only EFR32xG24 and xG26.
By enabling this component, at application startup time the Power Amplifier (PA) Utility component will check for the existence of these NVM3 tokens:
SL_RAIL_UTIL_PA_NVM_MODE_TAG containing a RAIL_TxPowerMode_t.
If this token exists and is a valid PA mode supported by the platform, it will override the compile-time RAIL_TxPowerConfig_t::mode returned by sl_rail_util_pa_get_tx_power_config_2p4ghz() which is used by stacks and applications to get the Power Amplifier (PA) Utility component's power configuration.SL_RAIL_UTIL_PA_NVM_CONFIG_TAG containing a sl_rail_nvm_pa_config_t.
If this token exists and is valid, it will override the compile-time RAIL_TxPowerCurvesConfigAlt_t configuration which is applied in Power Amplifier (PA) Utility component's initialization call to RAIL_InitTxPowerCurvesAlt().
The component provides APIs for writing and reading these NVM3 tokens, please refer to the sl_rail_util_pa_nvm_configs.h file for details.
See these documents for in-depth explanations of how to configure and use the available PA features:
AN1127: Power Amplifier Power Conversion Functions in RAIL 2.x
Configuration Options#
This component has no configuration options.
EFR32xG24 Example#
The default PA curves/tables configuration that RAIL provides for the VBAT powered 20 dBm EFR32xG24 (in plugin/pa-conversions/efr32xg24/sl_rail_util_pa_curves_20dbm.h) would have the following sl_rail_nvm_pa_config_t layout when stored in the NVM3 SL_RAIL_UTIL_PA_NVM_CONFIG_TAG. Multi-byte fields must be stored in little-endian format. The byte offet of each field/value is shown in comments below:
static sl_rail_nvm_pa_config_t serialized_pa_config = {
/*byte*/
/* 0*/ .version = 1,
/* 1*/ .num_descriptors = 2,
/* 2*/ .pa_voltage = 0,
/* 4*/ .signature = 0,
/* 8*/ .pa_descriptors = {
/* 8*/ { .algorithm = 0,
/* 9*/ .num_segments_or_entries = 8,
/* 10*/ .min = 0,
/* 11*/ .max = 180,
/* 12*/ },
/* 12*/ { .algorithm = 1,
/* 13*/ .num_segments_or_entries = 16,
/* 14*/ .min = 0,
/* 15*/ .max = 15,
/* 16*/ },
/* 16*/ },
/* 16*/ .pa_curve_or_table = {
/* 16*/ { .curve = {
/* 16*/ .curve_min_ddbm = -338,
/* 18*/ .curve_max_ddbm = 200,
/* 20*/ .curve_segments = {
/* 20*/ { .maxPowerLevel = 180,
/* 22*/ .slope = 2280,
/* 24*/ .intercept = -291457,
/* 28*/ },
/* 28*/ { .maxPowerLevel = 78,
/* 30*/ .slope = 770,
/* 32*/ .intercept = -46749,
/* 36*/ },
/* 36*/ { .maxPowerLevel = 44,
/* 38*/ .slope = 431,
/* 40*/ .intercept = -6673,
/* 44*/ },
/* 44*/ { .maxPowerLevel = 27,
/* 46*/ .slope = 255,
/* 48*/ .intercept = 6886,
/* 52*/ },
/* 52*/ { .maxPowerLevel = 17,
/* 54*/ .slope = 167,
/* 56*/ .intercept = 10458,
/* 60*/ },
/* 60*/ { .maxPowerLevel = 10,
/* 62*/ .slope = 98,
/* 64*/ .intercept = 10261,
/* 68*/ },
/* 68*/ { .maxPowerLevel = 6,
/* 70*/ .slope = 59,
/* 72*/ .intercept = 8616,
/* 76*/ },
/* 76*/ { .maxPowerLevel = 3,
/* 78*/ .slope = 11,
/* 80*/ .intercept = 3745,
/* 84*/ },
// : a 9th curve segment is allowed but not used so this is pad
/* 92*/ },
/* 92*/ },
/* 92*/ },
/* 92*/ { .table = {
/* 92*/ { -250,
/* 94*/ -148,
/* 96*/ -95,
/* 98*/ -68,
/* 100*/ -51,
/* 102*/ -40,
/* 104*/ -32,
/* 106*/ -26,
/* 108*/ -22,
/* 110*/ -18,
/* 112*/ -16,
/* 114*/ -13,
/* 116*/ -12,
/* 118*/ -10,
/* 120*/ -9,
/* 122*/ -9,
/* 124*/ },
/* 124*/ },
// : a 1-9-segment curve can be substituted for a table so this is pad
/* 168*/ },
/* 168*/ },
};