We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe2b7e7 commit c872128Copy full SHA for c872128
cores/arduino/UART.cpp
@@ -142,7 +142,7 @@ void UartClass::begin(unsigned long baud, uint16_t config)
142
uint8_t oldSREG = SREG;
143
cli();
144
145
- baud_setting = (((8 * F_CPU_CORRECTED) / baud) ) / 2;
+ baud_setting = (((8 * F_CPU_CORRECTED) / baud) + 1) / 2;
146
// Disable CLK2X
147
(*_hwserial_module).CTRLB &= (~USART_RXMODE_CLK2X_gc);
148
(*_hwserial_module).CTRLB |= USART_RXMODE_NORMAL_gc;
0 commit comments