Open mateusz-kusmierz opened 1 year ago
I guess the error comes from the use ofdelay ()
in a thread func. I thinkdelay ()
act on the main thread.
Try threads.delay () instead.
Thank You for Your response. I've tried that but unfortunately result is exactly the same.
Same here, the tasks only run once and then never called again. @mateusz-kusmierz is there any updates?
@mateusz-kusmierz well, I think I know where the issue is, I believe that you need you to increase the stack size to at least 2048. when I increased the stack size the program works fine.
Yeah, I just ran into this exact same issue and finally figured out that for some reason Serial.printf
requires a larger stack than 1k - this should be documented somewhere, I think that would be a pretty common function to use in a thread.
Is the Serial code thread-safe? Maybe use a mutex to lock the resource to the thread...
Yeah, I just ran into this exact same issue and finally figured out that for some reason
Serial.printf
requires a larger stack than 1k - this should be documented somewhere, I think that would be a pretty common function to use in a thread.
How do you increase the stack size on teensy 4.1?
I've tried running teensyThreads, so I made below code as proof of concept, but it does not work correctly. Whats the issue?
Serial Monitor output: