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.

DSP/BIOS TSK restart

Other Parts Discussed in Thread: DM3730

Dear all,


I want to restart my task (run from the very beginning of my task) after rcv certain HWI when my task is running.

Which API should I use? Or I have to delete in my HWI ISR and creat the same task again?

I am new to DSP/BIOS , and I use DM3730 with BIOS 5 under CCS V4.2.

Best regards!

  • Deleting and re-creating a task can be expensive, as it requires memory to be de-allocated and reallocated.  What you're describing is not  a typical use-case for a task.  But you don't provide enough information to know really know what your thinking and motivation is.  What actual problem are you trying to solve?

    Dave

  • Sounds like you might want to use a SWI instead. You can call SWI_post from the HWI. The SWI will run to completion and exit (you cannot block in a SWI).

  • My scenario just like a FSM, task0 is running ,then system rcv INTR, HWI will premmpt the task0, after ISR finish, the  task0 continue .

    In task0, there is a "while(1)" on the very beginning of task0 to make it continue processing.

    Now I want  task0 not continue after ISR finish, but run from the beginning, just like the task " reenter "or restart.

    Thanks.

  • The fundamentals of embedded system design are probably beyond the scope of this forum. 

    The most common and straightforward use-case for tasks is that they are created when the system starts up and remain running until the system is shutdown, with each task running in an infinite loop.  It is possible to dynamically create and delete tasks during run-time, but its important to take in to account the overhead associated with these operations and to make sure that they don't occur during critical deadlines.

    Todd was correct that you should study whether using the BIOS Software Interrupt threads may be a better tool for what you're trying to achieve.