boards: arm: stm32f3_disco: add ADC support

Add support of ADC

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This commit is contained in:
Alexandre Bourdiol 2020-07-21 14:11:15 +02:00 committed by Kumar Gala
parent 7a3670efa3
commit d624db7c03
5 changed files with 12 additions and 1 deletions

View file

@ -100,7 +100,8 @@ features:
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
| ADC | on-chip | adc |
+-----------+------------+-------------------------------------+
Other hardware features are not yet supported on Zephyr porting.
@ -152,6 +153,7 @@ Default Zephyr Peripheral Mapping:
- LD9 : PE12
- LD10 : PE13
- PWM : PA8
- ADC1 : PA0
System Clock
============

View file

@ -57,6 +57,9 @@ static const struct pin_config pinconf[] = {
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) && CONFIG_PWM
{ STM32_PIN_PA8, STM32F3_PINMUX_FUNC_PA8_PWM1_CH1},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) && CONFIG_ADC
{STM32_PIN_PA0, STM32F3_PINMUX_FUNC_PA0_ADC1_IN1},
#endif
};
static int pinmux_stm32_init(const struct device *port)

View file

@ -152,3 +152,7 @@
status = "okay";
};
};
&adc1 {
status = "okay";
};

View file

@ -18,3 +18,4 @@ supported:
- nvs
- can
- pwm
- adc

View file

@ -146,6 +146,7 @@
#elif defined(CONFIG_BOARD_NUCLEO_F091RC) || \
defined(CONFIG_BOARD_NUCLEO_F103RB) || \
defined(CONFIG_BOARD_NUCLEO_F207ZG) || \
defined(CONFIG_BOARD_STM32F3_DISCO) || \
defined(CONFIG_BOARD_NUCLEO_F401RE) || \
defined(CONFIG_BOARD_NUCLEO_F429ZI) || \
defined(CONFIG_BOARD_NUCLEO_F746ZG) || \