|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
/*
|
|
|
- ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
|
|
|
|
|
|
|
+ ChibiOS - Copyright (C) 2006-2026 Giovanni Di Sirio.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
you may not use this file except in compliance with the License.
|
|
you may not use this file except in compliance with the License.
|
|
@@ -73,6 +73,8 @@
|
|
|
#define STM32_PPRE STM32_PPRE_DIV1
|
|
#define STM32_PPRE STM32_PPRE_DIV1
|
|
|
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
|
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
|
|
#define STM32_MCOPRE STM32_MCOPRE_DIV1
|
|
#define STM32_MCOPRE STM32_MCOPRE_DIV1
|
|
|
|
|
+#define STM32_MCO2SEL STM32_MCOSEL_NOCLOCK
|
|
|
|
|
+#define STM32_MCO2PRE STM32_MCOPRE_DIV1
|
|
|
#define STM32_LSCOSEL STM32_LSCOSEL_NOCLOCK
|
|
#define STM32_LSCOSEL STM32_LSCOSEL_NOCLOCK
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -107,9 +109,8 @@
|
|
|
#define STM32_IRQ_EXTI4_15_PRIORITY 3
|
|
#define STM32_IRQ_EXTI4_15_PRIORITY 3
|
|
|
#define STM32_IRQ_EXTI1921_PRIORITY 3
|
|
#define STM32_IRQ_EXTI1921_PRIORITY 3
|
|
|
|
|
|
|
|
-#define STM32_IRQ_USART1_PRIORITY 2
|
|
|
|
|
-#define STM32_IRQ_USART2_LP2_PRIORITY 2
|
|
|
|
|
-#define STM32_IRQ_USART3_4_5_6_LP1_PRIORITY 2
|
|
|
|
|
|
|
+#define STM32_IRQ_I2C1_PRIORITY 3
|
|
|
|
|
+#define STM32_IRQ_I2C2_3_PRIORITY 3
|
|
|
|
|
|
|
|
#define STM32_IRQ_TIM1_UP_PRIORITY 1
|
|
#define STM32_IRQ_TIM1_UP_PRIORITY 1
|
|
|
#define STM32_IRQ_TIM1_CC_PRIORITY 1
|
|
#define STM32_IRQ_TIM1_CC_PRIORITY 1
|
|
@@ -122,6 +123,12 @@
|
|
|
#define STM32_IRQ_TIM16_PRIORITY 1
|
|
#define STM32_IRQ_TIM16_PRIORITY 1
|
|
|
#define STM32_IRQ_TIM17_PRIORITY 1
|
|
#define STM32_IRQ_TIM17_PRIORITY 1
|
|
|
|
|
|
|
|
|
|
+#define STM32_IRQ_USART1_PRIORITY 2
|
|
|
|
|
+#define STM32_IRQ_USART2_LP2_PRIORITY 2
|
|
|
|
|
+#define STM32_IRQ_USART3_4_5_6_LP1_PRIORITY 2
|
|
|
|
|
+
|
|
|
|
|
+#define STM32_IRQ_USB1_UCPD1_2_PRIORITY 3
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
* ADC driver system settings.
|
|
* ADC driver system settings.
|
|
|
*/
|
|
*/
|
|
@@ -166,16 +173,12 @@
|
|
|
#define STM32_I2C_USE_I2C2 FALSE
|
|
#define STM32_I2C_USE_I2C2 FALSE
|
|
|
#define STM32_I2C_USE_I2C3 FALSE
|
|
#define STM32_I2C_USE_I2C3 FALSE
|
|
|
#define STM32_I2C_BUSY_TIMEOUT 50
|
|
#define STM32_I2C_BUSY_TIMEOUT 50
|
|
|
-#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
|
|
|
|
|
-#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
|
|
|
|
|
-#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
|
|
|
|
|
-#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
|
|
|
|
|
-#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
|
|
|
|
|
-#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
|
|
|
|
|
-#define STM32_I2C_I2C1_IRQ_PRIORITY 3
|
|
|
|
|
-#define STM32_I2C_I2C2_IRQ_PRIORITY 3
|
|
|
|
|
|
|
+#define STM32_I2C_I2C1_DMA_CHANNEL STM32_DMA_STREAM_ID_ANY
|
|
|
|
|
+#define STM32_I2C_I2C2_DMA_CHANNEL STM32_DMA_STREAM_ID_ANY
|
|
|
|
|
+#define STM32_I2C_I2C3_DMA_CHANNEL STM32_DMA_STREAM_ID_ANY
|
|
|
#define STM32_I2C_I2C1_DMA_PRIORITY 3
|
|
#define STM32_I2C_I2C1_DMA_PRIORITY 3
|
|
|
#define STM32_I2C_I2C2_DMA_PRIORITY 3
|
|
#define STM32_I2C_I2C2_DMA_PRIORITY 3
|
|
|
|
|
+#define STM32_I2C_I2C3_DMA_PRIORITY 1
|
|
|
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
|
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -296,7 +299,6 @@
|
|
|
* USB driver system settings.
|
|
* USB driver system settings.
|
|
|
*/
|
|
*/
|
|
|
#define STM32_USB_USE_USB1 TRUE
|
|
#define STM32_USB_USE_USB1 TRUE
|
|
|
-#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
|
|
|
|
|
#define STM32_USB_USE_ISOCHRONOUS FALSE
|
|
#define STM32_USB_USE_ISOCHRONOUS FALSE
|
|
|
#define STM32_USB_USE_FAST_COPY TRUE
|
|
#define STM32_USB_USE_FAST_COPY TRUE
|
|
|
#define STM32_USB_HOST_WAKEUP_DURATION 2
|
|
#define STM32_USB_HOST_WAKEUP_DURATION 2
|