Replies: 2 comments 4 replies
-
This error is being returned from the IDF's What sort of things have changed in your program since it worekd? Have you tried in v1.21.0 or v1.22.0-preview? |
Beta Was this translation helpful? Give feedback.
-
I'm getting that error (OSError: can't create thread) on a Lilygo T-Beam ESP32 board with Micropython 1.21 (also tried with 1.22). I have several custom libraries running on it for gps, ble and mqtt. All of them use threads and work well when I test them separately, but when I activate all these libraries together I start getting this error. I would say that it is because of scarce resources (mainly memory), but this board has 8 MB of SPIRAM, and it should be more than enough (even with 4 MB as I understand it is the max that ESP32 can use). I have built a custom firmware including these libraries on it to see if that helps, but still getting the same error. I did use this command to build the firmware: make BOARD=ESP32_GENERIC BOARD_VARIANT=SPIRAM FROZEN_MANIFEST="" FROZEN_MPY_DIR=$UPYDIR/modules Something I'm not sure about is if the code is really making use of the SPIRAM. I have used micropython.mem_info() in the Thonny's REPL console and got this: stack: 736 out of 15360 Am I missing something to give enough resources to my code to use these threads? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Micropython 1.20
Module, ESP32-pico-d4
So my code is like
for the past few weeks, it has worked fine, but today, I found that the second thread except with ERROR OSError("can't create thread",) .
What should I do for root cause finding. Can it be something related to memory?
I did increase the size of the .py file in the past few days though.
Beta Was this translation helpful? Give feedback.
All reactions