From e5e7e26d05f58f5e2d66dcd2f9e2d7338237c7cd Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Thu, 6 Jan 2022 16:30:33 +0100 Subject: [PATCH] Fix duplicated irqn in stm32f100 --- stm32data/__main__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stm32data/__main__.py b/stm32data/__main__.py index 3fdc17c..b283223 100755 --- a/stm32data/__main__.py +++ b/stm32data/__main__.py @@ -617,6 +617,11 @@ def parse_chips(): interrupts = h['interrupts'][core_name] defines = h['defines'][core_name] + # F100xE MISC_REMAP remaps some DMA IRQs, so ST decided to give two names + # to the same IRQ number. + if chip_name.startswith('STM32F100') and 'DMA2_Channel4_5' in interrupts: + del interrupts['DMA2_Channel4_5'] + core['interrupts'] = interrupts peri_kinds = {} @@ -1173,6 +1178,12 @@ def parse_interrupts(): value = irq['@Value'] parts = value.split(':') irq_name = removesuffix(parts[0], "_IRQn") + + # F100xE MISC_REMAP remaps some DMA IRQs, so ST decided to give two names + # to the same IRQ number. + if ff == 'STM32F100E' and irq_name == 'DMA2_Channel4_5': + continue + peri_names = parts[2].split(',') if len(peri_names) == 1 and peri_names[0] == '': continue