Skip to content

esp32s2 debug build errors in wifi_reset #3688

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

Closed
jepler opened this issue Nov 13, 2020 · 1 comment · Fixed by #3689
Closed

esp32s2 debug build errors in wifi_reset #3688

jepler opened this issue Nov 13, 2020 · 1 comment · Fixed by #3689
Labels
crash espressif applies to multiple Espressif chips

Comments

@jepler
Copy link

jepler commented Nov 13, 2020

In a debug build

ESP_ERROR_CHECK failed: esp_err_t 0x106 (ESP_ERR_NOT_SUPPORTED) at 0x4002f190
file: "common-hal/wifi/__init__.c" line 147
func: wifi_reset
expression: esp_netif_deinit()

abort() was called at PC 0x4002f193 on core 0
Setting breakpoint at 0x400304fa and returning...

It appears esp_netif_deinit() never succeeds:

esp_err_t esp_netif_deinit(void)
{
    if (tcpip_initialized == true) {
        /* deinit of LwIP not supported:
         * do not deinit semaphores and states,
         * so init could be called multiple times
         *
        tcpip_initialized = false;
        sys_sem_free(&api_sync_sem);
        sys_sem_free(&api_lock_sem);
         */
        return ESP_ERR_NOT_SUPPORTED;

    }
    return ESP_ERR_INVALID_STATE;
}
@jepler jepler added crash espressif applies to multiple Espressif chips labels Nov 13, 2020
@jepler
Copy link
Author

jepler commented Nov 13, 2020

Having removed this call, the second call to esp_event_loop_create_default fails

ESP_ERROR_CHECK failed: esp_err_t 0x103 (ESP_ERR_INVALID_STATE) at 0x4002f190
file: "common-hal/wifi/__init__.c" line 98
func: common_hal_wifi_init
expression: esp_event_loop_create_default()

jepler added a commit to jepler/circuitpython that referenced this issue Nov 13, 2020
Closes adafruit#3688

With this change, I don't get the ESP_ERROR_CHECK failed repeatedly
running code that imports wifi.  (I'm not getting a successful connection
but that's probably my own fault, such as a secrets problem)
@dhalbert dhalbert added this to the 6.x.x - Bug Fixes milestone Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants