I've created an ATMEL Start project for the SAMD21. The clock chain is:
XOSC32K => (32KHz) => GCLK3 => (32KHz) => DFLL => (48MHz) => GCLK0 => (12MHz) => CPU and SERCOM:
This works, but on startup, the first string printed out by the SERCOM is gibberish -- thereafter it's fine. My guess is that the DFLL takes a while to stabilize. (Although, FWIW, when I've been running in the debugger and quit the debugger, the first string prints out without error.)
If that's the case, what's the approved technique for waiting for it to stabilize? Or -- if there's some other cause -- what's a good remedy?