mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-17 15:15:02 +00:00
fix(panic_handler): Updated panic handler to use RTC WDT
This commit updates the following: - Updates the panic handler to use only the RTC WDT to reset the system. - Refactors some of the panic handler code. - Updates Bluetooth files where in they now feed the WDTs instead of reconfiguring them. - Removes some unnecessary configuration of WDTs from various files. - Added a unit test to verify that the system does not lock up when the panic handler is stuck. - Updates the memprot unit tests to work with the refactored panic handler. Closes https://github.com/espressif/esp-idf/issues/15166 Closes https://github.com/espressif/esp-idf/issues/15018 Closes https://github.com/espressif/esp-idf/issues/10110
This commit is contained in:
@@ -128,7 +128,7 @@ extern int ble_controller_init(esp_bt_controller_config_t *cfg);
|
||||
extern int ble_log_init_async(interface_func_t bt_controller_log_interface, bool task_create, uint8_t buffers, uint32_t *bufs_size);
|
||||
extern int ble_log_deinit_async(void);
|
||||
extern void ble_log_async_output_dump_all(bool output);
|
||||
extern void esp_panic_handler_reconfigure_wdts(uint32_t timeout_ms);
|
||||
extern void esp_panic_handler_feed_wdts(void);
|
||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||
extern int ble_controller_deinit(void);
|
||||
extern int ble_controller_enable(uint8_t mode);
|
||||
@@ -389,7 +389,7 @@ void esp_bt_read_ctrl_log_from_flash(bool output)
|
||||
|
||||
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
||||
portENTER_CRITICAL_SAFE(&spinlock);
|
||||
esp_panic_handler_reconfigure_wdts(5000);
|
||||
esp_panic_handler_feed_wdts();
|
||||
ble_log_async_output_dump_all(true);
|
||||
stop_write = true;
|
||||
esp_bt_ontroller_log_deinit();
|
||||
@@ -447,7 +447,7 @@ void esp_ble_controller_log_dump_all(bool output)
|
||||
} else {
|
||||
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
||||
portENTER_CRITICAL_SAFE(&spinlock);
|
||||
esp_panic_handler_reconfigure_wdts(5000);
|
||||
esp_panic_handler_feed_wdts();
|
||||
BT_ASSERT_PRINT("\r\n[DUMP_START:");
|
||||
ble_log_async_output_dump_all(output);
|
||||
BT_ASSERT_PRINT(":DUMP_END]\r\n");
|
||||
|
Reference in New Issue
Block a user