Skip to content

Commit b752822

Browse files
ficetoficeto
ficeto
authored and
ficeto
committed
fix UART clock divider
UART clock is constant
1 parent 735277f commit b752822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/HardwareSerial.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void ICACHE_FLASH_ATTR uart_set_baudrate(uart_t* uart, int baud_rate) {
269269
if(uart == 0)
270270
return;
271271
uart->baud_rate = baud_rate;
272-
USD(uart->uart_nr) = (F_CPU / uart->baud_rate);
272+
USD(uart->uart_nr) = (80000000UL / uart->baud_rate);
273273
}
274274

275275
int ICACHE_FLASH_ATTR uart_get_baudrate(uart_t* uart) {

0 commit comments

Comments
 (0)