STM32L4xx_HAL_Driver  1.14.0
Configuration of DAC instance

Functions

__STATIC_INLINE void LL_DAC_SetHighFrequencyMode (DAC_TypeDef *DACx, uint32_t HighFreqMode)
 Set the high frequency interface mode for the selected DAC instance CR HFSEL LL_DAC_SetHighFrequencyMode. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetHighFrequencyMode (DAC_TypeDef *DACx)
 Get the high frequency interface mode for the selected DAC instance CR HFSEL LL_DAC_GetHighFrequencyMode. More...
 
__STATIC_INLINE void LL_DAC_SetMode (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t ChannelMode)
 Set the operating mode for the selected DAC channel: calibration or normal operating mode. CR CEN1 LL_DAC_SetMode
CR CEN2 LL_DAC_SetMode. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetMode (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the operating mode for the selected DAC channel: calibration or normal operating mode. CR CEN1 LL_DAC_GetMode
CR CEN2 LL_DAC_GetMode. More...
 
__STATIC_INLINE void LL_DAC_SetTrimmingValue (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t TrimmingValue)
 Set the offset trimming value for the selected DAC channel. Trimming has an impact when output buffer is enabled and is intended to replace factory calibration default values. CCR OTRIM1 LL_DAC_SetTrimmingValue
CCR OTRIM2 LL_DAC_SetTrimmingValue. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetTrimmingValue (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the offset trimming value for the selected DAC channel. Trimming has an impact when output buffer is enabled and is intended to replace factory calibration default values. CCR OTRIM1 LL_DAC_GetTrimmingValue
CCR OTRIM2 LL_DAC_GetTrimmingValue. More...
 
__STATIC_INLINE void LL_DAC_SetTriggerSource (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t TriggerSource)
 Set the conversion trigger source for the selected DAC channel. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetTriggerSource (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the conversion trigger source for the selected DAC channel. More...
 
__STATIC_INLINE void LL_DAC_SetWaveAutoGeneration (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t WaveAutoGeneration)
 Set the waveform automatic generation mode for the selected DAC channel. CR WAVE1 LL_DAC_SetWaveAutoGeneration
CR WAVE2 LL_DAC_SetWaveAutoGeneration. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetWaveAutoGeneration (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the waveform automatic generation mode for the selected DAC channel. CR WAVE1 LL_DAC_GetWaveAutoGeneration
CR WAVE2 LL_DAC_GetWaveAutoGeneration. More...
 
__STATIC_INLINE void LL_DAC_SetWaveNoiseLFSR (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t NoiseLFSRMask)
 Set the noise waveform generation for the selected DAC channel: Noise mode and parameters LFSR (linear feedback shift register). More...
 
__STATIC_INLINE uint32_t LL_DAC_GetWaveNoiseLFSR (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the noise waveform generation for the selected DAC channel: Noise mode and parameters LFSR (linear feedback shift register). CR MAMP1 LL_DAC_GetWaveNoiseLFSR
CR MAMP2 LL_DAC_GetWaveNoiseLFSR. More...
 
__STATIC_INLINE void LL_DAC_SetWaveTriangleAmplitude (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t TriangleAmplitude)
 Set the triangle waveform generation for the selected DAC channel: triangle mode and amplitude. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetWaveTriangleAmplitude (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the triangle waveform generation for the selected DAC channel: triangle mode and amplitude. CR MAMP1 LL_DAC_GetWaveTriangleAmplitude
CR MAMP2 LL_DAC_GetWaveTriangleAmplitude. More...
 
__STATIC_INLINE void LL_DAC_ConfigOutput (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t OutputMode, uint32_t OutputBuffer, uint32_t OutputConnection)
 Set the output for the selected DAC channel. More...
 
__STATIC_INLINE void LL_DAC_SetOutputMode (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t OutputMode)
 Set the output mode normal or sample-and-hold for the selected DAC channel. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetOutputMode (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the output mode normal or sample-and-hold for the selected DAC channel. CR MODE1 LL_DAC_GetOutputMode
CR MODE2 LL_DAC_GetOutputMode. More...
 
__STATIC_INLINE void LL_DAC_SetOutputBuffer (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t OutputBuffer)
 Set the output buffer for the selected DAC channel. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetOutputBuffer (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the output buffer state for the selected DAC channel. CR MODE1 LL_DAC_GetOutputBuffer
CR MODE2 LL_DAC_GetOutputBuffer. More...
 
__STATIC_INLINE void LL_DAC_SetOutputConnection (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t OutputConnection)
 Set the output connection for the selected DAC channel. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetOutputConnection (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the output connection for the selected DAC channel. More...
 
__STATIC_INLINE void LL_DAC_SetSampleAndHoldSampleTime (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t SampleTime)
 Set the sample-and-hold timing for the selected DAC channel: sample time. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetSampleAndHoldSampleTime (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the sample-and-hold timing for the selected DAC channel: sample time SHSR1 TSAMPLE1 LL_DAC_GetSampleAndHoldSampleTime
SHSR2 TSAMPLE2 LL_DAC_GetSampleAndHoldSampleTime. More...
 
__STATIC_INLINE void LL_DAC_SetSampleAndHoldHoldTime (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t HoldTime)
 Set the sample-and-hold timing for the selected DAC channel: hold time SHHR THOLD1 LL_DAC_SetSampleAndHoldHoldTime
SHHR THOLD2 LL_DAC_SetSampleAndHoldHoldTime. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetSampleAndHoldHoldTime (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the sample-and-hold timing for the selected DAC channel: hold time SHHR THOLD1 LL_DAC_GetSampleAndHoldHoldTime
SHHR THOLD2 LL_DAC_GetSampleAndHoldHoldTime. More...
 
__STATIC_INLINE void LL_DAC_SetSampleAndHoldRefreshTime (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t RefreshTime)
 Set the sample-and-hold timing for the selected DAC channel: refresh time SHRR TREFRESH1 LL_DAC_SetSampleAndHoldRefreshTime
SHRR TREFRESH2 LL_DAC_SetSampleAndHoldRefreshTime. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetSampleAndHoldRefreshTime (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the sample-and-hold timing for the selected DAC channel: refresh time SHRR TREFRESH1 LL_DAC_GetSampleAndHoldRefreshTime
SHRR TREFRESH2 LL_DAC_GetSampleAndHoldRefreshTime. More...
 

Detailed Description

Function Documentation

◆ LL_DAC_ConfigOutput()

__STATIC_INLINE void LL_DAC_ConfigOutput ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  OutputMode,
uint32_t  OutputBuffer,
uint32_t  OutputConnection 
)

Set the output for the selected DAC channel.

Note
This function set several features:
On this STM32 serie, output connection depends on output mode (normal or sample and hold) and output buffer state.
  • if output connection is set to internal path and output buffer is enabled (whatever output mode): output connection is also connected to GPIO pin (both connections to GPIO pin and internal path).
  • if output connection is set to GPIO pin, output buffer is disabled, output mode set to sample and hold: output connection is also connected to internal path (both connections to GPIO pin and internal path).
Mode sample-and-hold requires an external capacitor to be connected between DAC channel output and ground. Capacitor value depends on load on DAC channel output and sample-and-hold timings configured. As indication, capacitor typical value is 100nF (refer to device datasheet, parameter "CSH"). CR MODE1 LL_DAC_ConfigOutput
CR MODE2 LL_DAC_ConfigOutput
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
OutputModeThis parameter can be one of the following values:
  • LL_DAC_OUTPUT_MODE_NORMAL
  • LL_DAC_OUTPUT_MODE_SAMPLE_AND_HOLD
OutputBufferThis parameter can be one of the following values:
  • LL_DAC_OUTPUT_BUFFER_ENABLE
  • LL_DAC_OUTPUT_BUFFER_DISABLE
OutputConnectionThis parameter can be one of the following values:
  • LL_DAC_OUTPUT_CONNECT_GPIO
  • LL_DAC_OUTPUT_CONNECT_INTERNAL
Return values
None

Definition at line 1013 of file stm32l4xx_ll_dac.h.

1015 {
1016  MODIFY_REG(DACx->MCR,
1017  (DAC_MCR_MODE1_2 | DAC_MCR_MODE1_1 | DAC_MCR_MODE1_0) << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
1018  (OutputMode | OutputBuffer | OutputConnection) << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
1019 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_GetHighFrequencyMode()

__STATIC_INLINE uint32_t LL_DAC_GetHighFrequencyMode ( DAC_TypeDef *  DACx)

Get the high frequency interface mode for the selected DAC instance CR HFSEL LL_DAC_GetHighFrequencyMode.

Parameters
DACxDAC instance
Return values
Returnedvalue can be one of the following values:
  • LL_DAC_HIGH_FREQ_MODE_DISABLE
  • LL_DAC_HIGH_FREQ_MODE_ABOVE_80MHZ

Definition at line 606 of file stm32l4xx_ll_dac.h.

607 {
608  return (uint32_t)(READ_BIT(DACx->CR, DAC_CR_HFSEL));
609 }

◆ LL_DAC_GetMode()

__STATIC_INLINE uint32_t LL_DAC_GetMode ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the operating mode for the selected DAC channel: calibration or normal operating mode. CR CEN1 LL_DAC_GetMode
CR CEN2 LL_DAC_GetMode.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2
Return values
Returnedvalue can be one of the following values:
  • LL_DAC_MODE_NORMAL_OPERATION
  • LL_DAC_MODE_CALIBRATION

Definition at line 654 of file stm32l4xx_ll_dac.h.

655 {
656  return (uint32_t)(READ_BIT(DACx->CR, DAC_CR_CEN1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
657  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
658  );
659 }

◆ LL_DAC_GetOutputBuffer()

__STATIC_INLINE uint32_t LL_DAC_GetOutputBuffer ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the output buffer state for the selected DAC channel. CR MODE1 LL_DAC_GetOutputBuffer
CR MODE2 LL_DAC_GetOutputBuffer.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Returnedvalue can be one of the following values:
  • LL_DAC_OUTPUT_BUFFER_ENABLE
  • LL_DAC_OUTPUT_BUFFER_DISABLE

Definition at line 1115 of file stm32l4xx_ll_dac.h.

1116 {
1117  return (uint32_t)(READ_BIT(DACx->MCR, (uint32_t)DAC_MCR_MODE1_1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
1118  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
1119  );
1120 }

◆ LL_DAC_GetOutputConnection()

__STATIC_INLINE uint32_t LL_DAC_GetOutputConnection ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the output connection for the selected DAC channel.

Note
On this STM32 serie, output connection depends on output mode (normal or sample and hold) and output buffer state.
  • if output connection is set to internal path and output buffer is enabled (whatever output mode): output connection is also connected to GPIO pin (both connections to GPIO pin and internal path).
  • if output connection is set to GPIO pin, output buffer is disabled, output mode set to sample and hold: output connection is also connected to internal path (both connections to GPIO pin and internal path). CR MODE1 LL_DAC_GetOutputConnection
    CR MODE2 LL_DAC_GetOutputConnection
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Returnedvalue can be one of the following values:
  • LL_DAC_OUTPUT_CONNECT_GPIO
  • LL_DAC_OUTPUT_CONNECT_INTERNAL

Definition at line 1180 of file stm32l4xx_ll_dac.h.

1181 {
1182  return (uint32_t)(READ_BIT(DACx->MCR, (uint32_t)DAC_MCR_MODE1_0 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
1183  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
1184  );
1185 }

◆ LL_DAC_GetOutputMode()

__STATIC_INLINE uint32_t LL_DAC_GetOutputMode ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the output mode normal or sample-and-hold for the selected DAC channel. CR MODE1 LL_DAC_GetOutputMode
CR MODE2 LL_DAC_GetOutputMode.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Returnedvalue can be one of the following values:
  • LL_DAC_OUTPUT_MODE_NORMAL
  • LL_DAC_OUTPUT_MODE_SAMPLE_AND_HOLD

Definition at line 1066 of file stm32l4xx_ll_dac.h.

1067 {
1068  return (uint32_t)(READ_BIT(DACx->MCR, (uint32_t)DAC_MCR_MODE1_2 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
1069  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
1070  );
1071 }

◆ LL_DAC_GetSampleAndHoldHoldTime()

__STATIC_INLINE uint32_t LL_DAC_GetSampleAndHoldHoldTime ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the sample-and-hold timing for the selected DAC channel: hold time SHHR THOLD1 LL_DAC_GetSampleAndHoldHoldTime
SHHR THOLD2 LL_DAC_GetSampleAndHoldHoldTime.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Valuebetween Min_Data=0x000 and Max_Data=0x3FF

Definition at line 1272 of file stm32l4xx_ll_dac.h.

1273 {
1274  return (uint32_t)(READ_BIT(DACx->SHHR, DAC_SHHR_THOLD1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
1275  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
1276  );
1277 }

◆ LL_DAC_GetSampleAndHoldRefreshTime()

__STATIC_INLINE uint32_t LL_DAC_GetSampleAndHoldRefreshTime ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the sample-and-hold timing for the selected DAC channel: refresh time SHRR TREFRESH1 LL_DAC_GetSampleAndHoldRefreshTime
SHRR TREFRESH2 LL_DAC_GetSampleAndHoldRefreshTime.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Valuebetween Min_Data=0x00 and Max_Data=0xFF

Definition at line 1315 of file stm32l4xx_ll_dac.h.

1316 {
1317  return (uint32_t)(READ_BIT(DACx->SHRR, DAC_SHRR_TREFRESH1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
1318  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
1319  );
1320 }

◆ LL_DAC_GetSampleAndHoldSampleTime()

__STATIC_INLINE uint32_t LL_DAC_GetSampleAndHoldSampleTime ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the sample-and-hold timing for the selected DAC channel: sample time SHSR1 TSAMPLE1 LL_DAC_GetSampleAndHoldSampleTime
SHSR2 TSAMPLE2 LL_DAC_GetSampleAndHoldSampleTime.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Valuebetween Min_Data=0x000 and Max_Data=0x3FF

Definition at line 1229 of file stm32l4xx_ll_dac.h.

1230 {
1231  __IO uint32_t const *preg = __DAC_PTR_REG_OFFSET(DACx->SHSR1, (DAC_Channel >> DAC_REG_SHSRX_REGOFFSET_BITOFFSET_POS) & DAC_REG_SHSRX_REGOFFSET_MASK_POSBIT0);
1232 
1233  return (uint32_t) READ_BIT(*preg, DAC_SHSR1_TSAMPLE1);
1234 }

◆ LL_DAC_GetTriggerSource()

__STATIC_INLINE uint32_t LL_DAC_GetTriggerSource ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the conversion trigger source for the selected DAC channel.

Note
For conversion trigger source to be effective, DAC trigger must be enabled using function LL_DAC_EnableTrigger().
Availability of parameters of trigger sources from timer depends on timers availability on the selected device. CR TSEL1 LL_DAC_GetTriggerSource
CR TSEL2 LL_DAC_GetTriggerSource
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Returnedvalue can be one of the following values:
  • LL_DAC_TRIG_SOFTWARE
  • LL_DAC_TRIG_EXT_TIM1_TRGO
  • LL_DAC_TRIG_EXT_TIM2_TRGO
  • LL_DAC_TRIG_EXT_TIM4_TRGO
  • LL_DAC_TRIG_EXT_TIM5_TRGO
  • LL_DAC_TRIG_EXT_TIM6_TRGO
  • LL_DAC_TRIG_EXT_TIM7_TRGO
  • LL_DAC_TRIG_EXT_TIM8_TRGO
  • LL_DAC_TRIG_EXT_TIM15_TRGO
  • LL_DAC_TRIG_EXT_LPTIM1_OUT
  • LL_DAC_TRIG_EXT_LPTIM2_OUT
  • LL_DAC_TRIG_EXT_EXTI_LINE9

Definition at line 765 of file stm32l4xx_ll_dac.h.

766 {
767  return (uint32_t)(READ_BIT(DACx->CR, DAC_CR_TSEL1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
768  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
769  );
770 }

◆ LL_DAC_GetTrimmingValue()

__STATIC_INLINE uint32_t LL_DAC_GetTrimmingValue ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the offset trimming value for the selected DAC channel. Trimming has an impact when output buffer is enabled and is intended to replace factory calibration default values. CCR OTRIM1 LL_DAC_GetTrimmingValue
CCR OTRIM2 LL_DAC_GetTrimmingValue.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2
Return values
TrimmingValueValue between Min_Data=0x00 and Max_Data=0x1F

Definition at line 693 of file stm32l4xx_ll_dac.h.

694 {
695  return (uint32_t)(READ_BIT(DACx->CCR, DAC_CCR_OTRIM1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
696  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
697  );
698 }

◆ LL_DAC_GetWaveAutoGeneration()

__STATIC_INLINE uint32_t LL_DAC_GetWaveAutoGeneration ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the waveform automatic generation mode for the selected DAC channel. CR WAVE1 LL_DAC_GetWaveAutoGeneration
CR WAVE2 LL_DAC_GetWaveAutoGeneration.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Returnedvalue can be one of the following values:
  • LL_DAC_WAVE_AUTO_GENERATION_NONE
  • LL_DAC_WAVE_AUTO_GENERATION_NOISE
  • LL_DAC_WAVE_AUTO_GENERATION_TRIANGLE

Definition at line 814 of file stm32l4xx_ll_dac.h.

815 {
816  return (uint32_t)(READ_BIT(DACx->CR, DAC_CR_WAVE1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
817  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
818  );
819 }

◆ LL_DAC_GetWaveNoiseLFSR()

__STATIC_INLINE uint32_t LL_DAC_GetWaveNoiseLFSR ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the noise waveform generation for the selected DAC channel: Noise mode and parameters LFSR (linear feedback shift register). CR MAMP1 LL_DAC_GetWaveNoiseLFSR
CR MAMP2 LL_DAC_GetWaveNoiseLFSR.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Returnedvalue can be one of the following values:
  • LL_DAC_NOISE_LFSR_UNMASK_BIT0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS1_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS2_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS3_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS4_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS5_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS6_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS7_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS8_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS9_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS10_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS11_0

Definition at line 886 of file stm32l4xx_ll_dac.h.

887 {
888  return (uint32_t)(READ_BIT(DACx->CR, DAC_CR_MAMP1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
889  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
890  );
891 }

◆ LL_DAC_GetWaveTriangleAmplitude()

__STATIC_INLINE uint32_t LL_DAC_GetWaveTriangleAmplitude ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the triangle waveform generation for the selected DAC channel: triangle mode and amplitude. CR MAMP1 LL_DAC_GetWaveTriangleAmplitude
CR MAMP2 LL_DAC_GetWaveTriangleAmplitude.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
Return values
Returnedvalue can be one of the following values:
  • LL_DAC_TRIANGLE_AMPLITUDE_1
  • LL_DAC_TRIANGLE_AMPLITUDE_3
  • LL_DAC_TRIANGLE_AMPLITUDE_7
  • LL_DAC_TRIANGLE_AMPLITUDE_15
  • LL_DAC_TRIANGLE_AMPLITUDE_31
  • LL_DAC_TRIANGLE_AMPLITUDE_63
  • LL_DAC_TRIANGLE_AMPLITUDE_127
  • LL_DAC_TRIANGLE_AMPLITUDE_255
  • LL_DAC_TRIANGLE_AMPLITUDE_511
  • LL_DAC_TRIANGLE_AMPLITUDE_1023
  • LL_DAC_TRIANGLE_AMPLITUDE_2047
  • LL_DAC_TRIANGLE_AMPLITUDE_4095

Definition at line 959 of file stm32l4xx_ll_dac.h.

960 {
961  return (uint32_t)(READ_BIT(DACx->CR, DAC_CR_MAMP1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK))
962  >> (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK)
963  );
964 }

◆ LL_DAC_SetHighFrequencyMode()

__STATIC_INLINE void LL_DAC_SetHighFrequencyMode ( DAC_TypeDef *  DACx,
uint32_t  HighFreqMode 
)

Set the high frequency interface mode for the selected DAC instance CR HFSEL LL_DAC_SetHighFrequencyMode.

Parameters
DACxDAC instance
HighFreqModeThis parameter can be one of the following values:
  • LL_DAC_HIGH_FREQ_MODE_DISABLE
  • LL_DAC_HIGH_FREQ_MODE_ABOVE_80MHZ
Return values
None

Definition at line 593 of file stm32l4xx_ll_dac.h.

594 {
595  MODIFY_REG(DACx->CR, DAC_CR_HFSEL, HighFreqMode);
596 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetMode()

__STATIC_INLINE void LL_DAC_SetMode ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  ChannelMode 
)

Set the operating mode for the selected DAC channel: calibration or normal operating mode. CR CEN1 LL_DAC_SetMode
CR CEN2 LL_DAC_SetMode.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2
ChannelModeThis parameter can be one of the following values:
  • LL_DAC_MODE_NORMAL_OPERATION
  • LL_DAC_MODE_CALIBRATION
Return values
None

Definition at line 634 of file stm32l4xx_ll_dac.h.

635 {
636  MODIFY_REG(DACx->CR,
637  DAC_CR_CEN1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
638  ChannelMode << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
639 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetOutputBuffer()

__STATIC_INLINE void LL_DAC_SetOutputBuffer ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  OutputBuffer 
)

Set the output buffer for the selected DAC channel.

Note
On this STM32 serie, when buffer is enabled, its offset can be trimmed: factory calibration default values can be replaced by user trimming values, using function LL_DAC_SetTrimmingValue(). CR MODE1 LL_DAC_SetOutputBuffer
CR MODE2 LL_DAC_SetOutputBuffer
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
OutputBufferThis parameter can be one of the following values:
  • LL_DAC_OUTPUT_BUFFER_ENABLE
  • LL_DAC_OUTPUT_BUFFER_DISABLE
Return values
None

Definition at line 1093 of file stm32l4xx_ll_dac.h.

1094 {
1095  MODIFY_REG(DACx->MCR,
1096  (uint32_t)DAC_MCR_MODE1_1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
1097  OutputBuffer << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
1098 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetOutputConnection()

__STATIC_INLINE void LL_DAC_SetOutputConnection ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  OutputConnection 
)

Set the output connection for the selected DAC channel.

Note
On this STM32 serie, output connection depends on output mode (normal or sample and hold) and output buffer state.
  • if output connection is set to internal path and output buffer is enabled (whatever output mode): output connection is also connected to GPIO pin (both connections to GPIO pin and internal path).
  • if output connection is set to GPIO pin, output buffer is disabled, output mode set to sample and hold: output connection is also connected to internal path (both connections to GPIO pin and internal path). CR MODE1 LL_DAC_SetOutputConnection
    CR MODE2 LL_DAC_SetOutputConnection
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
OutputConnectionThis parameter can be one of the following values:
  • LL_DAC_OUTPUT_CONNECT_GPIO
  • LL_DAC_OUTPUT_CONNECT_INTERNAL
Return values
None

Definition at line 1148 of file stm32l4xx_ll_dac.h.

1149 {
1150  MODIFY_REG(DACx->MCR,
1151  (uint32_t)DAC_MCR_MODE1_0 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
1152  OutputConnection << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
1153 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetOutputMode()

__STATIC_INLINE void LL_DAC_SetOutputMode ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  OutputMode 
)

Set the output mode normal or sample-and-hold for the selected DAC channel.

Note
Mode sample-and-hold requires an external capacitor to be connected between DAC channel output and ground. Capacitor value depends on load on DAC channel output and sample-and-hold timings configured. As indication, capacitor typical value is 100nF (refer to device datasheet, parameter "CSH"). CR MODE1 LL_DAC_SetOutputMode
CR MODE2 LL_DAC_SetOutputMode
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
OutputModeThis parameter can be one of the following values:
  • LL_DAC_OUTPUT_MODE_NORMAL
  • LL_DAC_OUTPUT_MODE_SAMPLE_AND_HOLD
Return values
None

Definition at line 1044 of file stm32l4xx_ll_dac.h.

1045 {
1046  MODIFY_REG(DACx->MCR,
1047  (uint32_t)DAC_MCR_MODE1_2 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
1048  OutputMode << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
1049 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetSampleAndHoldHoldTime()

__STATIC_INLINE void LL_DAC_SetSampleAndHoldHoldTime ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  HoldTime 
)

Set the sample-and-hold timing for the selected DAC channel: hold time SHHR THOLD1 LL_DAC_SetSampleAndHoldHoldTime
SHHR THOLD2 LL_DAC_SetSampleAndHoldHoldTime.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
HoldTimeValue between Min_Data=0x000 and Max_Data=0x3FF
Return values
None

Definition at line 1251 of file stm32l4xx_ll_dac.h.

1252 {
1253  MODIFY_REG(DACx->SHHR,
1254  DAC_SHHR_THOLD1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
1255  HoldTime << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
1256 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetSampleAndHoldRefreshTime()

__STATIC_INLINE void LL_DAC_SetSampleAndHoldRefreshTime ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  RefreshTime 
)

Set the sample-and-hold timing for the selected DAC channel: refresh time SHRR TREFRESH1 LL_DAC_SetSampleAndHoldRefreshTime
SHRR TREFRESH2 LL_DAC_SetSampleAndHoldRefreshTime.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
RefreshTimeValue between Min_Data=0x00 and Max_Data=0xFF
Return values
None

Definition at line 1294 of file stm32l4xx_ll_dac.h.

1295 {
1296  MODIFY_REG(DACx->SHRR,
1297  DAC_SHRR_TREFRESH1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
1298  RefreshTime << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
1299 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetSampleAndHoldSampleTime()

__STATIC_INLINE void LL_DAC_SetSampleAndHoldSampleTime ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  SampleTime 
)

Set the sample-and-hold timing for the selected DAC channel: sample time.

Note
Sample time must be set when DAC channel is disabled or during DAC operation when DAC channel flag BWSTx is reset, otherwise the setting is ignored. Check BWSTx flag state using function "LL_DAC_IsActiveFlag_BWSTx()". SHSR1 TSAMPLE1 LL_DAC_SetSampleAndHoldSampleTime
SHSR2 TSAMPLE2 LL_DAC_SetSampleAndHoldSampleTime
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
SampleTimeValue between Min_Data=0x000 and Max_Data=0x3FF
Return values
None

Definition at line 1206 of file stm32l4xx_ll_dac.h.

1207 {
1208  __IO uint32_t *preg = __DAC_PTR_REG_OFFSET(DACx->SHSR1, (DAC_Channel >> DAC_REG_SHSRX_REGOFFSET_BITOFFSET_POS) & DAC_REG_SHSRX_REGOFFSET_MASK_POSBIT0);
1209 
1210  MODIFY_REG(*preg,
1211  DAC_SHSR1_TSAMPLE1,
1212  SampleTime);
1213 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetTriggerSource()

__STATIC_INLINE void LL_DAC_SetTriggerSource ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  TriggerSource 
)

Set the conversion trigger source for the selected DAC channel.

Note
For conversion trigger source to be effective, DAC trigger must be enabled using function LL_DAC_EnableTrigger().
To set conversion trigger source, DAC channel must be disabled. Otherwise, the setting is discarded.
Availability of parameters of trigger sources from timer depends on timers availability on the selected device. CR TSEL1 LL_DAC_SetTriggerSource
CR TSEL2 LL_DAC_SetTriggerSource
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2
TriggerSourceThis parameter can be one of the following values:
  • LL_DAC_TRIG_SOFTWARE
  • LL_DAC_TRIG_EXT_TIM1_TRGO
  • LL_DAC_TRIG_EXT_TIM2_TRGO
  • LL_DAC_TRIG_EXT_TIM4_TRGO
  • LL_DAC_TRIG_EXT_TIM5_TRGO
  • LL_DAC_TRIG_EXT_TIM6_TRGO
  • LL_DAC_TRIG_EXT_TIM7_TRGO
  • LL_DAC_TRIG_EXT_TIM8_TRGO
  • LL_DAC_TRIG_EXT_TIM15_TRGO
  • LL_DAC_TRIG_EXT_LPTIM1_OUT
  • LL_DAC_TRIG_EXT_LPTIM2_OUT
  • LL_DAC_TRIG_EXT_EXTI_LINE9
Return values
None

Definition at line 729 of file stm32l4xx_ll_dac.h.

730 {
731  MODIFY_REG(DACx->CR,
732  DAC_CR_TSEL1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
733  TriggerSource << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
734 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetTrimmingValue()

__STATIC_INLINE void LL_DAC_SetTrimmingValue ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  TrimmingValue 
)

Set the offset trimming value for the selected DAC channel. Trimming has an impact when output buffer is enabled and is intended to replace factory calibration default values. CCR OTRIM1 LL_DAC_SetTrimmingValue
CCR OTRIM2 LL_DAC_SetTrimmingValue.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2
TrimmingValueValue between Min_Data=0x00 and Max_Data=0x1F
Return values
None

Definition at line 674 of file stm32l4xx_ll_dac.h.

675 {
676  MODIFY_REG(DACx->CCR,
677  DAC_CCR_OTRIM1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
678  TrimmingValue << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
679 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetWaveAutoGeneration()

__STATIC_INLINE void LL_DAC_SetWaveAutoGeneration ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  WaveAutoGeneration 
)

Set the waveform automatic generation mode for the selected DAC channel. CR WAVE1 LL_DAC_SetWaveAutoGeneration
CR WAVE2 LL_DAC_SetWaveAutoGeneration.

Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
WaveAutoGenerationThis parameter can be one of the following values:
  • LL_DAC_WAVE_AUTO_GENERATION_NONE
  • LL_DAC_WAVE_AUTO_GENERATION_NOISE
  • LL_DAC_WAVE_AUTO_GENERATION_TRIANGLE
Return values
None

Definition at line 790 of file stm32l4xx_ll_dac.h.

791 {
792  MODIFY_REG(DACx->CR,
793  DAC_CR_WAVE1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
794  WaveAutoGeneration << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
795 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetWaveNoiseLFSR()

__STATIC_INLINE void LL_DAC_SetWaveNoiseLFSR ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  NoiseLFSRMask 
)

Set the noise waveform generation for the selected DAC channel: Noise mode and parameters LFSR (linear feedback shift register).

Note
For wave generation to be effective, DAC channel wave generation mode must be enabled using function LL_DAC_SetWaveAutoGeneration().
This setting can be set when the selected DAC channel is disabled (otherwise, the setting operation is ignored). CR MAMP1 LL_DAC_SetWaveNoiseLFSR
CR MAMP2 LL_DAC_SetWaveNoiseLFSR
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
NoiseLFSRMaskThis parameter can be one of the following values:
  • LL_DAC_NOISE_LFSR_UNMASK_BIT0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS1_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS2_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS3_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS4_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS5_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS6_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS7_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS8_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS9_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS10_0
  • LL_DAC_NOISE_LFSR_UNMASK_BITS11_0
Return values
None

Definition at line 853 of file stm32l4xx_ll_dac.h.

854 {
855  MODIFY_REG(DACx->CR,
856  DAC_CR_MAMP1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
857  NoiseLFSRMask << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
858 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_DAC_SetWaveTriangleAmplitude()

__STATIC_INLINE void LL_DAC_SetWaveTriangleAmplitude ( DAC_TypeDef *  DACx,
uint32_t  DAC_Channel,
uint32_t  TriangleAmplitude 
)

Set the triangle waveform generation for the selected DAC channel: triangle mode and amplitude.

Note
For wave generation to be effective, DAC channel wave generation mode must be enabled using function LL_DAC_SetWaveAutoGeneration().
This setting can be set when the selected DAC channel is disabled (otherwise, the setting operation is ignored). CR MAMP1 LL_DAC_SetWaveTriangleAmplitude
CR MAMP2 LL_DAC_SetWaveTriangleAmplitude
Parameters
DACxDAC instance
DAC_ChannelThis parameter can be one of the following values:
  • LL_DAC_CHANNEL_1
  • LL_DAC_CHANNEL_2 (1)
(1) On this STM32 serie, parameter not available on all devices. Refer to device datasheet for channels availability.
TriangleAmplitudeThis parameter can be one of the following values:
  • LL_DAC_TRIANGLE_AMPLITUDE_1
  • LL_DAC_TRIANGLE_AMPLITUDE_3
  • LL_DAC_TRIANGLE_AMPLITUDE_7
  • LL_DAC_TRIANGLE_AMPLITUDE_15
  • LL_DAC_TRIANGLE_AMPLITUDE_31
  • LL_DAC_TRIANGLE_AMPLITUDE_63
  • LL_DAC_TRIANGLE_AMPLITUDE_127
  • LL_DAC_TRIANGLE_AMPLITUDE_255
  • LL_DAC_TRIANGLE_AMPLITUDE_511
  • LL_DAC_TRIANGLE_AMPLITUDE_1023
  • LL_DAC_TRIANGLE_AMPLITUDE_2047
  • LL_DAC_TRIANGLE_AMPLITUDE_4095
Return values
None

Definition at line 925 of file stm32l4xx_ll_dac.h.

927 {
928  MODIFY_REG(DACx->CR,
929  DAC_CR_MAMP1 << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK),
930  TriangleAmplitude << (DAC_Channel & DAC_CR_CHX_BITOFFSET_MASK));
931 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)