Skip to content

Commit e2bd93c

Browse files
committed
Fix UART0 not able to read/available
1 parent eb28213 commit e2bd93c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: cores/esp32/esp32-hal-uart.c

+3
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ uart_t* uartBegin(uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rx
197197
} else if(uart_nr == 2){
198198
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_UART2_CLK_EN);
199199
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_UART2_RST);
200+
} else {
201+
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_UART_CLK_EN);
202+
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_UART_RST);
200203
}
201204
uartFlush(uart);
202205
uartSetBaudRate(uart, baudrate);

0 commit comments

Comments
 (0)