mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
stm32f0: fix UART clock source for console on UART2
Bug fix. Recently changed to use HSI 8MHz clock as clock source for console UART, but the clock register was set incorrectly for the case that the console UART is UART2. BUG=chrome-os-partner:32170 BRANCH=none TEST=Tested on fruitpie which is using UART2 for console. Verified that console works. Change-Id: Ied629eb3828e5fab911acb6a8e5f4087563ddb32 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/219312 Reviewed-by: Vic Yang <victoryang@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
3bfb7ee2a1
commit
33fe8c5b5f
@@ -238,9 +238,9 @@ void uart_init(void)
|
||||
/* Enable USART clock */
|
||||
#ifdef CHIP_FAMILY_STM32F0
|
||||
#if (UARTN == 1)
|
||||
STM32_RCC_CFGR3 |= 0x0003; /* USART1 clock source from HSI(8MHz) */
|
||||
STM32_RCC_CFGR3 |= 0x0003; /* USART1 clock source from HSI(8MHz) */
|
||||
#elif (UARTN == 2)
|
||||
STM32_RCC_CFGR3 |= 0x0300; /* USART2 clock source from HSI(8MHz) */
|
||||
STM32_RCC_CFGR3 |= 0x030000; /* USART2 clock source from HSI(8MHz) */
|
||||
#endif /* UARTN */
|
||||
#endif /* CHIP_FAMILY_STM32F0 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user