Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 642be1c

Browse filesBrowse files
committed
Improved baud rate settings formula
1 parent e7a0b8a commit 642be1c
Copy full SHA for 642be1c

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎cores/arduino/UART.cpp

Copy file name to clipboardExpand all lines: cores/arduino/UART.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void UartClass::begin(unsigned long baud, uint16_t config)
197197

198198
int8_t sigrow_val = SIGROW.OSC16ERR5V;
199199
baud_setting *= (1024 + sigrow_val);
200-
baud_setting /= 1024;
200+
baud_setting /= (1024 - sigrow_val);
201201

202202
// assign the baud_setting, a.k.a. BAUD (USART Baud Rate Register)
203203
(*_hwserial_module).BAUD = (int16_t) baud_setting;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.