File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
esp_hw_support/port/esp32c6 Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -362,6 +362,7 @@ soc_xtal_freq_t rtc_clk_xtal_freq_get(void)
362362 uint32_t xtal_freq_mhz = clk_ll_xtal_load_freq_mhz ();
363363 if (xtal_freq_mhz == 0 ) {
364364 ESP_HW_LOGW (TAG , "invalid RTC_XTAL_FREQ_REG value, assume 40MHz" );
365+ clk_ll_xtal_store_freq_mhz (SOC_XTAL_FREQ_40M );
365366 return SOC_XTAL_FREQ_40M ;
366367 }
367368 return (soc_xtal_freq_t )xtal_freq_mhz ;
Original file line number Diff line number Diff line change 11/*
2- * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
2+ * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
1616#include "soc/soc.h"
1717#include "soc/rtc_periph.h"
1818#include "esp_attr.h"
19+ #include "esp_rom_sys.h"
1920#include "bootloader_flash.h"
2021#include "esp_intr_alloc.h"
2122#include "hal/brownout_hal.h"
@@ -56,7 +57,10 @@ IRAM_ATTR static void rtc_brownout_isr_handler(void *arg)
5657 ESP_DRAM_LOGI (TAG , "Brownout detector was triggered\r\n\r\n" );
5758 }
5859
59- esp_restart_noos ();
60+ esp_rom_software_reset_system ();
61+ while (true) {
62+ ;
63+ }
6064}
6165#endif // CONFIG_ESP_SYSTEM_BROWNOUT_INTR
6266
You can’t perform that action at this time.
0 commit comments