diff options
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/STM32/STM32F30x/adc_lld.h | 8 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F30x/ext_lld_isr.c | 4 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F30x/stm32_registry.h | 6 |
3 files changed, 15 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/STM32F30x/adc_lld.h b/os/hal/ports/STM32/STM32F30x/adc_lld.h index a720f02bb..bc8a7c25b 100644 --- a/os/hal/ports/STM32/STM32F30x/adc_lld.h +++ b/os/hal/ports/STM32/STM32F30x/adc_lld.h @@ -248,10 +248,18 @@ #error "ADC1 not present in the selected device"
#endif
+#if STM32_ADC_DUAL_MODE && STM32_ADC_USE_ADC1 && !STM32_HAS_ADC2
+#error "ADC2 not present in the selected device"
+#endif
+
#if STM32_ADC_USE_ADC3 && !STM32_HAS_ADC3
#error "ADC3 not present in the selected device"
#endif
+#if STM32_ADC_DUAL_MODE && STM32_ADC_USE_ADC2 && !STM32_HAS_ADC4
+#error "ADC4 not present in the selected device"
+#endif
+
#if !STM32_ADC_USE_ADC1 && !STM32_ADC_USE_ADC3
#error "ADC driver activated but no ADC peripheral assigned"
#endif
diff --git a/os/hal/ports/STM32/STM32F30x/ext_lld_isr.c b/os/hal/ports/STM32/STM32F30x/ext_lld_isr.c index affe82900..b16158d8b 100644 --- a/os/hal/ports/STM32/STM32F30x/ext_lld_isr.c +++ b/os/hal/ports/STM32/STM32F30x/ext_lld_isr.c @@ -370,7 +370,9 @@ void ext_lld_exti_irq_enable(void) { nvicEnableVector(RTC_WKUP_IRQn, STM32_EXT_EXTI20_IRQ_PRIORITY);
nvicEnableVector(COMP1_2_3_IRQn, STM32_EXT_EXTI21_22_29_IRQ_PRIORITY);
nvicEnableVector(COMP4_5_6_IRQn, STM32_EXT_EXTI30_32_IRQ_PRIORITY);
+#if STM32_EXTI_NUM_CHANNELS >= 34
nvicEnableVector(COMP7_IRQn, STM32_EXT_EXTI33_IRQ_PRIORITY);
+#endif
}
/**
@@ -394,7 +396,9 @@ void ext_lld_exti_irq_disable(void) { nvicDisableVector(RTC_WKUP_IRQn);
nvicDisableVector(COMP1_2_3_IRQn);
nvicDisableVector(COMP4_5_6_IRQn);
+#if STM32_EXTI_NUM_CHANNELS >= 34
nvicDisableVector(COMP7_IRQn);
+#endif
}
#endif /* HAL_USE_EXT */
diff --git a/os/hal/ports/STM32/STM32F30x/stm32_registry.h b/os/hal/ports/STM32/STM32F30x/stm32_registry.h index 9ba44a970..a3844eadb 100644 --- a/os/hal/ports/STM32/STM32F30x/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F30x/stm32_registry.h @@ -65,7 +65,7 @@ #define STM32_HAS_ETH FALSE
/* EXTI attributes.*/
-#define STM32_EXTI_NUM_CHANNELS 36
+#define STM32_EXTI_NUM_CHANNELS 34
/* GPIO attributes.*/
#define STM32_HAS_GPIOA TRUE
@@ -687,7 +687,7 @@ #define STM32_HAS_ETH FALSE
/* EXTI attributes.*/
-#define STM32_EXTI_NUM_CHANNELS 36
+#define STM32_EXTI_NUM_CHANNELS 34
/* GPIO attributes.*/
#define STM32_HAS_GPIOA TRUE
@@ -1149,7 +1149,7 @@ #define STM32_HAS_ETH FALSE
/* EXTI attributes.*/
-#define STM32_EXTI_NUM_CHANNELS 36
+#define STM32_EXTI_NUM_CHANNELS 34
/* GPIO attributes.*/
#define STM32_HAS_GPIOA TRUE
|