mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 18:13: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);
|
_dac_init_clock(line);
|
||||||
|
|
||||||
/* Settings can only be changed when DAC is disabled, reset config */
|
/* Settings can only be changed when DAC is disabled */
|
||||||
DAC->CTRLA.reg = DAC_CTRLA_SWRST;
|
DAC->CTRLA.reg &= ~DAC_CTRLA_ENABLE;
|
||||||
_sync();
|
_sync();
|
||||||
|
|
||||||
#ifdef DAC_DACCTRL_ENABLE
|
#ifdef DAC_DACCTRL_ENABLE
|
||||||
@ -126,7 +126,7 @@ int8_t dac_init(dac_t line)
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
DAC->CTRLA.reg = DAC_CTRLA_ENABLE;
|
DAC->CTRLA.reg |= DAC_CTRLA_ENABLE;
|
||||||
_sync();
|
_sync();
|
||||||
|
|
||||||
#ifdef DAC_STATUS_READY
|
#ifdef DAC_STATUS_READY
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user