Skip to content

Commit cf178a0

Browse files
committed
drivers: adc: stm32: Take into account "stream offset" in dma config
Depending on the series in use dma_config should take into account a stream offset for the channel in use. Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
1 parent 87917a1 commit cf178a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/adc/adc_stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ static int adc_stm32_dma_start(const struct device *dev,
249249
dma->dma_cfg.head_block = blk_cfg;
250250
dma->dma_cfg.user_data = data;
251251

252-
ret = dma_config(data->dma.dma_dev, data->dma.channel,
252+
ret = dma_config(data->dma.dma_dev, data->dma.channel + STM32_DMA_STREAM_OFFSET,
253253
&dma->dma_cfg);
254254
if (ret != 0) {
255255
LOG_ERR("Problem setting up DMA: %d", ret);

0 commit comments

Comments
 (0)