From f7361859b0a8dc39b2f33d897cf4ceb2fa6ee1dd Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 3 May 2015 09:04:25 +0000 Subject: Improved DAC initialization. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7942 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32/STM32F4xx/DAC/Makefile | 2 +- .../STM32F4xx/DAC/debug/STM32F4xx-DAC (OpenOCD, Flash and Run).launch | 2 +- testhal/STM32/STM32F4xx/DAC/main.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'testhal/STM32') diff --git a/testhal/STM32/STM32F4xx/DAC/Makefile b/testhal/STM32/STM32F4xx/DAC/Makefile index 3fec9da36..2a762abc4 100644 --- a/testhal/STM32/STM32F4xx/DAC/Makefile +++ b/testhal/STM32/STM32F4xx/DAC/Makefile @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). diff --git a/testhal/STM32/STM32F4xx/DAC/debug/STM32F4xx-DAC (OpenOCD, Flash and Run).launch b/testhal/STM32/STM32F4xx/DAC/debug/STM32F4xx-DAC (OpenOCD, Flash and Run).launch index bb8c1ea60..8a1fa9311 100644 --- a/testhal/STM32/STM32F4xx/DAC/debug/STM32F4xx-DAC (OpenOCD, Flash and Run).launch +++ b/testhal/STM32/STM32F4xx/DAC/debug/STM32F4xx-DAC (OpenOCD, Flash and Run).launch @@ -33,7 +33,7 @@ - + diff --git a/testhal/STM32/STM32F4xx/DAC/main.c b/testhal/STM32/STM32F4xx/DAC/main.c index 469132559..e57d8a3f2 100644 --- a/testhal/STM32/STM32F4xx/DAC/main.c +++ b/testhal/STM32/STM32F4xx/DAC/main.c @@ -88,6 +88,7 @@ static void error_cb1(DACDriver *dacp, dacerror_t err) { } static const DACConfig dac1cfg1 = { + init: 2047U, datamode: DAC_DHRM_12BIT_RIGHT }; -- cgit v1.2.3