mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
change(esp_system): trigger digital system reset in brownout isr
This commit is contained in:
@@ -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