![]() |
![]() |
MSPM0H321X Driver Library
2.05.01.00
|
![]() |
Modules | |
DL_VREF_CTL1_READY | |
DL_VREF_SH | |
DL_VREF_HOLD | |
Data Structures | |
struct | DL_VREF_ClockConfig |
Configuration struct for DL_VREF_setClockConfig. More... | |
struct | DL_VREF_Config |
Configuration struct for DL_VREF_Config. More... | |
Enumerations | |
enum | DL_VREF_CLOCK { DL_VREF_CLOCK_LFCLK = VREF_CLKSEL_LFCLK_SEL_MASK, DL_VREF_CLOCK_MFCLK = VREF_CLKSEL_MFCLK_SEL_MASK, DL_VREF_CLOCK_BUSCLK = VREF_CLKSEL_BUSCLK_SEL_MASK } |
enum | DL_VREF_CLOCK_DIVIDE { DL_VREF_CLOCK_DIVIDE_1 = 0, DL_VREF_CLOCK_DIVIDE_2 = 1, DL_VREF_CLOCK_DIVIDE_4 = 3, DL_VREF_CLOCK_DIVIDE_6 = 5, DL_VREF_CLOCK_DIVIDE_8 = 7 } |
enum | DL_VREF_ENABLE { DL_VREF_ENABLE_DISABLE = VREF_CTL0_ENABLE_DISABLE, DL_VREF_ENABLE_ENABLE = VREF_CTL0_ENABLE_ENABLE } |
enum | DL_VREF_BUFCONFIG { DL_VREF_BUFCONFIG_OUTPUT_2_5V = VREF_CTL0_BUFCONFIG_OUTPUT2P5V, DL_VREF_BUFCONFIG_OUTPUT_1_4V = VREF_CTL0_BUFCONFIG_OUTPUT1P4V } |
enum | DL_VREF_SHMODE { DL_VREF_SHMODE_DISABLE = VREF_CTL0_SHMODE_DISABLE, DL_VREF_SHMODE_ENABLE = VREF_CTL0_SHMODE_ENABLE } |
Functions | |
__STATIC_INLINE void | DL_VREF_enablePower (VREF_Regs *vref) |
Enables the Peripheral Write Enable (PWREN) register for the VREF. More... | |
__STATIC_INLINE void | DL_VREF_disablePower (VREF_Regs *vref) |
Disables the Peripheral Write Enable (PWREN) register for the VREF. More... | |
__STATIC_INLINE bool | DL_VREF_isPowerEnabled (VREF_Regs *vref) |
Returns if the Peripheral Write Enable (PWREN) register for the VREF is enabled. More... | |
__STATIC_INLINE void | DL_VREF_enableInternalRef (VREF_Regs *vref) |
Enables Internal VREF. More... | |
__STATIC_INLINE void | DL_VREF_disableInternalRef (VREF_Regs *vref) |
Disables Internal VREF, allows for External VREF. More... | |
__STATIC_INLINE bool | DL_VREF_isEnabled (const VREF_Regs *vref) |
Checks if the internal VREF is enabled. More... | |
__STATIC_INLINE void | DL_VREF_enableInternalRefCOMP (VREF_Regs *vref) |
Enable VREF buffer as internal reference input for comparator. More... | |
__STATIC_INLINE bool | DL_VREF_isInternalRefCOMPEnabled (const VREF_Regs *vref) |
Checks if VREF buffer for comparator is enabled. More... | |
__STATIC_INLINE void | DL_VREF_disableInternalRefCOMP (VREF_Regs *vref) |
Disable VREF buffer as internal reference input for comparator. More... | |
void | DL_VREF_setClockConfig (VREF_Regs *vref, const DL_VREF_ClockConfig *config) |
Set the clock select and clock divide fields in VREF. More... | |
void | DL_VREF_getClockConfig (const VREF_Regs *vref, DL_VREF_ClockConfig *config) |
Copy the clock select and clock divide fields in VREF to config. More... | |
__STATIC_INLINE void | DL_VREF_reset (VREF_Regs *vref) |
Resets the VREF module. More... | |
__STATIC_INLINE bool | DL_VREF_isReset (const VREF_Regs *vref) |
Returns if VREF peripheral was reset. More... | |
__STATIC_INLINE uint32_t | DL_VREF_getStatus (const VREF_Regs *vref) |
Returns VREF register status. More... | |
void | DL_VREF_configReference (VREF_Regs *vref, const DL_VREF_Config *config) |
Configure VREF enable, control registers. More... | |
The Voltage Reference Driver Library allows full configuration of the MSPM0 VREF module. The VREF module contains a configurable voltage reference buffer which allows users to supply a stable internal reference to on-board analog peripherals. It also supports bringing in an external reference for applications where higher accuracy is required.
enum DL_VREF_CLOCK |
enum DL_VREF_CLOCK_DIVIDE |
enum DL_VREF_ENABLE |
enum DL_VREF_BUFCONFIG |
enum DL_VREF_SHMODE |
__STATIC_INLINE void DL_VREF_enablePower | ( | VREF_Regs * | vref | ) |
Enables the Peripheral Write Enable (PWREN) register for the VREF.
Before any peripheral registers can be configured by software, the peripheral itself must be enabled by writing the ENABLE bit together with the appropriate KEY value to the peripheral's PWREN register.
vref | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_VREF_disablePower | ( | VREF_Regs * | vref | ) |
Disables the Peripheral Write Enable (PWREN) register for the VREF.
When the PWREN.ENABLE bit is cleared, the peripheral's registers are not accessible for read/write operations.
vref | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_VREF_isPowerEnabled | ( | VREF_Regs * | vref | ) |
Returns if the Peripheral Write Enable (PWREN) register for the VREF is enabled.
Before any peripheral registers can be configured by software, the peripheral itself must be enabled by writing the ENABLE bit together with the appropriate KEY value to the peripheral's PWREN register.
When the PWREN.ENABLE bit is cleared, the peripheral's registers are not accessible for read/write operations.
vref | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_VREF_enableInternalRef | ( | VREF_Regs * | vref | ) |
Enables Internal VREF.
This function only enables the internal VREF but doesn't configure all settings. It's recommended to use DL_VREF_configReference to configure and enable VREF with all parameters.
vref | Pointer to the register overlay for the peripheral |
__STATIC_INLINE void DL_VREF_disableInternalRef | ( | VREF_Regs * | vref | ) |
Disables Internal VREF, allows for External VREF.
The internal VREF must be disabled when using external VREF input.
vref | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_VREF_isEnabled | ( | const VREF_Regs * | vref | ) |
Checks if the internal VREF is enabled.
vref | Pointer to the register overlay for the peripheral |
true | The internal VREF is enabled |
false | The internal VREF is disabled, external VREF can be used |
__STATIC_INLINE void DL_VREF_enableInternalRefCOMP | ( | VREF_Regs * | vref | ) |
Enable VREF buffer as internal reference input for comparator.
vref | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_VREF_isInternalRefCOMPEnabled | ( | const VREF_Regs * | vref | ) |
Checks if VREF buffer for comparator is enabled.
vref | Pointer to the register overlay for the peripheral |
true | VREF buffer for comparator is enabled |
false | VREF buffer for comparator is disabled |
__STATIC_INLINE void DL_VREF_disableInternalRefCOMP | ( | VREF_Regs * | vref | ) |
Disable VREF buffer as internal reference input for comparator.
vref | Pointer to the register overlay for the peripheral |
References DL_VREF_getClockConfig(), and DL_VREF_setClockConfig().
void DL_VREF_setClockConfig | ( | VREF_Regs * | vref, |
const DL_VREF_ClockConfig * | config | ||
) |
Set the clock select and clock divide fields in VREF.
vref | Pointer to the register overlay for the peripheral |
config | Pointer to the configuration structure |
Referenced by DL_VREF_disableInternalRefCOMP().
void DL_VREF_getClockConfig | ( | const VREF_Regs * | vref, |
DL_VREF_ClockConfig * | config | ||
) |
Copy the clock select and clock divide fields in VREF to config.
vref | Pointer to the register overlay for the peripheral |
config | Pointer to the configuration structure |
Referenced by DL_VREF_disableInternalRefCOMP().
__STATIC_INLINE void DL_VREF_reset | ( | VREF_Regs * | vref | ) |
Resets the VREF module.
vref | Pointer to the register overlay for the peripheral |
__STATIC_INLINE bool DL_VREF_isReset | ( | const VREF_Regs * | vref | ) |
Returns if VREF peripheral was reset.
vref | Pointer to the register overlay for the VREF peripheral |
__STATIC_INLINE uint32_t DL_VREF_getStatus | ( | const VREF_Regs * | vref | ) |
Returns VREF register status.
vref | Pointer to the register overlay for the VREF peripheral |
References DL_VREF_configReference().
void DL_VREF_configReference | ( | VREF_Regs * | vref, |
const DL_VREF_Config * | config | ||
) |
Configure VREF enable, control registers.
vref | Pointer to the register overlay for the VREF peripheral |
config | Pointer to DL_VREF_Config structure to configure the peripheral |
Referenced by DL_VREF_getStatus().