GD32F20x User Manual
293
operational amplifier, an output buffer is integrated inside each DAC module.
The output buffer, which is turned on by default, can be turned off by setting the DBOFFx bits
in the DAC_CTL register.
15.3.3.
DAC data configuration
The 12-bit DAC holding data (DACx_DH) can be configured by writing any one of the
DACx_R12DH, DACx_L12DH and DACx_R8DH registers. When the data is loaded by
DACx_R8DH register, only the MSB 8 bits are configurable, the LSB 4 bits are forced to
4
’b0000.
15.3.4.
DAC trigger
The DAC external trigger is enabled by setting the DTENx bits in the DAC_CTL register. The
DAC external triggers are selected by the DTSELx bits in the DAC_CTL register.
Table 15-2. External triggers of DAC
DTSELx[2:0]
Trigger Source
Trigger Type
000
TIMER5_TRGO
Internal on-chip signal
001
TIMER2_TRGO
010
TIMER6_TRGO
011
TIMER4_TRGO
100
TIMER1_TRGO
101
TIMER3_TRGO
110
EXTI_9
External signal
111
SWTRIG
Software trigger
The TIMERx_TRGO signals are generated from the timers, while the software trigger can be
generated by setting the SWTRx bits in the DAC_SWT register.
15.3.5.
DAC conversion
If the external trigger is enabled by setting the DTENx bit in DAC_CTL register, the DAC
holding data is transferred to the DAC output data (DACx_DO) register at the selected trigger
events. Otherwise, when the external trigger is disabled, the transfer is performed
automatically.
When the DAC holding data (DACx_DH) is loaded into the DACx_DO register, after the time
t
SETTLING
, the analog output is valid, and the value of t
SETTLING
is related to the power supply
voltage and the analog output load.
15.3.6.
DAC noise wave
There are two methods of adding noise wave to the DAC output data: LFSR noise wave and
triangle wave. The noise wave mode can be selected by the DWMx bits in the DAC_CTL
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...