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#
Enumerations#
Antenna path Selection enumeration.
Functions#
Configure antenna path and pin locations.
Get the default RF path.
Macros#
Maps EFR32 Series 2 defaultPath onto Series 1 ant0Loc field.
Enumeration Documentation#
RAIL_AntennaSel_t#
RAIL_AntennaSel_t
Antenna path Selection enumeration.
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. |
4353
of file common/rail_types.h
Function Documentation#
RAIL_ConfigAntenna#
RAIL_Status_t RAIL_ConfigAntenna (RAIL_Handle_t railHandle, const RAIL_AntennaConfig_t * config)
Configure antenna path and pin locations.
[in] | railHandle | A RAIL instance handle. |
[in] | config | 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_RxOptions_t::RAIL_RX_OPTION_ANTENNA0 and RAIL_RxOptions_t::RAIL_RX_OPTION_ANTENNA1 options (and the RAIL_RxOptions_t::RAIL_RX_OPTION_ANTENNA_AUTO combination). Antenna selection for transmit is controlled by the RAIL_TxOptions_t::RAIL_TX_OPTION_ANTENNA0 and RAIL_TxOptions_t::RAIL_TX_OPTION_ANTENNA1 options.
Although a RAIL handle is included for potential future expansion of this function, it is currently not used. That is, only one antenna configuration can be active on a chip, regardless of the number of protocols (unless the application updates the configuration upon a protocol switch), and the configuration is not saved in the RAIL instance. For optimal future compatibility, pass in a chip-specific handle, such as RAIL_EFR32_HANDLE.
504
of file common/rail.h
RAIL_GetRfPath#
RAIL_Status_t RAIL_GetRfPath (RAIL_Handle_t railHandle, RAIL_AntennaSel_t * rfPath)
Get the default RF path.
[in] | railHandle | A RAIL instance handle. |
[out] | rfPath | Pointer to RF path. |
Returns
A 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.
519
of file common/rail.h
Macro Definition Documentation#
defaultPath#
#define defaultPathValue:
ant0Loc
Maps EFR32 Series 2 defaultPath onto Series 1 ant0Loc field.
For EFR32 Series 2, defaultPath should be a RAIL_AntennaSel_t value specifying the internal default RF path. It is ignored on EFR32 Series 2 parts that have only one RF path bonded out and on EFR32xG28 dual-band OPNs where the appropriate RF path is automatically set by RAIL to 0 for 2.4GHZ band and 1 for SubGHz band PHYs. On EFR32xG23 and EFR32xG28 single-band OPNs where both RF paths are bonded out this can be set to RAIL_ANTENNA_AUTO to effect internal RF path diversity on PHYs supporting diversity. This avoids the need for an external RF switch and the associated GPIO(s) needed to control its antenna selection.
4411
of file common/rail_types.h