From ac0705d59b71e04d100f795408be03cbfe407b7b Mon Sep 17 00:00:00 2001 From: Sylvio Alves Date: Tue, 1 Apr 2025 13:42:04 -0300 Subject: [PATCH] soc: espressif: update restart procedure Use esp_restart call to guarantee and registered shutdown handlers will be triggered before rebooting. This guarantees that subsystems like Wi-Fi and BLE will deinit correctly. Signed-off-by: Sylvio Alves --- soc/espressif/esp32/soc.c | 2 +- soc/espressif/esp32/soc_appcpu.c | 2 +- soc/espressif/esp32c2/soc.c | 2 +- soc/espressif/esp32c3/soc.c | 2 +- soc/espressif/esp32c6/soc.c | 2 +- soc/espressif/esp32s2/soc.c | 2 +- soc/espressif/esp32s3/soc.c | 2 +- soc/espressif/esp32s3/soc_appcpu.c | 2 +- west.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/soc/espressif/esp32/soc.c b/soc/espressif/esp32/soc.c index d7cf1315da2..69c359a92f9 100644 --- a/soc/espressif/esp32/soc.c +++ b/soc/espressif/esp32/soc.c @@ -63,5 +63,5 @@ int IRAM_ATTR arch_printk_char_out(int c) void sys_arch_reboot(int type) { - esp_restart_noos(); + esp_restart(); } diff --git a/soc/espressif/esp32/soc_appcpu.c b/soc/espressif/esp32/soc_appcpu.c index 40903ffc321..32305009336 100644 --- a/soc/espressif/esp32/soc_appcpu.c +++ b/soc/espressif/esp32/soc_appcpu.c @@ -102,5 +102,5 @@ int IRAM_ATTR arch_printk_char_out(int c) void sys_arch_reboot(int type) { - esp_restart_noos(); + esp_restart(); } diff --git a/soc/espressif/esp32c2/soc.c b/soc/espressif/esp32c2/soc.c index e14ca4d02b0..5d0df3e0360 100644 --- a/soc/espressif/esp32c2/soc.c +++ b/soc/espressif/esp32c2/soc.c @@ -50,5 +50,5 @@ int IRAM_ATTR arch_printk_char_out(int c) void sys_arch_reboot(int type) { - esp_restart_noos(); + esp_restart(); } diff --git a/soc/espressif/esp32c3/soc.c b/soc/espressif/esp32c3/soc.c index d5f241f43d5..485891e2c6c 100644 --- a/soc/espressif/esp32c3/soc.c +++ b/soc/espressif/esp32c3/soc.c @@ -51,5 +51,5 @@ int IRAM_ATTR arch_printk_char_out(int c) void sys_arch_reboot(int type) { - esp_restart_noos(); + esp_restart(); } diff --git a/soc/espressif/esp32c6/soc.c b/soc/espressif/esp32c6/soc.c index ba49300a1da..fb02f77c3b4 100644 --- a/soc/espressif/esp32c6/soc.c +++ b/soc/espressif/esp32c6/soc.c @@ -50,5 +50,5 @@ int IRAM_ATTR arch_printk_char_out(int c) void sys_arch_reboot(int type) { - esp_restart_noos(); + esp_restart(); } diff --git a/soc/espressif/esp32s2/soc.c b/soc/espressif/esp32s2/soc.c index 9d8258a23ab..bbb4fa973c5 100644 --- a/soc/espressif/esp32s2/soc.c +++ b/soc/espressif/esp32s2/soc.c @@ -78,5 +78,5 @@ int IRAM_ATTR arch_printk_char_out(int c) void sys_arch_reboot(int type) { - esp_restart_noos(); + esp_restart(); } diff --git a/soc/espressif/esp32s3/soc.c b/soc/espressif/esp32s3/soc.c index 08865b19151..4e7f9bffc44 100644 --- a/soc/espressif/esp32s3/soc.c +++ b/soc/espressif/esp32s3/soc.c @@ -90,5 +90,5 @@ int IRAM_ATTR arch_printk_char_out(int c) void sys_arch_reboot(int type) { - esp_restart_noos(); + esp_restart(); } diff --git a/soc/espressif/esp32s3/soc_appcpu.c b/soc/espressif/esp32s3/soc_appcpu.c index 5e6eca88f0b..517b1e187d7 100644 --- a/soc/espressif/esp32s3/soc_appcpu.c +++ b/soc/espressif/esp32s3/soc_appcpu.c @@ -87,5 +87,5 @@ int IRAM_ATTR arch_printk_char_out(int c) void sys_arch_reboot(int type) { - esp_restart_noos(); + esp_restart(); } diff --git a/west.yml b/west.yml index 5ce09c8676a..1e0b9482732 100644 --- a/west.yml +++ b/west.yml @@ -162,7 +162,7 @@ manifest: groups: - hal - name: hal_espressif - revision: c33e522158d69417c4a66d07b5009b35c52481f8 + revision: dbc28ad4c1bdcdb25e79ca225cb5528a75d8dc91 path: modules/hal/espressif west-commands: west/west-commands.yml groups: