usart set baudrate clock source incorrect. Now fixed.

This commit is contained in:
Federico Ruiz Ugalde 2013-06-26 08:06:40 -06:00 committed by Piotr Esden-Tempski
parent 119473f3b1
commit e9375dbfd2
1 changed files with 2 additions and 2 deletions

View File

@ -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