mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
Merge branch 'fix/trigger_system_reset_in_brownout_isr_v5.3' into 'release/v5.3'
change(esp_system): trigger digital system reset in brownout isr (v5.3) See merge request espressif/esp-idf!31683
This commit is contained in:
@ -362,6 +362,7 @@ soc_xtal_freq_t rtc_clk_xtal_freq_get(void)
|
|||||||
uint32_t xtal_freq_mhz = clk_ll_xtal_load_freq_mhz();
|
uint32_t xtal_freq_mhz = clk_ll_xtal_load_freq_mhz();
|
||||||
if (xtal_freq_mhz == 0) {
|
if (xtal_freq_mhz == 0) {
|
||||||
ESP_HW_LOGW(TAG, "invalid RTC_XTAL_FREQ_REG value, assume 40MHz");
|
ESP_HW_LOGW(TAG, "invalid RTC_XTAL_FREQ_REG value, assume 40MHz");
|
||||||
|
clk_ll_xtal_store_freq_mhz(SOC_XTAL_FREQ_40M);
|
||||||
return SOC_XTAL_FREQ_40M;
|
return SOC_XTAL_FREQ_40M;
|
||||||
}
|
}
|
||||||
return (soc_xtal_freq_t)xtal_freq_mhz;
|
return (soc_xtal_freq_t)xtal_freq_mhz;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#include "soc/soc.h"
|
#include "soc/soc.h"
|
||||||
#include "soc/rtc_periph.h"
|
#include "soc/rtc_periph.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
|
#include "esp_rom_sys.h"
|
||||||
#include "bootloader_flash.h"
|
#include "bootloader_flash.h"
|
||||||
#include "esp_intr_alloc.h"
|
#include "esp_intr_alloc.h"
|
||||||
#include "hal/brownout_hal.h"
|
#include "hal/brownout_hal.h"
|
||||||
@ -56,7 +57,10 @@ IRAM_ATTR static void rtc_brownout_isr_handler(void *arg)
|
|||||||
ESP_DRAM_LOGI(TAG, "Brownout detector was triggered\r\n\r\n");
|
ESP_DRAM_LOGI(TAG, "Brownout detector was triggered\r\n\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_restart_noos();
|
esp_rom_software_reset_system();
|
||||||
|
while (true) {
|
||||||
|
;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif // CONFIG_ESP_SYSTEM_BROWNOUT_INTR
|
#endif // CONFIG_ESP_SYSTEM_BROWNOUT_INTR
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user