From 8a5bf3c23058bb231dfd66d0eac001258783cdf8 Mon Sep 17 00:00:00 2001 From: Sergei Ustinov Date: Thu, 7 Apr 2016 08:56:02 -0600 Subject: [PATCH] STM32 DAC output buffers correct enable. --- arch/arm/src/stm32/chip/stm32_dac.h | 3 ++- arch/arm/src/stm32/stm32_dac.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/stm32/chip/stm32_dac.h b/arch/arm/src/stm32/chip/stm32_dac.h index 8669421fa4..1eadecb894 100644 --- a/arch/arm/src/stm32/chip/stm32_dac.h +++ b/arch/arm/src/stm32/chip/stm32_dac.h @@ -87,7 +87,8 @@ /* These definitions may be used for 16-bit values of either channel */ #define DAC_CR_EN (1 << 0) /* Bit 0: DAC channel enable */ -#define DAC_CR_BOFF (1 << 1) /* Bit 1: DAC channel output buffer disable */ +#define DAC_CR_BOFF (1 << 1) /* Bit 1: 1=DAC channel output buffer disable */ +#define DAC_CR_BOFF_EN (0 << 1) /* Bit 1: 0=DAC channel output buffer enable */ #define DAC_CR_TEN (1 << 2) /* Bit 2: DAC channel trigger enable */ #define DAC_CR_TSEL_SHIFT (3) /* Bits 3-5: DAC channel trigger selection */ #define DAC_CR_TSEL_MASK (7 << DAC_CR_TSEL_SHIFT) diff --git a/arch/arm/src/stm32/stm32_dac.c b/arch/arm/src/stm32/stm32_dac.c index b6fb31bdcd..77213af264 100644 --- a/arch/arm/src/stm32/stm32_dac.c +++ b/arch/arm/src/stm32/stm32_dac.c @@ -999,7 +999,7 @@ static int dac_chaninit(FAR struct stm32_chan_s *chan) chan->tsel | /* Set trigger source (SW or timer TRGO event) */ DAC_CR_MAMP_AMP1 | /* Set waveform characteristics */ DAC_CR_WAVE_DISABLED | /* Set no noise */ - DAC_CR_BOFF; /* Enable output buffer */ + DAC_CR_BOFF_EN; /* Enable output buffer */ stm32_dac_modify_cr(chan, clearbits, setbits); #ifdef HAVE_DMA