Skip to content

Commit 7f07074

Browse files
committed
drivers: adc: stm32: dma support
Sampling multiple adc channels at once using dma Only verified to be working on nucleo_h743zi Signed-off-by: Hein Wessels <[email protected]>
1 parent f76bfa5 commit 7f07074

File tree

2 files changed

+253
-7
lines changed

2 files changed

+253
-7
lines changed

drivers/adc/Kconfig.stm32

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Copyright (c) 2019 Endre Karlson
55
# Copyright (c) 2019 Song Qiang <[email protected]>
66
# Copyright (c) 2021 Marius Scholtz, RIC Electronics
7+
# Copyright (c) 2022 Hein Wessels, Nobleo Technology
78
# SPDX-License-Identifier: Apache-2.0
89

910
config ADC_STM32
@@ -13,12 +14,24 @@ config ADC_STM32
1314
help
1415
Enable the driver implementation for the stm32xx ADC
1516

17+
if ADC_STM32
18+
19+
config ADC_STM32_DMA
20+
bool "STM32 MCU ADC DMA Support"
21+
select DMA
22+
help
23+
Enable the ADC DMA mode for ADC instances
24+
that enable dma channels in their device tree node.
25+
1626
if SOC_SERIES_STM32F2X || SOC_SERIES_STM32F4X || SOC_SERIES_STM32F7X || SOC_SERIES_STM32G4X
1727

1828
config ADC_STM32_SHARED_IRQS
1929
bool "STM32 ADC shared interrupts"
2030
default y
21-
depends on ADC_STM32
31+
depends on ADC_STM32 && !ADC_STM32_DMA
2232
help
2333
Enable the use of shared interrupts for families that only have a single interrupt for all ADC's
34+
35+
endif
36+
2437
endif

0 commit comments

Comments
 (0)