![Silicon Laboratories EFR32xG14 Wireless Gecko Reference Manual Download Page 759](http://html1.mh-extra.com/html/silicon-laboratories/efr32xg14-wireless-gecko/efr32xg14-wireless-gecko_reference-manual_1271728759.webp)
the data is written in 2’s complement form with the MSB of the 12-bit value being the signed bit. The output voltage can be calculated
using
Figure 23.3 VDAC Differential Output Voltage on page 759
V
OUT
= V
VDACn_OUT1
- V
VDACn_OUT0
= V
ref
x CH0DATA/2047
Figure 23.3. VDAC Differential Output Voltage
where CH0DATA is a 12-bit signed integer. The common mode voltage is V
ref
/2.
When using differential mode, the user must make sure that both channels are set up identically. I.e. VDACn_CH0CTRL and
VDACn_CH1CTRL must be programmed to identical values (with the exception that the PRSSEL bitfield is allowed to be programmed
differently for usage together with the OUTENPRS feature). Similarly the user must program VDACn_OPA0TIMER and
VDACn_OPA1TIMER to identical values.
23.3.9 Async Mode
The VDAC is default clocked from HFPERCLK, which is automatically turned off in EM2/3. In order to allow VDAC operation in EM2/3
an internal oscillator can be selected for the VDAC by setting the DACCLKMODE bitfield in VDACn_CTRL to ASYNC. Before entering
EM2/3 software must make sure the channel is enabled first by polling CHxENS in VDACn_STATUS. Entering EM2/3 with an enabled
VDAC channel while DACCLKMODE is set to SYNC is a programming error and will lead to EM23ERRIF getting set to 1.
In asynchronous mode both VDAC channels are not necessarily triggered synchronous to each other and therefore the user should not
assume that e.g. PRS, refresh or VDACn_COMBDATA based conversion triggers are observed by both channels at the same time. In
differential mode both channels will operate in lock step, even while using the asynchronous clocking mode.
23.3.10 Refresh Timer
The VDAC incluces an internal refresh timer. The refresh timer is automatically started if a channel selects either REFRESH or SWRE-
FRESH for TRIGMODE and the channel is enabled. The refresh timer will count the number of f
DAC_CLK
cycles programmed in RE-
FRESHPERIOD before wrapping and generating a conversion trigger.
23.3.11 Clock Prescaling
The VDAC has an internal clock prescaler, which can divide the input clock by any factor between 1 and 128, by setting the PRESC
field in VDACn_CTRL. The resulting DAC_CLK is used by the converter core and the frequency is given by
f
DAC_CLK
= f
IN_CLK
/ (PRESC + 1)
Figure 23.4. VDAC Clock Prescaling
where f
IN_CLK
is the input clock frequency. The f
DAC_CLK
must be programmed to be at most 1 MHz. When the DACCLKMODE is set to
SYNC, the input clock frequency is f
HFPERCLK
. When DACCLKMODE is set to ASYNC, an internal 12Mhz oscillator is used. In this
mode it is required that the PRESC field be program to 11 or higher.
The prescaler runs continuously when either of the channels are enabled. When running with a prescaler setting higher than 0, there
will be an unpredictable delay from the time the conversion was triggered to the time the actual conversion takes place. This is because
the conversions are controlled by the prescaled clock and the conversion can arrive at any time during a prescaled clock (DAC_CLK)
period. A second reason for unpredictable delay between a trigger and the associated conversion is that the activity on one channel can
impact whether the VDAC reference is warm or not and therefore it can impact whether warmup is required when using the other chan-
nel. The uncertainty related to the clock prescaler can be addressed by using CH0PRESCRST. If the CH0PRESCRST bit in
VDACn_CTRL is set, the prescaler will be reset every time a conversion is triggered on channel 0. This leads to a predictable latency
between channel 0 trigger and conversion (assuming the warmup sequence is deterministic as well). If channel 0 is used in continuous
mode, the warmup sequence will only apply to its first conversion and software can use the CH0WARM status bit to determine if the
VDAC has warmed up.
23.3.12 High Speed
The VDAC is able to do conversions up to 400 ksamples/s. In order to reach the maximum conversion rate it is recommended to config-
ure the VDAC in the following way:
1. Make f
DAC_CLK
1 Mhz
2. Set TRIGMODE to SW
3. Program SETTLETIME in OPAx_TIMER to 0
Reference Manual
VDAC - Digital to Analog Converter
silabs.com
| Building a more connected world.
Rev. 1.1 | 759