This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Multiple Tasks

Is it possible to have two tasks running simultaneously on a DM648?

Both of my tasks take place in while loops.  I have the priority of one task set to 3, and the other set to 2.  The latter does not seem to be getting called.  When I switch the priorities the same task still doesn't seem to be called.  Are there more settings that need to be put in to place other than the one in the task manager?

 

Thanks

Jason

  • If you never block the TSK of higher priority, the one with lower priority will never be called. Is that what is happening?

    This forum post might help:

    https://community.ti.com/forums/p/4214/15601.aspx#15601

     

  • Well, I am in a situation where regardless of which task has a higher priority, the same task runs in both cases, and the other one does not.

  • When you are creating the TSK, make sure that you are passing the correct name of the function. Other than that, it should work...

  • I have two tasks in the config file.

     

    One is _printer the other is _video_preview

    only video preview is being called.... both names are correct.

  • Well, I have some suggestions:

    1) Check if the TSKs properties are exactly the same (just the priority different);

    2) Try to use just the TSK that is not being called (remove the other TSK) and see if it works;

    3) Remember that in the tcf file you need the _ in front of the function name, but in the C file you should not use the _;

    4) Invert the function called by each TSK created, call printer from the task you were calling video_preview and vice-versa.

    5) Or try to call video_preview from both TSK...

    Try to "play" with your program to narrow down what could be the problem... 

  • Aside from function name, stack size and priority they are the same

    I tried bumping video_preview down to -1, it still runs while printer still does not.

    I am using the underscores properly

    I have tried to call printer from video_preview, haven't had any problems

    I've been playing for a while now... not sure why it's not functioning.

     

    Thanks

  • Have you tried removing the video_preview TSK from your BIOS configuration file temporarily as Mariana suggests? It would be interesting to see if you can get the printer TSK to run ever, if it still does not run without any other TSK in the system than there must be some problem in the configuration, if it does run without any other TSK in the system than you would have to look for a prioritization/blocking issue.

    Since you say video_preview still runs at -1 it sounds like your new TSK is somehow not being initialized properly but this is better proven by removing the video_preview TSK temporarily. I would suspect some issue with the naming of the function and TSK, or other invalid configuration in your BIOS configuration file.