From bc03bf39146729f2007cf6840f2a4c908f69aa77 Mon Sep 17 00:00:00 2001 From: chemicstry Date: Fri, 23 Sep 2022 01:25:07 +0300 Subject: [PATCH] Fix DMA channels for L4 DAC --- stm32data/__main__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stm32data/__main__.py b/stm32data/__main__.py index 330800a..f89988e 100755 --- a/stm32data/__main__.py +++ b/stm32data/__main__.py @@ -839,7 +839,13 @@ def parse_chips(): for p in peris: chs = [] for dma in chip_dmas: - if peri_chs := dma_channels[dma]['peripherals'].get(p['name']): + peri_chs = dma_channels[dma]['peripherals'].get(p['name']) + + # DAC1 is sometimes interchanged with DAC + if not peri_chs and p['name'] == "DAC1": + peri_chs = dma_channels[dma]['peripherals'].get("DAC") + + if peri_chs: chs.extend([ ch for ch in peri_chs