This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMSIS RTOS max # tasks stuck at 18

Hi

I had a problem that I cannot figure out. I have 19 tasks/threads declared and created in my system. The documentation says that I can have up to 250 threads.

I found that my 19th thread is not being created. The create_thread call returns a id of is 0 for the 19th thread.

I have edit the configuration file to for 20 threads (the RTOS osTimer thread takes up one) and plenty of stack space for it.

All 19 threads have their own user stacks and I have made sure there is plenty of memory allocated to them.

If I remove one of my threads so there are 18, all 18 are created including the old 19th one. So there is nothing wrong with the way that that thread is defined because it will work if there are no more than 18 user threads.

What am I missing that is keeping me from creating more than 18 threads?