GD32VF103 User Manual
190
12.3.2.
DAC output buffer
For the concern of reducing output impedance, and driving external loads without an external
operational amplifier, an output buffer is integrated inside each DAC module.
The output buffer, which is turned on by default to reduce the output impedance and improve
the driving capability, can be turned off by setting the DBOFFx bits in the DAC_CTL register.
12.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.
12.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 12-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
EXTI9
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.
12.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.