mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-15 19:34:03 +00:00
fix(esp_system): fix uart clock disabled in driver cause esp_restart stuck
This commit is contained in:
@@ -31,8 +31,11 @@
|
||||
void IRAM_ATTR esp_system_reset_modules_on_exit(void)
|
||||
{
|
||||
// Flush any data left in UART FIFOs before reset the UART peripheral
|
||||
esp_rom_uart_tx_wait_idle(0);
|
||||
esp_rom_uart_tx_wait_idle(1);
|
||||
for (int i = 0; i < SOC_UART_HP_NUM; ++i) {
|
||||
if (uart_ll_is_enabled(i)) {
|
||||
esp_rom_uart_tx_wait_idle(i);
|
||||
}
|
||||
}
|
||||
|
||||
modem_syscon_ll_reset_all(&MODEM_SYSCON);
|
||||
modem_lpcon_ll_reset_all(&MODEM_LPCON);
|
||||
|
||||
Reference in New Issue
Block a user