Skip to content

Assert reboot on wifi begin in dual core mode with arduino running as a component #749

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
forthlightning opened this issue Oct 20, 2017 · 2 comments

Comments

@forthlightning
Copy link

hitting this assert

esp-idf/components/freertos/./tasks.c:1066 (prvAddNewTaskToReadyList)- assert failed!

I see this code in arduino WiFiGeneric.cpp

static void _start_network_event_task(){
    if(!_network_event_queue){
        _network_event_queue = xQueueCreate(32, sizeof(system_event_t *));
        if(!_network_event_queue){
            log_e("Network Event Queue Create Failed!");
            return;
        }
    }
    if(!_network_event_task_handle){
        xTaskCreatePinnedToCore(_network_event_task, "network_event", 4096, NULL, 2, &_network_event_task_handle, 1);
        if(!_network_event_task_handle){
            log_e("Network Event Task Start Failed!");
            return;
        }
    }
    esp_event_loop_init(&_network_event_cb, NULL);
}

tries to start task on core 1, no core 1 available because single core mode

saw this assert in tasks.c


	/* Assure that xCoreID is valid or we'll have an out-of-bounds on pxCurrentTCB
	   You will assert here if e.g. you only have one CPU enabled in menuconfig and
	   are trying to start a task on core 1. */
	configASSERT( xCoreID == tskNO_AFFINITY || xCoreID < portNUM_PROCESSORS);
@forthlightning
Copy link
Author

switched on dual core mode, looks like it fixed the assert reboot.

@me-no-dev
Copy link
Member

Oops :) this could be changed to ARDUINO_RUNNING_CORE instead

blue-2357 pushed a commit to blue-2357/arduino-esp32 that referenced this issue Jul 17, 2024
Fixes: espressif/arduino-esp32#749

Works even when single core mode is selected
dash0820 added a commit to dash0820/arduino-esp32-stripped that referenced this issue Mar 10, 2025
Fixes: espressif/arduino-esp32#749

Works even when single core mode is selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants