RAIL 3 Power Amplifier (PA) Utility#

 

RAIL 3 PA Utility#

This optional software component can be enabled to include default functionality related to RAIL 3 PA configuration.

When using a Silicon Labs-developed board, the configuration options for this software component are set up automatically based on the selected board. When using a custom board, manually configure the configuration options.

Configuration Options#

The following configuration options can be changed:

  • PA Configuration

    • Initial PA power

    • PA ramp time

      • PA ramp time is a hardware approximation aimed at being as close to the desired ramp time as possible without going over the specified time.

    • Milli-volts provided to the PA supply pin (PA_VDD)

  • PA Calibration Configuration

    • Apply PA Calibration Factory Offset

      • PA calibration offset ensures that PA power remains consistent chip-to-chip. These adjustments occur automatically when the PA is in use, and the application is not notified when these adjustments occur.

This component uses RAIL 3 Power Amplifier (PA) PowerSetting tables Utility for Power Amplifier (PA) powersetting mapping table data.

Integration with RAIL APIs#

Typical Usage Flow#

#include "sl_rail.h"
#include "sl_rail_util_pa_conversions.h"
#include "sl_rail_util_pa_config.h"
// 1. Component initializes automatically during stack_init
//    (sl_rail_util_pa_init() called with priority -9010)

// 2. After RAIL initialization (optional if not using sl_rail_util_callbacks)
sl_rail_status_t status = sl_rail_util_pa_post_init(
    rail_handle,
    SL_RAIL_TX_PA_MODE_2P4_GHZ);

// 3. Get PA capabilities
sl_rail_tx_power_t min, max, step;
sl_rail_util_pa_get_tx_power_limits(rail_handle,
                                    SL_RAIL_TX_PA_MODE_2P4_GHZ,
                                    &min, &max, &step);

// 4. Set transmit power (uses PA tables internally)
sl_rail_set_tx_power_dbm(rail_handle, 100);  // 10.0 dBm

// 5. Channel changes handled automatically via callback
//    (sl_rail_util_pa_on_channel_config_change() called by sl_rail_util_callbacks)

Integration with Power Control#

#include "sl_rail.h"
#include "sl_rail_util_pa_conversions.h"
#include "sl_rail_util_pa_config.h"

// One can check what actual achievable power is before setting
sl_rail_tx_power_t desired_power = 155;  // 15.5 dBm
sl_rail_status_t status = sl_rail_util_pa_convert_power_to_actual(
    rail_handle,
    SL_RAIL_TX_PA_MODE_INVALID,
    &desired_power); // actual power is written in this

if (status == SL_RAIL_STATUS_NO_ERROR && desired_power <= 155) {
    // Set the actual achievable power
    sl_rail_set_tx_power_dbm(rail_handle, desired_power);
}

Troubleshooting#

Common Issues#

Issue: PA settings like ramp time are not configured after RAIL init

  • Solution: Call sl_rail_util_pa_post_init() after sl_rail_init if not using sl_rail_util_callbacks

  • Check: Verify component dependencies are met

Issue: Incorrect power output

  • Solution: Verify SL_RAIL_UTIL_PA_VOLTAGE_MV matches actual PA supply and if sl_rail_util_pa_post_init() is called

  • Check: Enable PA calibration (SL_RAIL_UTIL_PA_CALIBRATION_ENABLE)

Issue: Power table not found

  • Solution: Ensure sl_rail_util_pa_tables component is included

  • Check: Verify device-specific configuration is selected

Issue: Problems related to transmission power in modules

  • Solution: Ensure RAIL 2.x PA plugin is being used for modules. sl_rail_util_pa is not compatible with modules.

  • Check: Check if rail_util_pa is called implcitly or through sl_rail_util_compatible_pa

Issue: Power limits incorrect

  • Solution: Check channel configuration max power settings

  • Verify: PA mode matches channel requirements

Debug Commands (railtest/sl_rail_test)#

# Get current PA configuration
getPowerConfig

# Get power setting for current power level
getPowerSetting

# Get TX power limits
getPaTableLimits

Migration from RAIL 2.x#

Component Replacement#

RAIL 2.x:

components:
  - rail_util_pa

RAIL 3.0:

components:
  - sl_rail_util_pa # This requires sl_rail_util_pa_tables

And to be agnostic to whether the application uses RAIL 2.x RAIL 2.x Power Amplifier (PA) Utility or RAIL 3.0 RAIL 3 Power Amplifier (PA) Utility component, use the compatibility component

components:
  - sl_rail_util_compatible_pa

API Migration#

RAIL 2.x

RAIL 3.0

RAIL_ConfigTxPower()

sl_rail_util_pa_post_init()

RAIL_SetTxPowerDbm()

sl_rail_set_tx_power_dbm()

RAIL_GetTxPowerDbm()

sl_rail_get_tx_power_dbm()

Configuration Migration#

RAIL 2.x:

#include "rail.h"
#include "pa_conversions_efr32.h"

RAIL_TxPowerConfig_t txPowerConfig = {
  .mode = RAIL_TX_POWER_MODE_2P4_HP,
  .voltage = 3300,
  .rampTime = 10,
};
RAIL_ConfigTxPower(railHandle, &txPowerConfig);
RAIL_Status_t status = RAIL_SetTxPowerDbm(railHandle, SL_RAIL_UTIL_PA_POWER_DECI_DBM);

RAIL 3.0:

#include "sl_rail.h"
#include "sl_rail_util_pa_conversions.h"
#include "sl_rail_util_pa_config.h"
// sl_rail_util_pa_config.h uses the below defines in sl_rail_util_pa_post_init()
// #define SL_RAIL_UTIL_PA_VOLTAGE_MV      3300
// #define SL_RAIL_UTIL_PA_RAMP_TIME_US    10

// Initialization (automatic via stack_init)
// Or manual if not using sl_rail_util_callbacks one can call
// sl_rail_util_pa_post_init() to set up PA and the power.
sl_rail_status_t status = sl_rail_util_pa_post_init(rail_handle, SL_RAIL_TX_PA_MODE_2P4_GHZ);
status = sl_rail_set_tx_power_dbm(rail_handle, SL_RAIL_UTIL_PA_POWER_DECI_DBM);

or call specific functions to set voltage and ramp time like below:

#include "sl_rail.h"
#include "sl_rail_util_pa_conversions.h"
#include "sl_rail_util_pa_config.h"

// Initialization (automatic via stack_init)
// Or manual if not using sl_rail_util_callbacks one can call
// the below functions to set up PA and the power.
sl_rail_status_t status = sl_rail_set_tx_pa_ramp_time(rail_handle, SL_RAIL_UTIL_PA_RAMP_TIME_US);
status = sl_rail_set_tx_pa_voltage(rail_handle, SL_RAIL_UTIL_PA_VOLTAGE_MV);
status = sl_rail_set_tx_power_dbm(rail_handle, SL_RAIL_UTIL_PA_POWER_DECI_DBM);