DocID025202 Rev 7
396/1080
RM0365
Digital-to-analog converter (DAC1)
406
Figure 113. Timing diagram for conversion with trigger disabled TEN = 0
Independent trigger with single LFSR generation
To configure the DAC in this conversion mode (see
Section 16.6: Noise generation
following sequence is required:
1.
Set the DAC channel trigger enable bit TENx.
2. Configure the trigger source by setting TSELx[2:0] bits.
3. Configure the DAC channel WAVEx[1:0] bits as “01” and the same LFSR mask value in
the MAMPx[3:0] bits
4. Load the DAC channel data into the desired DAC_DHRx register (DHR12RD,
DHR12LD or DHR8RD).
When a DAC channelx trigger arrives, the LFSRx counter, with the same mask, is added to
the DHRx register and the sum is transferred into DAC_DORx (three APB clock cycles
later). Then the LFSRx counter is updated.
Independent trigger with single triangle generation
To configure the DAC in this conversion mode (see
Section 16.7: Triangle-wave generation
),
the following sequence is required:
1.
Set the DAC channelx trigger enable TENx bits.
2. Configure the trigger source by setting TSELx[2:0] bits.
3. Configure the DAC channelx WAVEx[1:0] bits as “1x” and the same maximum
amplitude value in the MAMPx[3:0] bits
4. Load the DAC channelx data into the desired DAC_DHRx register. (DHR12RD,
DHR12LD or DHR8RD).
When a DAC channelx trigger arrives, the DAC channelx triangle counter, with the same
triangle amplitude, is added to the DHRx register and the sum is transferred into
DAC_DORx (three APB clock cycles later). The DAC channelx triangle counter is then
updated.
16.5.3 DAC
output
voltage
Digital inputs are converted to output voltages on a linear conversion between 0 and V
REF+
(or V
DDA
depending on the package).
The analog output voltages on each DAC channel pin are determined by the following
equation:
!0"?#,+
X!#
X!#
T
3%44,).'
$(2
$/2
/UTPUTVOLTAGE
AVAILABLEON$!#?/54PIN
AIB
DACoutput V
REF+
DOR
4096
--------------
×
=