Front End Module Voltage Detection#
APIs for configuring and detecting a voltage from a Front End Module (VDET).
The rail_util_vdet plugin lets customers measure an output voltage from their attached Front End Module at a specific time in a Tx packet. This information allows optimizations to power configuration, and monitoring FEM performance.
Note
VDET is only supported with EFR32xG25 devices.
The sl_rail_util_vdet plugin lets customers measure an output voltage from their attached Front End Module at a specific time in a Tx packet. This information allows optimizations to power configuration, and monitoring FEM performance.
Note
VDET is only supported with EFR32xG25 devices.
Modules#
Enumerations#
VDET Modes.
VDET Resolution for the Aux ADC.
VDET Status.
VDET Modes.
VDET Resolution for the Aux ADC.
VDET Status.
Functions#
Configure the VDET plugin.
Get the VDET plugin configuration.
Enable the VDET plugin.
Check if the VDET plugin is enabled.
Get VDET measurement.
Configure the VDET plugin.
Get the VDET plugin configuration.
Enable the VDET plugin.
Check if the VDET plugin is enabled.
Get VDET measurement.
Macros#
A macro that is string versions of the calibration enums.
A macro that is string versions of the resolution enums.
A macro that is string versions of the status enums.
A macro that is string versions of the calibration enums.
A macro that is string versions of the resolution enums.
A macro that is string versions of the status enums.
Enumeration Documentation#
RAIL_Vdet_Mode_t#
RAIL_Vdet_Mode_t
VDET Modes.
The VDET Mode is passed to RAIL_ConfigVdet() via RAIL_VdetConfig_t. The Front End Module Voltage Detection (VDET) Utility component allows customers to measure their Front End Module performance at specified points in the Transmit packet.
DeprecatedRAIL 2.x synonym of sl_rail_vdet_mode_t.
| Enumerator | |
|---|---|
| RAIL_VDET_MODE_DISABLED | VDET is completely disabled. |
| RAIL_VDET_MODE_AUTOMATIC | AUTOMATIC causes VDET measurements to be taken every Tx packet at the specified time. |
| RAIL_VDET_MODE_IMMEDIATE | IMMEDIATE causes an immediate VDET measurement. |
| RAIL_VDET_MODE_COUNT | A count of the choices in this enumeration. |
RAIL_Vdet_Resolution_t#
RAIL_Vdet_Resolution_t
VDET Resolution for the Aux ADC.
The VDET Resolution is passed to RAIL_ConfigVdet() via RAIL_VdetConfig_t. Shows available resolution options.
DeprecatedRAIL 2.x synonym of sl_rail_vdet_resolution_t.
| Enumerator | |
|---|---|
| RAIL_VDET_RESOLUTION_10_BIT | ~10 bit resolution. |
| RAIL_VDET_RESOLUTION_11_BIT | ~11 bit resolution. |
| RAIL_VDET_RESOLUTION_12_BIT | ~12 bit resolution. |
| RAIL_VDET_RESOLUTION_COUNT | A count of the choices in this enumeration. |
RAIL_Vdet_Status_t#
RAIL_Vdet_Status_t
VDET Status.
The VDET Status for internal debug. Shows states.
DeprecatedRAIL 2.x synonym of sl_rail_vdet_status_t.
| Enumerator | |
|---|---|
| RAIL_VDET_STATUS_IDLE | IDLE - Waiting for next command/measurement. |
| RAIL_VDET_STATUS_START | START of the VDET measurement activity. |
| RAIL_VDET_STATUS_10_BIT_DONE | Completion of a 10 bit measurement. |
| RAIL_VDET_STATUS_11_BIT_DONE | Completion of a 11 bit measurement. |
| RAIL_VDET_STATUS_12_BIT_DONE | Completion of a 12 bit measurement. |
| RAIL_VDET_STATUS_BLOCKED | Conflict with another AuxADC user. |
| RAIL_VDET_STATUS_ERROR | An error has occurred. |
| RAIL_VDET_STATUS_COUNT | A count of the choices in this enumeration. |
sl_rail_vdet_mode_t#
sl_rail_vdet_mode_t
VDET Modes.
The VDET Mode is passed to sl_rail_config_vdet() via sl_rail_vdet_config_t. The Front End Module Voltage Detection (VDET) Utility component allows customers to measure their Front End Module performance at specified points in the Transmit packet.
| Enumerator | |
|---|---|
| SL_RAIL_VDET_MODE_DISABLED | VDET is completely disabled. |
| SL_RAIL_VDET_MODE_AUTOMATIC | AUTOMATIC causes VDET measurements to be taken every Tx packet at the specified time. |
| SL_RAIL_VDET_MODE_IMMEDIATE | IMMEDIATE causes an immediate VDET measurement. |
| SL_RAIL_VDET_MODE_COUNT | A count of the choices in this enumeration. |
sl_rail_vdet_resolution_t#
sl_rail_vdet_resolution_t
VDET Resolution for the Aux ADC.
The VDET Resolution is passed to sl_rail_config_vdet() via sl_rail_vdet_config_t. Shows available resolution options.
| Enumerator | |
|---|---|
| SL_RAIL_VDET_RESOLUTION_10_BIT | ~10 bit resolution. |
| SL_RAIL_VDET_RESOLUTION_11_BIT | ~11 bit resolution. |
| SL_RAIL_VDET_RESOLUTION_12_BIT | ~12 bit resolution. |
| SL_RAIL_VDET_RESOLUTION_COUNT | A count of the choices in this enumeration. |
sl_rail_vdet_status_t#
sl_rail_vdet_status_t
VDET Status.
The VDET Status for internal debug. Shows states.
| Enumerator | |
|---|---|
| SL_RAIL_VDET_STATUS_IDLE | IDLE - Waiting for next command/measurement. |
| SL_RAIL_VDET_STATUS_START | START of the VDET measurement activity. |
| SL_RAIL_VDET_STATUS_10_BIT_DONE | Completion of a 10 bit measurement. |
| SL_RAIL_VDET_STATUS_11_BIT_DONE | Completion of a 11 bit measurement. |
| SL_RAIL_VDET_STATUS_12_BIT_DONE | Completion of a 12 bit measurement. |
| SL_RAIL_VDET_STATUS_BLOCKED | Conflict with another AuxADC user. |
| SL_RAIL_VDET_STATUS_ERROR | An error has occurred. |
| SL_RAIL_VDET_STATUS_COUNT | A count of the choices in this enumeration. |
Function Documentation#
RAIL_ConfigVdet#
RAIL_Status_t RAIL_ConfigVdet (RAIL_Handle_t genericRailHandle, const RAIL_VdetConfig_t * config)
Configure the VDET plugin.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Handle_t | [in] | genericRailHandle | A radio-generic RAIL handle. |
| const RAIL_VdetConfig_t * | [in] | config | A pointer to a RAIL_VdetConfig_t struct that contains configuration data for the VDET. |
Returns
Return values
RAIL_STATUS_NO_ERROR: - All went well
RAIL_STATUS_INVALID_STATE: - VDET is enabled. Must be disabled first.
RAIL_STATUS_INVALID_PARAMETER: - mode/resolution/delayUs out-of-bounds.
Warnings
As this function relies on GPIO access and RAIL is meant to run in TrustZone non-secure world, it is not supported if GPIO is configured as secure peripheral and it will return RAIL_STATUS_INVALID_CALL.
DeprecatedRAIL 2.x synonym of sl_rail_config_vdet().
RAIL_GetVdetConfig#
RAIL_Status_t RAIL_GetVdetConfig (RAIL_Handle_t genericRailHandle, RAIL_VdetConfig_t * config)
Get the VDET plugin configuration.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Handle_t | [in] | genericRailHandle | A radio-generic RAIL handle. |
| RAIL_VdetConfig_t * | [out] | config | A pointer to a RAIL_VdetConfig_t struct that will return configuration data for the VDET. |
Returns
Return values
RAIL_STATUS_NO_ERROR: - All went well.
DeprecatedRAIL 2.x synonym of sl_rail_get_vdet_config().
RAIL_EnableVdet#
RAIL_Status_t RAIL_EnableVdet (RAIL_Handle_t genericRailHandle, bool enable)
Enable the VDET plugin.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Handle_t | [in] | genericRailHandle | A RAIL instance handle. |
| bool | [in] | enable | Enable or disable RAIL_VDET_MODE_AUTOMATIC mode captures. Begins measurement if in RAIL_VDET_MODE_IMMEDIATE. |
Returns
Return values
RAIL_STATUS_NO_ERROR: - All went well, VDET is enabled or disabled.
RAIL_STATUS_INVALID_STATE: - VDET has not been configured or VDET was not idle. VDET is disabled.
Warnings
As this function relies on HFXO access and RAIL is meant to run in TrustZone non-secure world, it is not supported if HFXO is configured as secure peripheral and it will return RAIL_STATUS_INVALID_CALL.
DeprecatedRAIL 2.x synonym of sl_rail_enable_vdet().
RAIL_IsVdetEnabled#
bool RAIL_IsVdetEnabled (RAIL_Handle_t genericRailHandle)
Check if the VDET plugin is enabled.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Handle_t | [in] | genericRailHandle | A RAIL instance handle. |
Returns
bool
DeprecatedRAIL 2.x synonym of sl_rail_is_vdet_enabled().
RAIL_GetVdet#
RAIL_Status_t RAIL_GetVdet (RAIL_Handle_t genericRailHandle, uint32_t * pVdetMv)
Get VDET measurement.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| RAIL_Handle_t | [in] | genericRailHandle | A RAIL instance handle. |
| uint32_t * | [out] | pVdetMv | A pointer to a uint32_t for returning the measurement. |
A processed measurement in millivolts.
Returns
Return values
RAIL_STATUS_NO_ERROR: - All went well, value in *pVdetMv is valid.
RAIL_STATUS_INVALID_CALL: - VDET is in progress, wait until VDET capture is complete and try again.
RAIL_STATUS_INVALID_STATE: - VDET is not enabled or valid. Wait until next packet and try reading again.
RAIL_STATUS_INVALID_PARAMETER: - In
RAIL_STATUS_SUSPENDED: - Blocked by AuxADC contention. Wait until next packet and try reading again.
Warnings
As this function relies on HFXO access and RAIL is meant to run in TrustZone non-secure world, it is not supported if HFXO is configured as secure peripheral and it will return RAIL_STATUS_INVALID_CALL.
DeprecatedRAIL 2.x synonym of sl_rail_get_vdet().
sl_rail_config_vdet#
sl_rail_status_t sl_rail_config_vdet (sl_rail_handle_t radio_handle, const sl_rail_vdet_config_t * p_config)
Configure the VDET plugin.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | radio_handle | A radio-generic RAIL handle. |
| const sl_rail_vdet_config_t * | [in] | p_config | A pointer to a sl_rail_vdet_config_t struct that contains configuration data for the VDET. |
Returns
Return values
SL_RAIL_STATUS_NO_ERROR: - All went well
SL_RAIL_STATUS_INVALID_STATE: - VDET is enabled. Must be disabled first.
SL_RAIL_STATUS_INVALID_PARAMETER: - mode/resolution/delay_us out-of-bounds.
Warnings
As this function relies on GPIO access and RAIL is meant to run in TrustZone non-secure world, it is not supported if GPIO is configured as secure peripheral and it will return SL_RAIL_STATUS_INVALID_CALL.
sl_rail_get_vdet_config#
sl_rail_status_t sl_rail_get_vdet_config (sl_rail_handle_t radio_handle, sl_rail_vdet_config_t * p_config)
Get the VDET plugin configuration.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | radio_handle | A radio-generic RAIL handle. |
| sl_rail_vdet_config_t * | [out] | p_config | A pointer to a sl_rail_vdet_config_t struct that will return configuration data for the VDET. |
Returns
Return values
SL_RAIL_STATUS_NO_ERROR: - All went well.
sl_rail_enable_vdet#
sl_rail_status_t sl_rail_enable_vdet (sl_rail_handle_t radio_handle, bool enable)
Enable the VDET plugin.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | radio_handle | A radio-generic RAIL handle. |
| bool | [in] | enable | Enable or disable SL_RAIL_VDET_MODE_AUTOMATIC mode captures. Begins measurement if in SL_RAIL_VDET_MODE_IMMEDIATE. |
Returns
Return values
SL_RAIL_STATUS_NO_ERROR: - All went well, VDET is enabled or disabled.
SL_RAIL_STATUS_INVALID_STATE: - VDET has not been configured or VDET was not idle. VDET is disabled.
Warnings
As this function relies on HFXO access and RAIL is meant to run in TrustZone non-secure world, it is not supported if HFXO is configured as secure peripheral and it will return SL_RAIL_STATUS_INVALID_CALL.
sl_rail_is_vdet_enabled#
bool sl_rail_is_vdet_enabled (sl_rail_handle_t radio_handle)
Check if the VDET plugin is enabled.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | radio_handle | A radio-generic RAIL handle. |
Returns
bool
sl_rail_get_vdet#
sl_rail_status_t sl_rail_get_vdet (sl_rail_handle_t radio_handle, uint32_t * p_vdet_mv)
Get VDET measurement.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_rail_handle_t | [in] | radio_handle | A radio-generic RAIL handle. |
| uint32_t * | [out] | p_vdet_mv | A pointer to a uint32_t for returning the measurement. |
A processed measurement in millivolts.
Returns
Return values
SL_RAIL_STATUS_NO_ERROR: - All went well, value in *p_vdet_mv is valid.
SL_RAIL_STATUS_INVALID_CALL: - VDET is in progress, wait until VDET capture is complete and try again.
SL_RAIL_STATUS_INVALID_STATE: - VDET is not enabled or valid. Wait until next packet and try reading again.
SL_RAIL_STATUS_INVALID_PARAMETER: - in
SL_RAIL_STATUS_SUSPENDED: - Blocked by AuxADC contention. Wait until next packet and try reading again.
Warnings
As this function relies on HFXO access and RAIL is meant to run in TrustZone non-secure world, it is not supported if HFXO is configured as secure peripheral and it will return SL_RAIL_STATUS_INVALID_CALL.