53 #ifndef ti_dl_dl_m0p_vref__include 54 #define ti_dl_dl_m0p_vref__include 59 #include <ti/devices/msp/msp.h> 62 #ifdef __MSPM0_HAS_VREF__ 77 #define DL_VREF_CTL1_READY_NOTRDY (VREF_CTL1_READY_NOTRDY) 82 #define DL_VREF_CTL1_READY_RDY (VREF_CTL1_READY_RDY) 94 #define DL_VREF_SH_MIN (VREF_CTL2_SHCYCLE_MINIMUM) 99 #define DL_VREF_SH_MAX (VREF_CTL2_SHCYCLE_MAXIMUM) 110 #define DL_VREF_HOLD_MIN (VREF_CTL2_HCYCLE_MINIMUM) 115 #define DL_VREF_HOLD_MAX (VREF_CTL2_HCYCLE_MAXIMUM) 208 vref->GPRCM.PWREN = VREF_PWREN_KEY_UNLOCK_W | VREF_PWREN_ENABLE_ENABLE;
224 vref->GPRCM.PWREN = VREF_PWREN_KEY_UNLOCK_W | VREF_PWREN_ENABLE_DISABLE;
244 return ((VREF->GPRCM.PWREN & VREF_PWREN_ENABLE_MASK) ==
245 VREF_PWREN_ENABLE_ENABLE);
260 vref->CTL0 |= VREF_CTL0_ENABLE_ENABLE;
273 vref->CTL0 &= ~VREF_CTL0_ENABLE_MASK;
288 return ((vref->CTL0 & VREF_CTL0_ENABLE_MASK) == VREF_CTL0_ENABLE_ENABLE);
291 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_MSPM0L122X_L222X) 299 vref->CTL0 |= VREF_CTL0_COMP_VREF_ENABLE_ENABLE;
314 return ((vref->CTL0 & VREF_CTL0_COMP_VREF_ENABLE_MASK) ==
315 VREF_CTL0_COMP_VREF_ENABLE_ENABLE);
325 vref->CTL0 &= ~(VREF_CTL0_COMP_VREF_ENABLE_MASK);
357 VREF_RSTCTL_RESETASSERT_MASK | VREF_RSTCTL_KEY_UNLOCK_W;
371 return (vref->GPRCM.STAT & VREF_STAT_RESETSTKY_MASK) ==
372 VREF_STAT_RESETSTKY_RESET;
385 return vref->CTL1 & VREF_CTL1_READY_MASK;
__STATIC_INLINE bool DL_VREF_isInternalRefCOMPEnabled(const VREF_Regs *vref)
Checks if VREF buffer for comparator is enabled.
Definition: dl_vref.h:312
__STATIC_INLINE void DL_VREF_disableInternalRef(VREF_Regs *vref)
Disables Internal VREF, allows for External VREF.
Definition: dl_vref.h:271
Definition: dl_vref.h:158
__STATIC_INLINE void DL_VREF_enablePower(VREF_Regs *vref)
Enables the Peripheral Write Enable (PWREN) register for the VREF.
Definition: dl_vref.h:206
uint32_t holdCycleCount
Definition: dl_vref.h:192
__STATIC_INLINE void DL_VREF_reset(VREF_Regs *vref)
Resets the VREF module.
Definition: dl_vref.h:354
Definition: dl_vref.h:142
Definition: dl_vref.h:140
Definition: dl_vref.h:126
__STATIC_INLINE void DL_VREF_enableInternalRefCOMP(VREF_Regs *vref)
Enable VREF buffer as internal reference input for comparator.
Definition: dl_vref.h:297
Definition: dl_vref.h:150
__STATIC_INLINE void DL_VREF_enableInternalRef(VREF_Regs *vref)
Enables Internal VREF.
Definition: dl_vref.h:258
DL_VREF_CLOCK
Definition: dl_vref.h:122
__STATIC_INLINE bool DL_VREF_isPowerEnabled(VREF_Regs *vref)
Returns if the Peripheral Write Enable (PWREN) register for the VREF is enabled.
Definition: dl_vref.h:242
Definition: dl_vref.h:124
DL_VREF_ENABLE vrefEnable
Definition: dl_vref.h:184
__STATIC_INLINE uint32_t DL_VREF_getStatus(const VREF_Regs *vref)
Returns VREF register status.
Definition: dl_vref.h:383
DL_VREF_SHMODE
Definition: dl_vref.h:162
__STATIC_INLINE bool DL_VREF_isEnabled(const VREF_Regs *vref)
Checks if the internal VREF is enabled.
Definition: dl_vref.h:286
DL_VREF_CLOCK_DIVIDE divideRatio
Definition: dl_vref.h:176
Definition: dl_vref.h:164
uint32_t shCycleCount
Definition: dl_vref.h:190
Definition: dl_vref.h:166
DL_VREF_BUFCONFIG bufConfig
Definition: dl_vref.h:186
void DL_VREF_getClockConfig(const VREF_Regs *vref, DL_VREF_ClockConfig *config)
Copy the clock select and clock divide fields in VREF to config.
void DL_VREF_configReference(VREF_Regs *vref, const DL_VREF_Config *config)
Configure VREF enable, control registers.
__STATIC_INLINE void DL_VREF_disableInternalRefCOMP(VREF_Regs *vref)
Disable VREF buffer as internal reference input for comparator.
Definition: dl_vref.h:323
__STATIC_INLINE void DL_VREF_disablePower(VREF_Regs *vref)
Disables the Peripheral Write Enable (PWREN) register for the VREF.
Definition: dl_vref.h:222
__STATIC_INLINE bool DL_VREF_isReset(const VREF_Regs *vref)
Returns if VREF peripheral was reset.
Definition: dl_vref.h:369
Definition: dl_vref.h:148
DL_VREF_SHMODE shModeEnable
Definition: dl_vref.h:188
DL_VREF_CLOCK clockSel
Definition: dl_vref.h:174
DL_VREF_BUFCONFIG
Definition: dl_vref.h:154
Configuration struct for DL_VREF_Config.
Definition: dl_vref.h:182
Definition: dl_vref.h:138
Definition: dl_vref.h:128
Definition: dl_vref.h:136
void DL_VREF_setClockConfig(VREF_Regs *vref, const DL_VREF_ClockConfig *config)
Set the clock select and clock divide fields in VREF.
Configuration struct for DL_VREF_setClockConfig.
Definition: dl_vref.h:172
DL_VREF_ENABLE
Definition: dl_vref.h:146
DL_VREF_CLOCK_DIVIDE
Definition: dl_vref.h:132
Definition: dl_vref.h:134
Definition: dl_vref.h:156