Antenna Control#

Basic APIs to control the antenna functionality.

These enumerations and structures are used with RAIL Antenna Control API.

EFR32 supports up to two antennas with configurable pin locations.

Modules#

RAIL_AntennaConfig_t

sl_rail_antenna_config_t

Enumerations#

enum
RAIL_ANTENNA_0 = 0
RAIL_ANTENNA_1 = 1
RAIL_ANTENNA_AUTO = 255
}

Antenna path Selection enumeration.

enum
SL_RAIL_ANTENNA_0 = 0u
SL_RAIL_ANTENNA_1 = 1u
SL_RAIL_ANTENNA_AUTO = 255u
}

Antenna path Selection enumeration.

Functions#

RAIL_ConfigAntenna(RAIL_Handle_t railHandle, const RAIL_AntennaConfig_t *config)

Configure antenna path and pin locations.

RAIL_GetRfPath(RAIL_Handle_t railHandle, RAIL_AntennaSel_t *rfPath)

Get the default RF path.

sl_rail_config_antenna(sl_rail_handle_t rail_handle, const sl_rail_antenna_config_t *p_config)

Configure antenna path and pin locations.

sl_rail_get_rf_path(sl_rail_handle_t rail_handle, sl_rail_antenna_sel_t *p_rf_path)

Get the default RF path.

Macros#

#define
ant0Loc defaultPath

DeprecatedBackwards compatible name for RAIL_AntennaConfig_t::defaultPath field.

Enumeration Documentation#

RAIL_AntennaSel_t#

RAIL_AntennaSel_t

Antenna path Selection enumeration.

DeprecatedRAIL 2.x synonym of sl_rail_antenna_sel_t.

Enumerator
RAIL_ANTENNA_0

Enum for antenna path 0.

RAIL_ANTENNA_1

Enum for antenna path 1.

RAIL_ANTENNA_AUTO

Enum for antenna path auto.


sl_rail_antenna_sel_t#

sl_rail_antenna_sel_t

Antenna path Selection enumeration.

Enumerator
SL_RAIL_ANTENNA_0

Enum for antenna path 0.

SL_RAIL_ANTENNA_1

Enum for antenna path 1.

SL_RAIL_ANTENNA_AUTO

Enum for antenna path auto.


Function Documentation#

RAIL_ConfigAntenna#

RAIL_Status_t RAIL_ConfigAntenna (RAIL_Handle_t railHandle, const RAIL_AntennaConfig_t * config)

Configure antenna path and pin locations.

Parameters
TypeDirectionArgument NameDescription
RAIL_Handle_t[in]railHandle

A radio-generic or real RAIL instance handle.

const RAIL_AntennaConfig_t *[in]config

A pointer to a configuration structure applied to the relevant Antenna Configuration registers. A NULL configuration will produce undefined behavior.

Warnings

  • This API must be called before any TX or RX occurs. Otherwise, the antenna configurations for those functions will not take effect.

Returns

  • Status code indicating success of the function call.

This function informs RAIL how to select each antenna, but not when. Antenna selection for receive is controlled by the RAIL_RX_OPTION_ANTENNA0 and RAIL_RX_OPTION_ANTENNA1 options (and the RAIL_RX_OPTION_ANTENNA_AUTO combination). Antenna selection for transmit is controlled by the RAIL_TX_OPTION_ANTENNA0 and RAIL_TX_OPTION_ANTENNA1 options.

There is only one antenna configuration can be active on a radio, regardless of the number of protocols (unless the application updates the configuration upon a protocol switch – RAIL does not save this configuration in a protocol RAIL instance).

DeprecatedRAIL 2.x synonym of sl_rail_config_antenna().


RAIL_GetRfPath#

RAIL_Status_t RAIL_GetRfPath (RAIL_Handle_t railHandle, RAIL_AntennaSel_t * rfPath)

Get the default RF path.

Parameters
TypeDirectionArgument NameDescription
RAIL_Handle_t[in]railHandle

A RAIL instance handle.

RAIL_AntennaSel_t *[out]rfPath

A pointer to RF path updated by the function.

Returns

  • Status code indicating success of the function call.

If multiple protocols are used, this function returns RAIL_STATUS_INVALID_STATE if it is called and the given railHandle is not active. In that case, the caller must attempt to re-call this function later, for example when RAIL_EVENT_CONFIG_SCHEDULED trigger.

DeprecatedRAIL 2.x synonym of sl_rail_get_rf_path().


sl_rail_config_antenna#

sl_rail_status_t sl_rail_config_antenna (sl_rail_handle_t rail_handle, const sl_rail_antenna_config_t * p_config)

Configure antenna path and pin locations.

Parameters
TypeDirectionArgument NameDescription
sl_rail_handle_t[in]rail_handle

A radio-generic or real RAIL instance handle.

const sl_rail_antenna_config_t *[in]p_config

A pointer to a configuration structure applied to the relevant Antenna Configuration registers. A NULL configuration will produce undefined behavior.

Warnings

  • This API must be called before any TX or RX occurs. Otherwise, the antenna configurations for those functions will not take effect.

Returns

  • Status code indicating success of the function call.

This function informs RAIL how to select each antenna, but not when. Antenna selection for receive is controlled by the SL_RAIL_RX_OPTION_ANTENNA_0 and SL_RAIL_RX_OPTION_ANTENNA_1 options (and the SL_RAIL_RX_OPTION_ANTENNA_AUTO combination). Antenna selection for transmit is controlled by the SL_RAIL_TX_OPTION_ANTENNA_0 and SL_RAIL_TX_OPTION_ANTENNA_1 options.

Only one antenna configuration can be active on a radio, regardless of the number of protocols (unless the application updates the configuration upon a protocol switch – RAIL does not save this configuration in a protocol RAIL instance).


sl_rail_get_rf_path#

sl_rail_status_t sl_rail_get_rf_path (sl_rail_handle_t rail_handle, sl_rail_antenna_sel_t * p_rf_path)

Get the default RF path.

Parameters
TypeDirectionArgument NameDescription
sl_rail_handle_t[in]rail_handle

A real RAIL instance handle.

sl_rail_antenna_sel_t *[out]p_rf_path

A pointer to RF path updated by the function.

Returns

  • Status code indicating success of the function call.

If multiple protocols are used, this function returns SL_RAIL_STATUS_INVALID_STATE if it is called and the given rail_handle is not active. In that case, the caller must attempt to re-call this function later, for example when SL_RAIL_EVENT_CONFIG_SCHEDULED trigger.