8000 atmel-samd: Reset the DAC on soft reset. Fixes #80. · pcurry/circuitpython@dad33e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit dad33e6

Browse files
committed
atmel-samd: Reset the DAC on soft reset. Fixes adafruit#80.
1 parent f74e477 commit dad33e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

atmel-samd/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ void reset_samd21(void) {
161161

162162
analogin_reset();
163163

164+
// Wait for the DAC to sync.
165+
while (DAC->STATUS.reg & DAC_STATUS_SYNCBUSY< 53ED /span>) {}
166+
DAC->CTRLA.reg |= DAC_CTRLA_SWRST;
167+
164168
struct system_pinmux_config config;
165169
system_pinmux_get_config_defaults(&config);
166170
config.powersave = true;

0 commit comments

Comments
 (0)
0