Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix esp32 multicore lockup #2916

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sming/Arch/Esp32/Components/esp32/sdk/esp_system.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ ifndef CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
SDK_UNDEF_SYMBOLS += start_app_other_cores
endif

# ld_include_panic_highint_hdl is added as an undefined symbol because otherwise the
# linker will ignore panic_highint_hdl.S as it has no other files depending on any
# ld_include_highint_hdl is added as an undefined symbol because otherwise the
# linker will ignore highint_hdl.S as it has no other files depending on any
# symbols in it.
SDK_UNDEF_SYMBOLS += ld_include_panic_highint_hdl
SDK_UNDEF_SYMBOLS += ld_include_highint_hdl

# IDF 5.2
SDK_WRAP_SYMBOLS += esp_newlib_init_global_stdio
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void AccessPointImpl::enable(bool enabled, bool save)
}
}
ESP_ERROR_CHECK(esp_wifi_set_storage(save ? WIFI_STORAGE_FLASH : WIFI_STORAGE_RAM));
ESP_ERROR_CHECK(esp_wifi_set_mode((wifi_mode_t)mode));
ESP_ERROR_CHECK(esp_wifi_set_mode(mode));
}

bool AccessPointImpl::isEnabled() const
Expand Down Expand Up @@ -88,10 +88,13 @@ bool AccessPointImpl::config(const String& ssid, String password, WifiAuthMode m
config.ap.authmode = (wifi_auth_mode_t)mode;
config.ap.max_connection = 8;

bool enabled = isEnabled();
enable(true, false);

ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &config));
ESP_ERROR_CHECK(esp_wifi_start());
if(enabled) {
System.queueCallback(esp_wifi_start);
}

return true;
}
Expand Down
Loading