Default DAC clock rate
I'll figure out how to make sure that the DAC clock is 12 MHz.
The Adafruit SAMD51 board package apparently has already configured this for 12 MHz. So, it does seem strange that they're also using CC100K. In short they are taking the 48 MHz DPLL and dividing that by 4. There doesn't appear to be any further division of the clock, besides the by-12 division for TCONV.
But if you don't want to take my word for it, here's code to dump relevant clock configuration information (most of these names come from the samd51 CMSIS component/gclk.h:
auto &S = Serial; //to shorten code block
//
// Constants
//
S.print("DAC_GCLK_ID : ");
S.println(DAC_GCLK_ID, DEC);
S.print("GCLK_GENCTRL_SRC_DFLL_Val: ");
S.println(GCLK_GENCTRL_SRC_DFLL_Val, DEC);
S.println();
//
// Relevant PCHCTRL
//
const auto &p/*chctrl*/ = GCLK->PCHCTRL[DAC_GCLK_ID];
S.print("<pchctrl>.bit.CHEN : "); S.println(p.bit.CHEN , DEC);
S.print("<pchctrl>.bit.GEN : "); S.println(p.bit.GEN , DEC);
S.println();
//
// Relevant GENCTRL
//
const auto &g/*enctrl*/ = GCLK->GENCTRL[p.bit.GEN];
S.print("<genctrl>.bit.GENEN : "); S.println(g.bit.GENEN , DEC);
S.print("<genctrl>.bit.SRC : "); S.println(g.bit.SRC , DEC);
S.print("<genctrl>.bit.DIVSEL: "); S.println(g.bit.DIVSEL, DEC);
S.print("<genctrl>.bit.DIV : "); S.println(g.bit.DIV , DEC);
S.println();
Annotated output:
DAC_GCLK_ID : 42
GCLK_GENCTRL_SRC_DFLL_Val: 6 // 48 MHz DPLL GENCLK SRC VALUE
<pchctrl>.bit.CHEN : 1 // DAC peripheral clock is enabled
<pchctrl>.bit.GEN : 4 // is connected to general clock index 4
<genctrl>.bit.GENEN : 1 // general clock is enabled
<genctrl>.bit.SRC : 6 // (GCLK_GENCTRL_SRC_DFLL_Val) is derived from 48Mhz DPLL
<genctrl>.bit.DIVSEL: 0 // interpret .DIV below as simple division
<genctrl>.bit.DIV : 4 // divide by 4; 48 Mhz / 4 == 12 MHz.
Now, you could go further and prove to yourself that the 48 MHz PLL is really running at 48 MHz... I suppose. But, it's not going to be running faster. An I'll just tell you flatly that it is being used to derive timing for the USB peripheral and is necessarily 48 MHz. But if you want to prove that you can use the same techniques.
