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?

Parents
  • Hi

    Gosh, usually someone has some ideas. I still cannot figure how what limit the RTOS is checking to determine I am over the limit.

    I have boosted the total number of threads to 24 and I still get a 0 for the thread id on the 19th thread I try to create. 24 is way more than I need but the RTOS still will not create the thread.

    Outside of that number I cannot find anything else that would prevent a thread from being created.

    Does anyone else have any ideas? Or something I could look at?

    I cannot debug the source because when step into create_thread it executes 3 lines and returns. I cannot step any deeper into the code

Reply
  • Hi

    Gosh, usually someone has some ideas. I still cannot figure how what limit the RTOS is checking to determine I am over the limit.

    I have boosted the total number of threads to 24 and I still get a 0 for the thread id on the 19th thread I try to create. 24 is way more than I need but the RTOS still will not create the thread.

    Outside of that number I cannot find anything else that would prevent a thread from being created.

    Does anyone else have any ideas? Or something I could look at?

    I cannot debug the source because when step into create_thread it executes 3 lines and returns. I cannot step any deeper into the code

Children