MSPM0G1X0X_G3X0X Driver Library  1.10.01.05
Modules | Data Structures | Enumerations | Functions
Voltage Reference (VREF)
Collaboration diagram for Voltage Reference (VREF):

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 power on VREF module. More...
 
__STATIC_INLINE void DL_VREF_disablePower (VREF_Regs *vref)
 Disable power on VREF module. 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 (VREF_Regs *vref)
 Checks if the internal VREF is enabled. More...
 
void DL_VREF_setClockConfig (VREF_Regs *vref, DL_VREF_ClockConfig *config)
 Set the clock select and clock divide fields in VREF. More...
 
void DL_VREF_getClockConfig (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 (VREF_Regs *vref)
 Returns if VREF peripheral was reset. More...
 
__STATIC_INLINE uint32_t DL_VREF_getStatus (VREF_Regs *vref)
 Returns VREF register status. More...
 
void DL_VREF_configReference (VREF_Regs *vref, DL_VREF_Config *config)
 Configure VREF enable, control registers. More...
 

Detailed Description

Overview

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.


Enumeration Type Documentation

§ DL_VREF_CLOCK

Enumerator
DL_VREF_CLOCK_LFCLK 

Set VREF clock source as LFCLK

DL_VREF_CLOCK_MFCLK 

Set VREF clock source as MFCLK

DL_VREF_CLOCK_BUSCLK 

Set VREF clock source as BUSCLK

§ DL_VREF_CLOCK_DIVIDE

Enumerator
DL_VREF_CLOCK_DIVIDE_1 

Clock divide by 1

DL_VREF_CLOCK_DIVIDE_2 

Clock divide by 2

DL_VREF_CLOCK_DIVIDE_4 

Clock divide by 4

DL_VREF_CLOCK_DIVIDE_6 

Clock divide by 6

DL_VREF_CLOCK_DIVIDE_8 

Clock divide by 8

§ DL_VREF_ENABLE

Enumerator
DL_VREF_ENABLE_DISABLE 

VREF control set disabled

DL_VREF_ENABLE_ENABLE 

VREF control set enabled

§ DL_VREF_BUFCONFIG

Enumerator
DL_VREF_BUFCONFIG_OUTPUT_2_5V 

Configure VREF output buffer to 2.5V

DL_VREF_BUFCONFIG_OUTPUT_1_4V 

Configure VREF output buffer to 1.4V

§ DL_VREF_SHMODE

Enumerator
DL_VREF_SHMODE_DISABLE 

Set VREF sample and hold mode to disabled

DL_VREF_SHMODE_ENABLE 

Set VREF sample and hold mode to enabled

Function Documentation

§ DL_VREF_enablePower()

__STATIC_INLINE void DL_VREF_enablePower ( VREF_Regs *  vref)

Enables power on VREF module.

Parameters
vrefPointer to the register overlay for the peripheral

§ DL_VREF_disablePower()

__STATIC_INLINE void DL_VREF_disablePower ( VREF_Regs *  vref)

Disable power on VREF module.

Parameters
vrefPointer to the register overlay for the peripheral

§ DL_VREF_enableInternalRef()

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

Parameters
vrefPointer to the register overlay for the peripheral

§ DL_VREF_disableInternalRef()

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

Parameters
vrefPointer to the register overlay for the peripheral

§ DL_VREF_isEnabled()

__STATIC_INLINE bool DL_VREF_isEnabled ( VREF_Regs *  vref)

Checks if the internal VREF is enabled.

Parameters
vrefPointer to the register overlay for the peripheral
Returns
Returns the enabled status of the vref peripheral
Return values
trueThe internal VREF is enabled
falseThe internal VREF is disabled, external VREF can be used

References DL_VREF_getClockConfig(), and DL_VREF_setClockConfig().

§ DL_VREF_setClockConfig()

void DL_VREF_setClockConfig ( VREF_Regs *  vref,
DL_VREF_ClockConfig config 
)

Set the clock select and clock divide fields in VREF.

Parameters
vrefPointer to the register overlay for the peripheral
configPointer to the configuration structure

Referenced by DL_VREF_isEnabled().

§ DL_VREF_getClockConfig()

void DL_VREF_getClockConfig ( VREF_Regs *  vref,
DL_VREF_ClockConfig config 
)

Copy the clock select and clock divide fields in VREF to config.

Parameters
vrefPointer to the register overlay for the peripheral
configPointer to the configuration structure

Referenced by DL_VREF_isEnabled().

§ DL_VREF_reset()

__STATIC_INLINE void DL_VREF_reset ( VREF_Regs *  vref)

Resets the VREF module.

Parameters
vrefPointer to the register overlay for the peripheral

§ DL_VREF_isReset()

__STATIC_INLINE bool DL_VREF_isReset ( VREF_Regs *  vref)

Returns if VREF peripheral was reset.

Parameters
vrefPointer to the register overlay for the VREF peripheral
Returns
true if peripheral was reset
false if peripheral wasn't reset

§ DL_VREF_getStatus()

__STATIC_INLINE uint32_t DL_VREF_getStatus ( VREF_Regs *  vref)

Returns VREF register status.

Parameters
vrefPointer to the register overlay for the VREF peripheral
Returns
VREF status bits set. Either DL_VREF_CTL1_READY_NOTRDY or DL_VREF_CTL1_READY_RDY

References DL_VREF_configReference().

§ DL_VREF_configReference()

void DL_VREF_configReference ( VREF_Regs *  vref,
DL_VREF_Config config 
)

Configure VREF enable, control registers.

Parameters
vrefPointer to the register overlay for the VREF peripheral
configPointer to DL_VREF_Config structure to configure the peripheral

Referenced by DL_VREF_getStatus().

© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale