STM32F4xx_HAL_Driver  1.8.3
DAC Exported Functions
+ Collaboration diagram for DAC Exported Functions:

Modules

 Initialization and de-initialization functions
 

Functions

__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 (const 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. @rmtoll CR WAVE1 LL_DAC_SetWaveAutoGeneration
CR WAVE2 LL_DAC_SetWaveAutoGeneration. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetWaveAutoGeneration (const DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the waveform automatic generation mode for the selected DAC channel. @rmtoll 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 (const 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). @rmtoll 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 (const DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the triangle waveform generation for the selected DAC channel: triangle mode and amplitude. @rmtoll CR MAMP1 LL_DAC_GetWaveTriangleAmplitude
CR MAMP2 LL_DAC_GetWaveTriangleAmplitude. 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. @rmtoll CR BOFF1 LL_DAC_SetOutputBuffer
CR BOFF2 LL_DAC_SetOutputBuffer. More...
 
__STATIC_INLINE uint32_t LL_DAC_GetOutputBuffer (const DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Get the output buffer state for the selected DAC channel. @rmtoll CR BOFF1 LL_DAC_GetOutputBuffer
CR BOFF2 LL_DAC_GetOutputBuffer. More...
 

Detailed Description

Function Documentation

◆ LL_DAC_GetOutputBuffer()

__STATIC_INLINE uint32_t LL_DAC_GetOutputBuffer ( const DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the output buffer state for the selected DAC channel. @rmtoll CR BOFF1 LL_DAC_GetOutputBuffer
CR BOFF2 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 series, 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 825 of file stm32f4xx_ll_dac.h.

◆ LL_DAC_GetTriggerSource()

__STATIC_INLINE uint32_t LL_DAC_GetTriggerSource ( const 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. @rmtoll 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 series, 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_TIM8_TRGO
  • LL_DAC_TRIG_EXT_TIM7_TRGO
  • LL_DAC_TRIG_EXT_TIM6_TRGO
  • LL_DAC_TRIG_EXT_TIM5_TRGO
  • LL_DAC_TRIG_EXT_TIM4_TRGO
  • LL_DAC_TRIG_EXT_TIM2_TRGO
  • LL_DAC_TRIG_EXT_EXTI_LINE9

Definition at line 586 of file stm32f4xx_ll_dac.h.

◆ LL_DAC_GetWaveAutoGeneration()

__STATIC_INLINE uint32_t LL_DAC_GetWaveAutoGeneration ( const DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the waveform automatic generation mode for the selected DAC channel. @rmtoll 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 series, 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 635 of file stm32f4xx_ll_dac.h.

◆ LL_DAC_GetWaveNoiseLFSR()

__STATIC_INLINE uint32_t LL_DAC_GetWaveNoiseLFSR ( const 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). @rmtoll 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 series, 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 707 of file stm32f4xx_ll_dac.h.

◆ LL_DAC_GetWaveTriangleAmplitude()

__STATIC_INLINE uint32_t LL_DAC_GetWaveTriangleAmplitude ( const DAC_TypeDef *  DACx,
uint32_t  DAC_Channel 
)

Get the triangle waveform generation for the selected DAC channel: triangle mode and amplitude. @rmtoll 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 series, 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 780 of file stm32f4xx_ll_dac.h.

◆ 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. @rmtoll CR BOFF1 LL_DAC_SetOutputBuffer
CR BOFF2 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 series, 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 803 of file stm32f4xx_ll_dac.h.

◆ 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. @rmtoll 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 (1)
(1) On this STM32 series, parameter not available on all devices. Refer to device datasheet for channels availability.
TriggerSourceThis parameter can be one of the following values:
  • LL_DAC_TRIG_SOFTWARE
  • LL_DAC_TRIG_EXT_TIM8_TRGO
  • LL_DAC_TRIG_EXT_TIM7_TRGO
  • LL_DAC_TRIG_EXT_TIM6_TRGO
  • LL_DAC_TRIG_EXT_TIM5_TRGO
  • LL_DAC_TRIG_EXT_TIM4_TRGO
  • LL_DAC_TRIG_EXT_TIM2_TRGO
  • LL_DAC_TRIG_EXT_EXTI_LINE9
Return values
None

Definition at line 554 of file stm32f4xx_ll_dac.h.

◆ 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. @rmtoll 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 series, 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 611 of file stm32f4xx_ll_dac.h.

◆ 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). @rmtoll 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 series, 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 674 of file stm32f4xx_ll_dac.h.

◆ 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). @rmtoll 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 series, 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 746 of file stm32f4xx_ll_dac.h.