Fix MCK in usart, our MCK is 16*12/2/2

This commit is contained in:
Philippe Teuwen committed 2019-05-16 20:12:00 +02:00
1 parent 362d7b6956
commit e9eb764358
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -225,7 +225,7 @@ void usart_init(uint32_t baudrate, uint8_t parity) {
// note that for very large baudrates, error is not neglectible:
// b921600 => 8.6%
// b1382400 => 8.6%
pUS1->US_BRGR = 48054841 / (usart_baudrate << 3);
pUS1->US_BRGR = 48000000 / (usart_baudrate << 3);
// Write the Timeguard Register
pUS1->US_TTGR = 0;