Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TUKS-COURSE-TIMER by
Configuration of DAC channels
[DAC Exported Functions]
Functions | |
__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. | |
__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. | |
__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. | |
__STATIC_INLINE uint32_t | LL_DAC_GetTrimmingValue (DAC_TypeDef *DACx, uint32_t DAC_Channel) |
Get the offset trimming value for the selected DAC channel. | |
__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. | |
__STATIC_INLINE uint32_t | LL_DAC_GetTriggerSource (DAC_TypeDef *DACx, uint32_t DAC_Channel) |
Get the conversion trigger source for the selected DAC channel. | |
__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. | |
__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. | |
__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). | |
__STATIC_INLINE uint32_t | LL_DAC_GetWaveNoiseLFSR (DAC_TypeDef *DACx, uint32_t DAC_Channel) |
Set the noise waveform generation for the selected DAC channel: Noise mode and parameters LFSR (linear feedback shift register). | |
__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. | |
__STATIC_INLINE uint32_t | LL_DAC_GetWaveTriangleAmplitude (DAC_TypeDef *DACx, uint32_t DAC_Channel) |
Set the triangle waveform generation for the selected DAC channel: triangle mode and amplitude. | |
__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. | |
__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. | |
__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. | |
__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. | |
__STATIC_INLINE uint32_t | LL_DAC_GetOutputBuffer (DAC_TypeDef *DACx, uint32_t DAC_Channel) |
Get the output buffer state for the selected DAC channel. | |
__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. | |
__STATIC_INLINE uint32_t | LL_DAC_GetOutputConnection (DAC_TypeDef *DACx, uint32_t DAC_Channel) |
Get the output connection for the selected DAC channel. | |
__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. | |
__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. | |
__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. | |
__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. | |
__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. | |
__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. |
Function Documentation
__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:
- mode normal or sample-and-hold
- buffer
- connection to GPIO or internal path. These features can also be set individually using dedicated functions:
- LL_DAC_SetOutputBuffer()
- LL_DAC_SetOutputMode()
- LL_DAC_SetOutputConnection()
-
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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
OutputMode This parameter can be one of the following values: - LL_DAC_OUTPUT_MODE_NORMAL
- LL_DAC_OUTPUT_MODE_SAMPLE_AND_HOLD
OutputBuffer This parameter can be one of the following values: - LL_DAC_OUTPUT_BUFFER_ENABLE
- LL_DAC_OUTPUT_BUFFER_DISABLE
OutputConnection This parameter can be one of the following values: - LL_DAC_OUTPUT_CONNECT_GPIO
- LL_DAC_OUTPUT_CONNECT_INTERNAL
- Return values:
-
None
Definition at line 922 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Returned value can be one of the following values: - LL_DAC_MODE_NORMAL_OPERATION
- LL_DAC_MODE_CALIBRATION
Definition at line 596 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Returned value can be one of the following values: - LL_DAC_OUTPUT_BUFFER_ENABLE
- LL_DAC_OUTPUT_BUFFER_DISABLE
Definition at line 1011 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Returned value can be one of the following values: - LL_DAC_OUTPUT_CONNECT_GPIO
- LL_DAC_OUTPUT_CONNECT_INTERNAL
Definition at line 1070 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Returned value can be one of the following values: - LL_DAC_OUTPUT_MODE_NORMAL
- LL_DAC_OUTPUT_MODE_SAMPLE_AND_HOLD
Definition at line 968 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Value between Min_Data=0x000 and Max_Data=0x3FF
Definition at line 1150 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Value between Min_Data=0x00 and Max_Data=0xFF
Definition at line 1187 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Value between Min_Data=0x000 and Max_Data=0x3FF
Definition at line 1113 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Returned value can be one of the following values: - LL_DAC_TRIG_SOFTWARE
- 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_TRIGGER_EXT_IT9
Definition at line 696 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
TrimmingValue Value between Min_Data=0x00 and Max_Data=0x1F
Definition at line 635 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Returned value 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 739 of file stm32l4xx_ll_dac.h.
__STATIC_INLINE uint32_t LL_DAC_GetWaveNoiseLFSR | ( | DAC_TypeDef * | DACx, |
uint32_t | DAC_Channel | ||
) |
Set 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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Returned value 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 805 of file stm32l4xx_ll_dac.h.
__STATIC_INLINE uint32_t LL_DAC_GetWaveTriangleAmplitude | ( | DAC_TypeDef * | DACx, |
uint32_t | DAC_Channel | ||
) |
Set the triangle waveform generation for the selected DAC channel: triangle mode and amplitude.
CR MAMP1 LL_DAC_GetWaveTriangleAmplitude
CR MAMP2 LL_DAC_GetWaveTriangleAmplitude
- Parameters:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
- Return values:
-
Returned value 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 871 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
ChannelMode This parameter can be one of the following values: - LL_DAC_MODE_NORMAL_OPERATION
- LL_DAC_MODE_CALIBRATION
- Return values:
-
None
Definition at line 576 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
OutputBuffer This parameter can be one of the following values: - LL_DAC_OUTPUT_BUFFER_ENABLE
- LL_DAC_OUTPUT_BUFFER_DISABLE
- Return values:
-
None
Definition at line 992 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
OutputConnection This parameter can be one of the following values: - LL_DAC_OUTPUT_CONNECT_GPIO
- LL_DAC_OUTPUT_CONNECT_INTERNAL
- Return values:
-
None
Definition at line 1041 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
OutputMode This 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 949 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
HoldTime Value between Min_Data=0x000 and Max_Data=0x3FF
- Return values:
-
None
Definition at line 1132 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
RefreshTime Value between Min_Data=0x00 and Max_Data=0xFF
- Return values:
-
None
Definition at line 1169 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
SampleTime Value between Min_Data=0x000 and Max_Data=0x3FF
- Return values:
-
None
Definition at line 1093 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
TriggerSource This parameter can be one of the following values: - LL_DAC_TRIG_SOFTWARE
- 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_EXTI_LINE9
- Return values:
-
None
Definition at line 667 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
TrimmingValue Value between Min_Data=0x00 and Max_Data=0x1F
- Return values:
-
None
Definition at line 616 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
WaveAutoGeneration This 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 718 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
NoiseLFSRMask This 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 775 of file stm32l4xx_ll_dac.h.
__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:
-
DACx DAC instance DAC_Channel This parameter can be one of the following values: - LL_DAC_CHANNEL_1
- LL_DAC_CHANNEL_2
TriangleAmplitude This 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 841 of file stm32l4xx_ll_dac.h.
Generated on Tue Jul 12 2022 17:38:56 by
