It seems like number of EXTI lines in the registry for STM32F303x8 is incorrect.
EXTI line 33 is connected to Comparator 7 output (STM32F303xB/C/D/E,
STM32F358xC and STM32F398xE devices)
GCC Error:
Code: Select all
Compiling stm32_dma.c
../ChibiOS/os/hal/ports/STM32/STM32F3xx/hal_ext_lld_isr.c: In function 'ext_lld_exti_irq_enable':
../ChibiOS/os/hal/ports/STM32/STM32F3xx/hal_ext_lld_isr.c:425:20: error: 'COMP7_IRQn' undeclared (first use in this function)
nvicEnableVector(COMP7_IRQn, STM32_EXT_EXTI33_IRQ_PRIORITY);
^~~~~~~~~~
../ChibiOS/os/hal/ports/STM32/STM32F3xx/hal_ext_lld_isr.c:425:20: note: each undeclared identifier is reported only once for each function it appears in
../ChibiOS/os/hal/ports/STM32/STM32F3xx/hal_ext_lld_isr.c: In function 'ext_lld_exti_irq_disable':
../ChibiOS/os/hal/ports/STM32/STM32F3xx/hal_ext_lld_isr.c:453:21: error: 'COMP7_IRQn' undeclared (first use in this function)
nvicDisableVector(COMP7_IRQn);
Fix:
Code: Select all
diff --git a/os/hal/ports/STM32/STM32F3xx/stm32_registry.h b/os/hal/ports/STM32/STM32F3xx/stm32_registry.h
index e1bf383..a15d959 100644
--- a/os/hal/ports/STM32/STM32F3xx/stm32_registry.h
+++ b/os/hal/ports/STM32/STM32F3xx/stm32_registry.h
@@ -649,7 +649,7 @@
#define STM32_HAS_ETH FALSE
/* EXTI attributes.*/
-#define STM32_EXTI_NUM_LINES 34
+#define STM32_EXTI_NUM_LINES 33
#define STM32_EXTI_IMR_MASK 0x1F800000U
#define STM32_EXTI_IMR2_MASK 0xFFFFFFFCU