From 16688101115752e7fca78acbb4fec90b7d8bd2f3 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 29 Sep 2019 07:40:01 +0000 Subject: [PATCH] Updated mcuconf generator for G0. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13039 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- .../RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h | 41 ++++++++----------- .../conf/mcuconf_stm32g071xx/mcuconf.h.ftl | 39 ++++++++---------- 2 files changed, 32 insertions(+), 48 deletions(-) diff --git a/demos/STM32/RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h b/demos/STM32/RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h index 82b424f66..165f78fb0 100644 --- a/demos/STM32/RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h +++ b/demos/STM32/RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h @@ -78,29 +78,27 @@ #define STM32_RTCSEL STM32_RTCSEL_NOCLOCK /* - * IRQ settings. + * Shared IRQ settings. */ #define STM32_IRQ_EXTI0_1_PRIORITY 2 #define STM32_IRQ_EXTI2_3_PRIORITY 2 #define STM32_IRQ_EXTI4_15_PRIORITY 2 -#define STM32_IRQ_EXTI16_PRIORITY 2 -#define STM32_IRQ_EXTI17_18_PRIORITY 2 - -#define STM32_IRQ_TIM1_UP_PRIORITY 3 -#define STM32_IRQ_TIM1_CC_PRIORITY 3 -#define STM32_IRQ_TIM2_PRIORITY 3 -#define STM32_IRQ_TIM3_PRIORITY 3 -#define STM32_IRQ_TIM6_PRIORITY 3 -#define STM32_IRQ_TIM7_PRIORITY 3 -#define STM32_IRQ_TIM14_PRIORITY 3 -#define STM32_IRQ_TIM15_PRIORITY 3 -#define STM32_IRQ_TIM16_PRIORITY 3 -#define STM32_IRQ_TIM17_PRIORITY 3 #define STM32_IRQ_USART1_PRIORITY 2 #define STM32_IRQ_USART2_PRIORITY 2 #define STM32_IRQ_USART3_USART4_LPUART1_PRIORITY 2 +#define STM32_IRQ_TIM1_UP_PRIORITY 1 +#define STM32_IRQ_TIM1_CC_PRIORITY 1 +#define STM32_IRQ_TIM2_PRIORITY 1 +#define STM32_IRQ_TIM3_PRIORITY 1 +#define STM32_IRQ_TIM6_PRIORITY 1 +#define STM32_IRQ_TIM7_PRIORITY 1 +#define STM32_IRQ_TIM14_PRIORITY 1 +#define STM32_IRQ_TIM15_PRIORITY 1 +#define STM32_IRQ_TIM16_PRIORITY 1 +#define STM32_IRQ_TIM17_PRIORITY 1 + /* * ADC driver system settings. */ @@ -117,11 +115,6 @@ #define STM32_GPT_USE_TIM3 FALSE #define STM32_GPT_USE_TIM6 FALSE #define STM32_GPT_USE_TIM7 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 1 -#define STM32_GPT_TIM2_IRQ_PRIORITY 1 -#define STM32_GPT_TIM3_IRQ_PRIORITY 1 -#define STM32_GPT_TIM6_IRQ_PRIORITY 1 -#define STM32_GPT_TIM7_IRQ_PRIORITY 1 /* * I2C driver system settings. @@ -133,9 +126,6 @@ #define STM32_ICU_USE_TIM1 FALSE #define STM32_ICU_USE_TIM2 FALSE #define STM32_ICU_USE_TIM3 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 1 -#define STM32_ICU_TIM2_IRQ_PRIORITY 1 -#define STM32_ICU_TIM3_IRQ_PRIORITY 1 /* * PWM driver system settings. @@ -144,9 +134,6 @@ #define STM32_PWM_USE_TIM1 FALSE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 1 -#define STM32_PWM_TIM2_IRQ_PRIORITY 1 -#define STM32_PWM_TIM3_IRQ_PRIORITY 1 /* * RTC driver system settings. @@ -205,6 +192,10 @@ #define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY #define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY #define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_UART4_DMA_PRIORITY 0 #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") /* diff --git a/tools/ftl/processors/conf/mcuconf_stm32g071xx/mcuconf.h.ftl b/tools/ftl/processors/conf/mcuconf_stm32g071xx/mcuconf.h.ftl index 422855370..31ba5bb25 100644 --- a/tools/ftl/processors/conf/mcuconf_stm32g071xx/mcuconf.h.ftl +++ b/tools/ftl/processors/conf/mcuconf_stm32g071xx/mcuconf.h.ftl @@ -94,9 +94,21 @@ #define STM32_IRQ_EXTI0_1_PRIORITY ${doc.STM32_IRQ_EXTI0_1_PRIORITY!"3"} #define STM32_IRQ_EXTI2_3_PRIORITY ${doc.STM32_IRQ_EXTI2_3_PRIORITY!"3"} #define STM32_IRQ_EXTI4_15_PRIORITY ${doc.STM32_IRQ_EXTI4_15_PRIORITY!"3"} -#define STM32_IRQ_EXTI16_PRIORITY ${doc.STM32_IRQ_EXTI16_PRIORITY!"3"} -#define STM32_IRQ_EXTI17_18_PRIORITY ${doc.STM32_IRQ_EXTI17_18_PRIORITY!"3"} -#define STM32_IRQ_USART3_4_LP1_PRIORITY ${doc.STM32_IRQ_USART3_4_LP1_PRIORITY!"3"} + +#define STM32_IRQ_USART1_PRIORITY ${doc.STM32_IRQ_USART1_PRIORITY!"2"} +#define STM32_IRQ_USART2_PRIORITY ${doc.STM32_IRQ_USART2_PRIORITY!"2"} +#define STM32_IRQ_USART3_USART4_LPUART1_PRIORITY ${doc.STM32_IRQ_USART3_USART4_LPUART1_PRIORITY!"1"} + +#define STM32_IRQ_TIM1_UP_PRIORITY ${doc.STM32_IRQ_TIM1_UP_PRIORITY!"1"} +#define STM32_IRQ_TIM1_CC_PRIORITY ${doc.STM32_IRQ_TIM1_CC_PRIORITY!"1"} +#define STM32_IRQ_TIM2_PRIORITY ${doc.STM32_IRQ_TIM2_PRIORITY!"1"} +#define STM32_IRQ_TIM3_PRIORITY ${doc.STM32_IRQ_TIM3_PRIORITY!"1"} +#define STM32_IRQ_TIM6_PRIORITY ${doc.STM32_IRQ_TIM6_PRIORITY!"1"} +#define STM32_IRQ_TIM7_PRIORITY ${doc.STM32_IRQ_TIM7_PRIORITY!"1"} +#define STM32_IRQ_TIM14_PRIORITY ${doc.STM32_IRQ_TIM14_PRIORITY!"1"} +#define STM32_IRQ_TIM15_PRIORITY ${doc.STM32_IRQ_TIM15_PRIORITY!"1"} +#define STM32_IRQ_TIM16_PRIORITY ${doc.STM32_IRQ_TIM16_PRIORITY!"1"} +#define STM32_IRQ_TIM17_PRIORITY ${doc.STM32_IRQ_TIM17_PRIORITY!"1"} /* * ADC driver system settings. @@ -114,11 +126,6 @@ #define STM32_GPT_USE_TIM3 ${doc.STM32_GPT_USE_TIM3!"FALSE"} #define STM32_GPT_USE_TIM6 ${doc.STM32_GPT_USE_TIM6!"FALSE"} #define STM32_GPT_USE_TIM7 ${doc.STM32_GPT_USE_TIM7!"FALSE"} -#define STM32_GPT_TIM1_IRQ_PRIORITY ${doc.STM32_GPT_TIM1_IRQ_PRIORITY!"1"} -#define STM32_GPT_TIM2_IRQ_PRIORITY ${doc.STM32_GPT_TIM2_IRQ_PRIORITY!"1"} -#define STM32_GPT_TIM3_IRQ_PRIORITY ${doc.STM32_GPT_TIM3_IRQ_PRIORITY!"1"} -#define STM32_GPT_TIM6_IRQ_PRIORITY ${doc.STM32_GPT_TIM6_IRQ_PRIORITY!"1"} -#define STM32_GPT_TIM7_IRQ_PRIORITY ${doc.STM32_GPT_TIM7_IRQ_PRIORITY!"1"} /* * I2C driver system settings. @@ -130,9 +137,6 @@ #define STM32_ICU_USE_TIM1 ${doc.STM32_ICU_USE_TIM1!"FALSE"} #define STM32_ICU_USE_TIM2 ${doc.STM32_ICU_USE_TIM2!"FALSE"} #define STM32_ICU_USE_TIM3 ${doc.STM32_ICU_USE_TIM3!"FALSE"} -#define STM32_ICU_TIM1_IRQ_PRIORITY ${doc.STM32_ICU_TIM1_IRQ_PRIORITY!"1"} -#define STM32_ICU_TIM2_IRQ_PRIORITY ${doc.STM32_ICU_TIM2_IRQ_PRIORITY!"1"} -#define STM32_ICU_TIM3_IRQ_PRIORITY ${doc.STM32_ICU_TIM3_IRQ_PRIORITY!"1"} /* * PWM driver system settings. @@ -141,9 +145,6 @@ #define STM32_PWM_USE_TIM1 ${doc.STM32_PWM_USE_TIM1!"FALSE"} #define STM32_PWM_USE_TIM2 ${doc.STM32_PWM_USE_TIM2!"FALSE"} #define STM32_PWM_USE_TIM3 ${doc.STM32_PWM_USE_TIM3!"FALSE"} -#define STM32_PWM_TIM1_IRQ_PRIORITY ${doc.STM32_PWM_TIM1_IRQ_PRIORITY!"1"} -#define STM32_PWM_TIM2_IRQ_PRIORITY ${doc.STM32_PWM_TIM2_IRQ_PRIORITY!"1"} -#define STM32_PWM_TIM3_IRQ_PRIORITY ${doc.STM32_PWM_TIM3_IRQ_PRIORITY!"1"} /* * RTC driver system settings. @@ -161,11 +162,6 @@ #define STM32_SERIAL_USE_USART3 ${doc.STM32_SERIAL_USE_USART3!"FALSE"} #define STM32_SERIAL_USE_UART4 ${doc.STM32_SERIAL_USE_UART4!"FALSE"} #define STM32_SERIAL_USE_LPUART1 ${doc.STM32_SERIAL_USE_LPUART1!"TRUE"} -#define STM32_SERIAL_USART1_PRIORITY ${doc.STM32_SERIAL_USART1_PRIORITY!"3"} -#define STM32_SERIAL_USART2_PRIORITY ${doc.STM32_SERIAL_USART2_PRIORITY!"3"} -#define STM32_SERIAL_USART3_PRIORITY ${doc.STM32_SERIAL_USART3_PRIORITY!"3"} -#define STM32_SERIAL_UART4_PRIORITY ${doc.STM32_SERIAL_UART4_PRIORITY!"3"} -#define STM32_SERIAL_LPUART1_PRIORITY ${doc.STM32_SERIAL_LPUART1_PRIORITY!"3"} /* * SPI driver system settings. @@ -207,13 +203,10 @@ #define STM32_UART_USART3_TX_DMA_STREAM ${doc.STM32_UART_USART3_TX_DMA_STREAM!"STM32_DMA_STREAM_ID_ANY"} #define STM32_UART_UART4_RX_DMA_STREAM ${doc.STM32_UART_UART4_RX_DMA_STREAM!"STM32_DMA_STREAM_ID_ANY"} #define STM32_UART_UART4_TX_DMA_STREAM ${doc.STM32_UART_UART4_TX_DMA_STREAM!"STM32_DMA_STREAM_ID_ANY"} -#define STM32_UART_USART1_IRQ_PRIORITY ${doc.STM32_UART_USART1_IRQ_PRIORITY!"3"} -#define STM32_UART_USART2_IRQ_PRIORITY ${doc.STM32_UART_USART2_IRQ_PRIORITY!"3"} -#define STM32_UART_USART3_IRQ_PRIORITY ${doc.STM32_UART_USART3_IRQ_PRIORITY!"3"} -#define STM32_UART_UART4_IRQ_PRIORITY ${doc.STM32_UART_UART4_IRQ_PRIORITY!"3"} #define STM32_UART_USART1_DMA_PRIORITY ${doc.STM32_UART_USART1_DMA_PRIORITY!"0"} #define STM32_UART_USART2_DMA_PRIORITY ${doc.STM32_UART_USART2_DMA_PRIORITY!"0"} #define STM32_UART_USART3_DMA_PRIORITY ${doc.STM32_UART_USART3_DMA_PRIORITY!"0"} +#define STM32_UART_UART4_DMA_PRIORITY ${doc.STM32_UART_UART4_DMA_PRIORITY!"0"} #define STM32_UART_DMA_ERROR_HOOK(uartp) ${doc.STM32_UART_DMA_ERROR_HOOK!"osalSysHalt(\"DMA failure\")"} /*