Radio Configuration
Routines for setting up and querying radio configuration information.
Modules |
|
EFR32 | |
Types specific to the EFR32 for radio configuration.
|
Data Structures |
|
struct | RAIL_FrameType_t |
Configure if there is a frame type in your frame and the lengths of each frame.
|
|
struct | RAIL_ChannelConfigEntryAttr_t |
Channel configuration entry attribute structure.
|
|
struct | RAIL_ChannelConfigEntry_t |
Channel configuration entry structure, which defines a channel range and parameters across which a corresponding radio configuration is valid.
|
|
struct | RAIL_ChannelConfig_t |
Channel configuration structure, which defines the channel meaning when a channel number is passed into a RAIL function, e.g.,
RAIL_StartTx()
and
RAIL_StartRx()
.
|
Macros |
|
#define | RAIL_SETFIXEDLENGTH_INVALID (0xFFFF) |
Invalid return value when calling
RAIL_SetFixedLength()
|
Typedefs |
|
typedef void(* | RAIL_RadioConfigChangedCallback_t ) ( RAIL_Handle_t railHandle, const RAIL_ChannelConfigEntry_t *entry) |
Pointer to function called whenever a radio configuration change occurs.
|
Functions |
|
RAIL_Status_t | RAIL_ConfigRadio ( RAIL_Handle_t railHandle, RAIL_RadioConfig_t config) |
Loads a static radio configuration.
|
|
uint16_t | RAIL_SetFixedLength ( RAIL_Handle_t railHandle, uint16_t length) |
Modifies the currently configured fixed frame length in bytes.
|
|
uint16_t | RAIL_ConfigChannels ( RAIL_Handle_t railHandle, const RAIL_ChannelConfig_t *config, RAIL_RadioConfigChangedCallback_t cb) |
Configures the channels supported by this device.
|
|
RAIL_Status_t | RAIL_IsValidChannel ( RAIL_Handle_t railHandle, uint16_t channel) |
Checks to see if the channel exists in RAIL.
|
|
uint32_t | RAIL_GetSymbolRate ( RAIL_Handle_t railHandle) |
Returns the symbol rate for the current PHY.
|
|
uint32_t | RAIL_GetBitRate ( RAIL_Handle_t railHandle) |
Returns the bit rate for the current PHY.
|
|
RAIL_Status_t | RAIL_SetPaCTune ( RAIL_Handle_t railHandle, uint8_t txPaCtuneValue, uint8_t rxPaCtuneValue) |
Sets the PA capacitor tune value for transmit and receive.
|
Detailed Description
Routines for setting up and querying radio configuration information.
These routines allow for runtime flexibility in the radio configuration. Some of the parameters, however, are meant to be generated from the radio calculator in Simplicity Studio. The basic code to configure the radio from this calculator output looks like the example below.
For more information about the types of parameters that can be changed in the other functions and how to use them, see their individual documentation.
Macro Definition Documentation
◆ RAIL_SETFIXEDLENGTH_INVALID
#define RAIL_SETFIXEDLENGTH_INVALID (0xFFFF) |
Invalid return value when calling RAIL_SetFixedLength()
Invalid return value when calling RAIL_SetFixedLength() while the radio is not in fixed-length mode.
Definition at line
829
of file
rail_types.h
.
Typedef Documentation
◆ RAIL_RadioConfigChangedCallback_t
RAIL_RadioConfigChangedCallback_t |
Pointer to function called whenever a radio configuration change occurs.
- Parameters
-
[in] railHandle
A handle for RAIL instance. [in] entry
The radio configuration entry being changed to.
Definition at line
1095
of file
rail_types.h
.
Function Documentation
◆ RAIL_ConfigChannels()
uint16_t RAIL_ConfigChannels | ( | RAIL_Handle_t |
railHandle,
|
const RAIL_ChannelConfig_t * |
config,
|
||
RAIL_RadioConfigChangedCallback_t |
cb
|
||
) |
Configures the channels supported by this device.
- Parameters
-
[in] railHandle
A RAIL instance handle. [in] config
A pointer to the channel configuration for your device. This pointer will be cached in the library so it must be something that will exist for the runtime of the application. Typically, this should be what is stored in Flash by the configuration tool. [in] cb
Function called whenever a radio configuration change occurs.
- Returns
- Returns the first available channel in the configuration.
When configuring channels on the EFR32, the radio tuner is reconfigured based on the frequency and channel spacing in the channel configuration.
◆ RAIL_ConfigRadio()
RAIL_Status_t RAIL_ConfigRadio | ( | RAIL_Handle_t |
railHandle,
|
RAIL_RadioConfig_t |
config
|
||
) |
Loads a static radio configuration.
- Parameters
-
[in] railHandle
A RAIL instance handle. [in] config
A pointer to a radio configuration.
- Returns
- Status code indicating success of the function call.
The configuration passed into this function should be generated for you and not manually created or edited. By default this function should not be called in RAIL 2.x and later unless a non-default radio configuration needs to be applied. In RAIL 2.x and later, the RAIL_ConfigChannels function applies the default radio configuration automatically.
◆ RAIL_GetBitRate()
uint32_t RAIL_GetBitRate | ( | RAIL_Handle_t |
railHandle
|
) |
Returns the bit rate for the current PHY.
- Parameters
-
[in] railHandle
A RAIL instance handle.
- Returns
- The bit rate in bits per second or 0.
The bit rate is the effective over-the-air data rate. It does not account for extra spreading for forward error correction, and so on, but accounts for modulation schemes, DSSS, and other configurations. For more information, see the modem calculator documentation. If the rate is unable to be calculated, this function will return 0.
◆ RAIL_GetSymbolRate()
uint32_t RAIL_GetSymbolRate | ( | RAIL_Handle_t |
railHandle
|
) |
Returns the symbol rate for the current PHY.
- Parameters
-
[in] railHandle
A RAIL instance handle.
- Returns
- The symbol rate in symbols per second or 0.
The symbol rate is the rate of symbol changes over the air. For non-DSSS PHYs, this is the same as the baudrate. For DSSS PHYs, it is the baudrate divided by the length of a chipping sequence. For more information, see the modem calculator documentation. If the rate is unable to be calculated, this function will return 0.
◆ RAIL_IsValidChannel()
RAIL_Status_t RAIL_IsValidChannel | ( | RAIL_Handle_t |
railHandle,
|
uint16_t |
channel
|
||
) |
Checks to see if the channel exists in RAIL.
- Parameters
-
[in] railHandle
A RAIL instance handle. [in] channel
A channel number to check.
- Returns
- Returns RAIL_STATUS_NO_ERROR if channel exists
Returns RAIL_STATUS_INVALID_PARAMETER if the given channel does not exist in the channel configuration currently used, and RAIL_STATUS_NO_ERROR if the channel is valid.
◆ RAIL_SetFixedLength()
uint16_t RAIL_SetFixedLength | ( | RAIL_Handle_t |
railHandle,
|
uint16_t |
length
|
||
) |
Modifies the currently configured fixed frame length in bytes.
- Parameters
-
[in] railHandle
A RAIL instance handle. [in] length
The expected fixed frame length. A value of 0 is infinite. A value of RAIL_SETFIXEDLENGTH_INVALID restores the frame's length back to that length specified by the default frame type configuration.
- Returns
- Length configured; The new frame length configured into the hardware for use. 0 if in infinite mode, or RAIL_SETFIXEDLENGTH_INVALID if the frame length has not yet been overridden by a valid value.
Sets the fixed-length configuration for transmit and receive. Be careful when using this function in receive and transmit as this function changes the default frame configuration and remains in force until it is called again with an input value of RAIL_SETFIXEDLENGTH_INVALID. This function will override any fixed or variable length settings from a radio configuration.
◆ RAIL_SetPaCTune()
RAIL_Status_t RAIL_SetPaCTune | ( | RAIL_Handle_t |
railHandle,
|
uint8_t |
txPaCtuneValue,
|
||
uint8_t |
rxPaCtuneValue
|
||
) |
Sets the PA capacitor tune value for transmit and receive.
- Parameters
-
[in] railHandle
A RAIL instance handle. [in] txPaCtuneValue
PA Ctune value for TX mode. [in] rxPaCtuneValue
PA Ctune value for RX mode.
- Returns
- Status code indicating success of the function call.
Provides the ability to tune the impedance of the transmit and receive modes by changing the amount of capacitance at the PA output.