mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 01:23:49 +01:00
cpu/sam0_common/periph/dac.c: dont use DAC_CTRLA_SWRST
DAC_CTRLA_SWRST clears all registers, so it also clears the config of the first DAC line after configuring the second DAC line.
This commit is contained in:
parent
8590133fcb
commit
3c74301718
@ -110,8 +110,8 @@ int8_t dac_init(dac_t line)
|
||||
|
||||
_dac_init_clock(line);
|
||||
|
||||
/* Settings can only be changed when DAC is disabled, reset config */
|
||||
DAC->CTRLA.reg = DAC_CTRLA_SWRST;
|
||||
/* Settings can only be changed when DAC is disabled */
|
||||
DAC->CTRLA.reg &= ~DAC_CTRLA_ENABLE;
|
||||
_sync();
|
||||
|
||||
#ifdef DAC_DACCTRL_ENABLE
|
||||
@ -126,7 +126,7 @@ int8_t dac_init(dac_t line)
|
||||
#endif
|
||||
;
|
||||
|
||||
DAC->CTRLA.reg = DAC_CTRLA_ENABLE;
|
||||
DAC->CTRLA.reg |= DAC_CTRLA_ENABLE;
|
||||
_sync();
|
||||
|
||||
#ifdef DAC_STATUS_READY
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user