Is there any limitation to how much tasks can be used in a program? I am writing a program that uses 7 tasks but only 3 tasks are running at a time.
When I include 8th task it gives strange behaviour. (Keep switching between the task), even if the 8th task does nothing except incrementing a variable.
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
Posted: Mon Jun 04, 2012 2:56 am
I don't know what the maximum number of allowed tasks is, but 7 sounds like a possible maximum. For an exact answer you'll have to mail CCS Support.
Just a few hints though:
1) The CCS RTOS feature is not used widely, i.e. you are in new territory and it is very well possible you will discover new bugs.
2) From doing I've learned that it is bad practice to create an application with many threads. Debugging becomes much more complicated as most debuggers and processors have poor support for multi-threading. Not to mention the problem of race conditions and dead locks which can be a real nightmare to track down.
Are you really sure you need threads? Or is it just a nice way for partitioning your program?
The fact that only 3 out of 7 tasks will be active at any given time suggests the latter. Partitioning a program into seperate parts is a Design Time problem and can be solved by creating multiple C-files / functions.
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
Posted: Mon Jun 04, 2012 2:40 pm
Quote:
even if the 8th task does nothing except incrementing a variable.
If you must use RTOS, why not merge task8 with other tasks?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum