From 5236cc5721421da1a1056705fa9a72b50d6cbea1 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Jun 2022 19:03:52 +0800 Subject: [PATCH] Revert "Merge pull request #15286 from pilotak/master" This reverts commit 1ab98dec9ab4d07433d6eaec84cc4049a4a7b56b, reversing changes made to 15d1b9396ad10f303a235b653eaf5d2a1b37e5a5. --- targets/TARGET_STM/serial_api.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/targets/TARGET_STM/serial_api.c b/targets/TARGET_STM/serial_api.c index b7ce63f546e..c805669331e 100644 --- a/targets/TARGET_STM/serial_api.c +++ b/targets/TARGET_STM/serial_api.c @@ -629,12 +629,8 @@ HAL_StatusTypeDef init_uart(serial_t *obj) #if defined(UART_ONE_BIT_SAMPLE_DISABLE) // F0/F3/F7/G0/H7/L0/L4/L5/WB huart->Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; #endif -#if defined(UART_PRESCALER_DIV1) // G0/G4/H7/L4/L5/U5/WB/WL - if (obj_s->baudrate < 4800) { - huart->Init.ClockPrescaler = UART_PRESCALER_DIV16; - } else { - huart->Init.ClockPrescaler = UART_PRESCALER_DIV1; - } +#if defined(UART_PRESCALER_DIV1) // G0/H7/L4/L5/WB + huart->Init.ClockPrescaler = UART_PRESCALER_DIV1; #endif #if defined(UART_ADVFEATURE_NO_INIT) // F0/F3/F7/G0/H7/L0/L4//5/WB huart->AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;