Digital-to-analog converter (DAC)
Figure 136. DAC conversion (SW trigger enabled) with triangle wave generation
APB1_CLK
DHR
DOR
SWTRIG
Note:
1
The DAC trigger must be enabled for noise generation by setting the TENx bit in the
DAC_CR register.
2
The MAMPx[3:0] bits must be configured before enabling the DAC, otherwise they cannot
be changed.
17.3.10
DAC channel modes
Each DAC channel can be configured in normal mode or sample and hold mode. The output
buffer can be enabled to allow a high drive capability. Before enabling output buffer, the
voltage offset needs to be calibrated. This calibration is performed at the factory (loaded
after reset) and can be adjusted by software during application operation.
Normal Mode
In normal mode, there are four combinations, by changing the buffer state and by changing
the DAC_OUTx pin interconnections.
To enable the output buffer, the MODEx[2:0] bits in DAC_MCR register should be:
–
–
To disable the output buffer, the MODEx[2:0] bits in DAC_MCR register should be:
–
–
Sample and Hold Mode
In sample and Hold mode, the DAC core converts data on a triggered conversion, then,
holds the converted voltage on a capacitor. When not converting, the DAC cores and buffer
are completely turned off between samples and the DAC output is tri-stated, therefore
reducing the overall power consumption. A new stabilization period (T
depending on buffer state) is needed before each new conversion.
In this mode, the DAC core and all corresponding logic and registers are driven by the low-
speed clock (LSI : Low Speed Internal oscillator) in addition to the APB bus clock, allowing
to use the DAC channels in deep Low power modes such as STOP mode.
548/1693
0xABE
000: DAC is connected to the external pin
001: DAC is connected to external pin and to on-chip peripherals
010: DAC is connected to the external pin
011: DAC is connected to on-chip peripherals
DocID024597 Rev 3
0xABE
0xABF
0xAC0
or T
stab-BON
stab-BOFF
RM0351
ai14714
Need help?
Do you have a question about the STM32L4x6 and is the answer not in the manual?
Questions and answers