Anyone hit a task limit?
Posted: Mon Mar 12, 2018 10:46 pm
I'm working on an app that is returning -1 on xTaskCreate after I've previously created a few tasks. The heap indicates....
heap_caps_get_free_size(MALLOC_CAP_8BIT) = 1657700
heap_caps_get_free_size(MALLOC_CAP_32BIT) = 1703316
stack free of the calling (creating) task = 7980
When I call uxTaskGetNumberOfTasks, I get 14. There is nothing unusual about the call to xTaskCreate. If I move it up above the previous task create then it works and the next one that previously worked fails. I also commented out a call to another part of the app that creates a task and then it's fine. I'm wondering if there is a different memory that is used that wouldn't be reported in those two heap checks that would affect the ability to create a task.
I know this isn't specific to the ESP32. But I thought maybe there was something specific to the port to the ESP32 that might be a limitation.
John
heap_caps_get_free_size(MALLOC_CAP_8BIT) = 1657700
heap_caps_get_free_size(MALLOC_CAP_32BIT) = 1703316
stack free of the calling (creating) task = 7980
When I call uxTaskGetNumberOfTasks, I get 14. There is nothing unusual about the call to xTaskCreate. If I move it up above the previous task create then it works and the next one that previously worked fails. I also commented out a call to another part of the app that creates a task and then it's fine. I'm wondering if there is a different memory that is used that wouldn't be reported in those two heap checks that would affect the ability to create a task.
I know this isn't specific to the ESP32. But I thought maybe there was something specific to the port to the ESP32 that might be a limitation.
John