Skip to content

Commit 4024202

Browse files
committed
Fixes baudrate with CPU Freq < 80MHz
1 parent 9496629 commit 4024202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp32/esp32-hal-uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static uart_t _uart_bus_array[] = {
7373
// baudrate must be multiplied when CPU Frequency is lower than APB 80MHz
7474
uint32_t _get_effective_baudrate(uint32_t baudrate)
7575
{
76-
uint32_t Freq = getCpuFrequencyMhz();
76+
uint32_t Freq = getApbFrequency()/1000000;
7777
if (Freq < 80) {
7878
return 80 / Freq * baudrate;
7979
}

0 commit comments

Comments
 (0)