Skip to content
Snippets Groups Projects
Unverified Commit 859ba1a7 authored by ZetaR60's avatar ZetaR60 Committed by GitHub
Browse files

Merge pull request #10699 from MrKevinWeiss/pr/fixbaudmega2560

cpu/atmega_common/uart: Comment why brr calc is different from datasheet
parents 242bb55c 3ce03df0
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment