Fix USART driver.

This commit is contained in:
NIIBE Yutaka
2019-04-24 20:22:57 +09:00
parent c818ec89a4
commit d22ffb2d07
4 changed files with 53 additions and 22 deletions

View File

@@ -48,8 +48,8 @@ clock_init (void)
while ((FLASH->ACR & 0x07) != (STM32_FLASHBITS & 0x07))
;
/* Configure bus clocks: AHB: 80MHz, APB1: 40MHz, APB2: 80MHz */
RCC->CFGR = (0x04 << 8);
/* Configure bus clocks: AHB: 80MHz, APB1: 40MHz, APB2: 40MHz */
RCC->CFGR = ((0x04 << 11) | (0x04 << 8));
/* Switch SYSCLOCK using PLL */
RCC->CFGR |= 0x03;