summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--atmel-samd/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/atmel-samd/main.c b/atmel-samd/main.c
index e224f1add..336b08b57 100644
--- a/atmel-samd/main.c
+++ b/atmel-samd/main.c
@@ -161,6 +161,10 @@ void reset_samd21(void) {
analogin_reset();
+ // Wait for the DAC to sync.
+ while (DAC->STATUS.reg & DAC_STATUS_SYNCBUSY) {}
+ DAC->CTRLA.reg |= DAC_CTRLA_SWRST;
+
struct system_pinmux_config config;
system_pinmux_get_config_defaults(&config);
config.powersave = true;