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.

Modules#

RAIL_VdetConfig_t

Enumerations#

enum
RAIL_VDET_MODE_DISABLED = 0u
RAIL_VDET_MODE_AUTOMATIC = 1u
RAIL_VDET_MODE_IMMEDIATE = 2u
RAIL_VDET_MODE_COUNT
}

VDET Modes.

enum
RAIL_VDET_RESOLUTION_10_BIT = 0u
RAIL_VDET_RESOLUTION_11_BIT = 1u
RAIL_VDET_RESOLUTION_12_BIT = 2u
RAIL_VDET_RESOLUTION_COUNT
}

VDET Resolution for the AuxADC.

enum
RAIL_VDET_STATUS_IDLE = 0u
RAIL_VDET_STATUS_START = 1u
RAIL_VDET_STATUS_10_BIT_DONE = 2u
RAIL_VDET_STATUS_11_BIT_DONE = 3u
RAIL_VDET_STATUS_12_BIT_DONE = 4u
RAIL_VDET_STATUS_BLOCKED = 5u
RAIL_VDET_STATUS_ERROR = 6u
RAIL_VDET_STATUS_COUNT
}

VDET Status.

Functions#

RAIL_ConfigVdet(RAIL_Handle_t genericRailHandle, const RAIL_VdetConfig_t *config)

Configure the VDET plugin.

RAIL_GetVdetConfig(RAIL_Handle_t genericRailHandle, RAIL_VdetConfig_t *config)

Get the VDET plugin configuration.

RAIL_EnableVdet(RAIL_Handle_t genericRailHandle, bool enable)

Enable the VDET plugin.

bool
RAIL_IsVdetEnabled(RAIL_Handle_t genericRailHandle)

Check if the VDET plugin is enabled.

RAIL_GetVdet(RAIL_Handle_t genericRailHandle, uint32_t *pVdetMv)

Get VDET measurement.

Macros#

#define

A macro that is string versions of the calibration enums.

#define

A macro that is string versions of the resolution enums.

#define

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 allows customers to measure their Front End Module performance at specified points in the Transmit packet.

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.


Definition at line 5614 of file common/rail_types.h

RAIL_Vdet_Resolution_t#

RAIL_Vdet_Resolution_t

VDET Resolution for the AuxADC.

The VDET Resolution is passed to RAIL_ConfigVdet() via RAIL_VdetConfig_t. Shows available resolution options.

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.


Definition at line 5650 of file common/rail_types.h

RAIL_Vdet_Status_t#

RAIL_Vdet_Status_t

VDET Status.

The VDET Status for internal debug. Shows states.

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.


Definition at line 5687 of file common/rail_types.h

Function Documentation#

RAIL_ConfigVdet#

RAIL_Status_t RAIL_ConfigVdet (RAIL_Handle_t genericRailHandle, const RAIL_VdetConfig_t * config)

Configure the VDET plugin.

Parameters
[in]genericRailHandle

A radio-generic RAIL handle.

[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.


Definition at line 6154 of file common/rail.h

RAIL_GetVdetConfig#

RAIL_Status_t RAIL_GetVdetConfig (RAIL_Handle_t genericRailHandle, RAIL_VdetConfig_t * config)

Get the VDET plugin configuration.

Parameters
[in]genericRailHandle

A radio-generic RAIL handle.

[out]config

A pointer to a RAIL_VdetConfig_t struct that will return configuration data for the VDET.

Returns

  • RAIL_Status_t

Return values

  • RAIL_STATUS_NO_ERROR: - All went well.


Definition at line 6166 of file common/rail.h

RAIL_EnableVdet#

RAIL_Status_t RAIL_EnableVdet (RAIL_Handle_t genericRailHandle, bool enable)

Enable the VDET plugin.

Parameters
[in]genericRailHandle

A RAIL instance handle.

[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.


Definition at line 6179 of file common/rail.h

RAIL_IsVdetEnabled#

bool RAIL_IsVdetEnabled (RAIL_Handle_t genericRailHandle)

Check if the VDET plugin is enabled.

Parameters
[in]genericRailHandle

A RAIL instance handle.

Returns

  • bool


Definition at line 6188 of file common/rail.h

RAIL_GetVdet#

RAIL_Status_t RAIL_GetVdet (RAIL_Handle_t genericRailHandle, uint32_t * pVdetMv)

Get VDET measurement.

Parameters
[in]genericRailHandle

A RAIL instance handle.

[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.


Definition at line 6207 of file common/rail.h

Macro Definition Documentation#

RAIL_VDET_MODE_ENUM_NAMES#

#define RAIL_VDET_MODE_ENUM_NAMES
Value:
{ \
"RAIL_VDET_MODE_DISABLED", \
"RAIL_VDET_MODE_AUTOMATIC", \
"RAIL_VDET_MODE_IMMEDIATE", \
}

A macro that is string versions of the calibration enums.


Definition at line 5637 of file common/rail_types.h

RAIL_VDET_RESOLUTION_ENUM_NAMES#

#define RAIL_VDET_RESOLUTION_ENUM_NAMES
Value:
{ \
"RAIL_VDET_RESOLUTION_10_BIT", \
"RAIL_VDET_RESOLUTION_11_BIT", \
"RAIL_VDET_RESOLUTION_12_BIT", \
}

A macro that is string versions of the resolution enums.


Definition at line 5673 of file common/rail_types.h

RAIL_VDET_STATUS_ENUM_NAMES#

#define RAIL_VDET_STATUS_ENUM_NAMES
Value:
{ \
"RAIL_VDET_STATUS_IDLE", \
"RAIL_VDET_STATUS_START", \
"RAIL_VDET_STATUS_10_BIT_DONE", \
"RAIL_VDET_STATUS_11_BIT_DONE", \
"RAIL_VDET_STATUS_12_BIT_DONE", \
"RAIL_VDET_STATUS_BLOCKED", \
"RAIL_VDET_STATUS_ERROR", \
}

A macro that is string versions of the status enums.


Definition at line 5722 of file common/rail_types.h