mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
Merge pull request #10699 from MrKevinWeiss/pr/fixbaudmega2560
cpu/atmega_common/uart: Comment why brr calc is different from datasheet
This commit is contained in:
commit
859ba1a71f
@ -97,6 +97,7 @@ static void _set_brr(uart_t uart, uint32_t baudrate)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
/* brr calculation is different from the datasheet to provide better rounding */
|
||||
#if defined(UART_DOUBLE_SPEED)
|
||||
brr = (CLOCK_CORECLOCK + 4UL * baudrate) / (8UL * baudrate) - 1UL;
|
||||
_update_brr(uart, brr, true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user