Dear DSP/BIOS experts,
My team is using BIOS version 5.33.06 with code gen tools version 6.1.14 on the C6748 DSP. In our application we have a long-running process (on the order of 20 seconds or more) that sometimes needs to be preemptively aborted. The scenario here is when some outside entity (i.e. a "host") sends the DSP an abort command, our compute-intensive signal-processing function (which uses no dynamic memory allocation) needs to immediately end and cede control back to the calling function who will repond back to the host. This is an asynchronous event and after it occurs, the signal-processing cannot simply resume where it left off and has to "rewind" itself.
Our current solution is to set a global abort flag which the signal-processing function checks after every long-running mathematical operation and short-circuits itself in the event that the abort flag goes high. While perfectly functional, we don't like this solution for a number of reasons.
A more elegant design that we had in mind entails spawning a new BIOS task via TSK_create() each time we run this signal-processing. Then if we happen to receive the abort command a task with higher priority (the one listening to the host) will suspend the signal-processing thread and then kill it.
The question we have is are there any known issues with DSP/BIOS regarding the repeated spawning and then destruction of tasks? This would be just a single task that would potentially be created and then destroyed many hundreds of thousands of times, so we don't think it would present a problem for the kernel but we thought we'd ask nonetheless. Note that TSK_delete() would of course be called and the signal-processing task wouldn't own any DSP/BIOS resources.
Thanks,
Shehrzad