fix(uart): fix some wdt get triggered due to uart sclk not exist on C5

Interrupt wdt would get triggered on uart_driver_install if uart driver was deleted before
Closes https://github.com/espressif/esp-idf/issues/17779

RTC wdt would get triggered on esp_restart if uart driver was deleted before
This commit is contained in:
Song Ruo Jing
2025-11-27 11:08:48 +08:00
parent 4ad7384251
commit 1067b313c6
2 changed files with 65 additions and 20 deletions
@@ -36,8 +36,11 @@
void esp_system_reset_modules_on_exit(void)
{
// Flush any data left in UART FIFOs before reset the UART peripheral
esp_rom_output_tx_wait_idle(0);
esp_rom_output_tx_wait_idle(1);
for (int i = 0; i < SOC_UART_HP_NUM; ++i) {
if (uart_ll_is_enabled(i)) {
esp_rom_output_tx_wait_idle(i);
}
}
// TODO: IDF-8845
#if SOC_MODEM_CLOCK_SUPPORTED