39.6.2.1 Initialization
The DAC bus clock (CLK_DAC_APB) is required to access the DAC registers. This clock can be enabled in the MCLK - Main Clock module.
A generic clock (GCLK_DAC) is required to clock the DAC. This clock must be configured and enabled in the GCLK - Generic Clock Controller before using the DAC.
The following registers are enable-protected, meaning they can only be written when the DAC is disabled (CTRLA.ENABLE is zero):
- The Control B register (CTRLB)
- The Event Control register (EVCTRL)
Enable-protection is denoted by the Enable-Protected property in the register description.
Before enabling the DAC, it must be configured by selecting the voltage reference using the Reference Selection bits in the Control B register (CTRLB.REFSEL).