atmel-samd: Reset the DAC on soft reset. Fixes #80.

This commit is contained in:
Scott Shawcroft 2017-01-19 11:42:33 -08:00
parent f74e477966
commit dad33e6ad0
1 changed files with 4 additions and 0 deletions

View File

@ -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;