mirror of https://github.com/ARMmbed/mbed-os.git
[STM32F4][V1.12.0] SystemCoreClock update
With ARM and uARM toolchains, SystemCoreClock is reset before UART init by libc. Fix to perform SystemCoreClock init with UART init out of HAL init.pull/1838/head
parent
a9b27da409
commit
2afce67e5c
|
|
@ -182,6 +182,10 @@ static void init_uart(serial_t *obj, UARTName instance)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* uAMR & ARM: Call to UART init is done between reset of pre-initialized variables */
|
||||
/* and before HAL Init. SystemCoreClock init required here */
|
||||
SystemCoreClockUpdate();
|
||||
|
||||
if (HAL_UART_Init(handle) != HAL_OK) {
|
||||
error("Cannot initialize UART\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue