how many tasks can ESP32 handle?
how many tasks can ESP32 handle?
I know this is probably an unanswerable question, but I just need a ballpark figure. Running FreeRTOS, is there a practical limit to the number of tasks I can run?
Re: how many tasks can ESP32 handle?
Limit is your max ram usage. Freertos doenst apply tasks limits...
Re: how many tasks can ESP32 handle?
Just make a loop creating tasks until it fails. I did that once but forgot how many I could make. Since then I found you could free 90K of Bt memory. So I could have created a bunch more anyway.
John A
John A
Re: how many tasks can ESP32 handle?
Just know, the more tasks you have the less time each one will get from the CPU.
Re: how many tasks can ESP32 handle?
Oh yeah, I'm aware of that. The benefit of more tasks is just easier programming for me. I'm using 4 now, and want to add at least one more. It just prompted my curiosity more than anything.
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: how many tasks can ESP32 handle?
Well, as has been said before, it depends on the amount of memory. I just ran a quick test, creating tasks with 8K of stack (which should be more than enough for most purposes) and I could happily create 33 of 'em... so 5 shouldn't be an issue. If anything, the limiting factor mostly is the amount of (internal) RAM you use as stack, as others already said; there's no inherent limit in place.
Who is online
Users browsing this forum: No registered users and 101 guests