From fac10b6ebdec6d98f8b833137153ec43e71d706d Mon Sep 17 00:00:00 2001 From: "lp.xiao" Date: Sun, 27 Feb 2022 11:24:46 +0800 Subject: [PATCH] stm32f103re has a dac module.but the pinmap file has no corresponding definition --- arch/arm/src/stm32/hardware/stm32f103r_pinmap.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/src/stm32/hardware/stm32f103r_pinmap.h b/arch/arm/src/stm32/hardware/stm32f103r_pinmap.h index a8431c16a1..9343b1b86d 100644 --- a/arch/arm/src/stm32/hardware/stm32f103r_pinmap.h +++ b/arch/arm/src/stm32/hardware/stm32f103r_pinmap.h @@ -57,6 +57,15 @@ #define GPIO_ADC12_IN14 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN4) #define GPIO_ADC12_IN15 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN5) +/* DAC - "Once the DAC channelx is enabled, the corresponding GPIO pin + * (PA4 or PA5) is automatically connected to the analog converter output + * (DAC_OUTx). In order to avoid parasitic consumption, the PA4 or PA5 pin + * should first be configured to analog (AIN)." + */ + +#define GPIO_DAC1_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) +#define GPIO_DAC1_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) + /* TIMERS */ #if defined(CONFIG_STM32_TIM1_FULL_REMAP)