From e9375dbfd25be9e5c7a49dd90dd9c08cbefa245b Mon Sep 17 00:00:00 2001 From: Federico Ruiz Ugalde Date: Wed, 26 Jun 2013 08:06:40 -0600 Subject: [PATCH] usart set baudrate clock source incorrect. Now fixed. --- lib/stm32/common/usart_common_all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/stm32/common/usart_common_all.c b/lib/stm32/common/usart_common_all.c index b413537e..354909de 100644 --- a/lib/stm32/common/usart_common_all.c +++ b/lib/stm32/common/usart_common_all.c @@ -65,11 +65,11 @@ void usart_set_baudrate(uint32_t usart, uint32_t baud) if (usart == USART1) { /* usart1 can be clocked from appart from pclk1 also from sysclk, hsi and lse. Please improve! */ - clock = rcc_ppre1_frequency; + clock = rcc_ppre2_frequency; } else { /*There are from usart1 to usart5 interfaces in the stm32f3*/ - clock = rcc_ppre2_frequency; + clock = rcc_ppre1_frequency; } #endif