drivers: serial: use the right clock busses for STM32F0 series UARTs
STM32F0 Series uses different clock busses for UARTs than other STM32FX Series. fixes #5406 Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
This commit is contained in:
parent
47c747e954
commit
1f66015f73
1 changed files with 40 additions and 0 deletions
|
@ -363,6 +363,45 @@ DEVICE_AND_API_INIT(uart_stm32_##n, CONFIG_UART_STM32_PORT_##n##_NAME, \
|
|||
\
|
||||
STM32_UART_IRQ_HANDLER(n)
|
||||
|
||||
/* STM32F0 Series differs from other STM32FX series in regard to the clock
|
||||
* busses used for USARTS and the naming of the corresponding peripheral Enable
|
||||
* bitmasks.
|
||||
*/
|
||||
#ifdef CONFIG_SOC_SERIES_STM32F0X
|
||||
#ifdef CONFIG_UART_STM32_PORT_1
|
||||
UART_DEVICE_INIT_STM32(1, STM32_CLOCK_BUS_APB1_2, LL_APB1_GRP2_PERIPH_USART1)
|
||||
#endif /* CONFIG_UART_STM32_PORT_1 */
|
||||
|
||||
#ifdef CONFIG_UART_STM32_PORT_2
|
||||
UART_DEVICE_INIT_STM32(2, STM32_CLOCK_BUS_APB1, LL_APB1_GRP1_PERIPH_USART2)
|
||||
#endif /* CONFIG_UART_STM32_PORT_2 */
|
||||
|
||||
#ifdef CONFIG_UART_STM32_PORT_3
|
||||
UART_DEVICE_INIT_STM32(3, STM32_CLOCK_BUS_APB1, LL_APB1_GRP1_PERIPH_USART3)
|
||||
#endif /* CONFIG_UART_STM32_PORT_3 */
|
||||
|
||||
#ifdef CONFIG_UART_STM32_PORT_4
|
||||
UART_DEVICE_INIT_STM32(4, STM32_CLOCK_BUS_APB1, LL_APB1_GRP1_PERIPH_USART4)
|
||||
#endif /* CONFIG_UART_STM32_PORT_4 */
|
||||
|
||||
#ifdef CONFIG_UART_STM32_PORT_5
|
||||
UART_DEVICE_INIT_STM32(5, STM32_CLOCK_BUS_APB1, LL_APB1_GRP1_PERIPH_USART5)
|
||||
#endif /* CONFIG_UART_STM32_PORT_5 */
|
||||
|
||||
#ifdef CONFIG_UART_STM32_PORT_6
|
||||
UART_DEVICE_INIT_STM32(6, STM32_CLOCK_BUS_APB1_2, LL_APB1_GRP2_PERIPH_USART6)
|
||||
#endif /* CONFIG_UART_STM32_PORT_6 */
|
||||
|
||||
#ifdef CONFIG_UART_STM32_PORT_7
|
||||
UART_DEVICE_INIT_STM32(7, STM32_CLOCK_BUS_APB1_2, LL_APB1_GRP2_PERIPH_USART7)
|
||||
#endif /* CONFIG_UART_STM32_PORT_7 */
|
||||
|
||||
#ifdef CONFIG_UART_STM32_PORT_8
|
||||
UART_DEVICE_INIT_STM32(8, STM32_CLOCK_BUS_APB1_2, LL_APB1_GRP2_PERIPH_USART8)
|
||||
#endif /* CONFIG_UART_STM32_PORT_8 */
|
||||
|
||||
#else /* CONFIG_SOC_SERIES_STM32F0X */
|
||||
|
||||
#ifdef CONFIG_UART_STM32_PORT_1
|
||||
UART_DEVICE_INIT_STM32(1, STM32_CLOCK_BUS_APB2, LL_APB2_GRP1_PERIPH_USART1)
|
||||
#endif /* CONFIG_UART_STM32_PORT_1 */
|
||||
|
@ -402,3 +441,4 @@ UART_DEVICE_INIT_STM32(9, STM32_CLOCK_BUS_APB2, LL_APB2_GRP1_PERIPH_UART9)
|
|||
#ifdef CONFIG_UART_STM32_PORT_10
|
||||
UART_DEVICE_INIT_STM32(10, STM32_CLOCK_BUS_APB2, LL_APB2_GRP1_PERIPH_UART10)
|
||||
#endif /* CONFIG_UART_STM32_PORT_10 */
|
||||
#endif /* CONFIG_SOC_SERIES_STM32F0X */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue