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 can't be executed repeatedly

Other Parts Discussed in Thread: TMS320C5505

I have a project built with DSP/BIOS. There are HWIs, SWIs, TSKs within it.

The HWIs and SWIs can work properly. But all TSks can execut only once at beginning. Then They can't be entered again. What‘s the most possible reason?

The platform is TMS320C5505. IDE is CCSv5.

  • Hi Gaojian Xu,

    A TSK will typically have a loop in its code. This will allow the TSK to repeat its operation multiple times.

    Once a TSK function returns, the TSK is terminated. So, you should use a loop to retain your TSK's execution.

    Steve
  • Hi, Steve

    Thanks for your reply.

    I certaintly use loops in the TSKs. When debug, I set break points in these loops. But the code can get the points only one time, never come back. Meanwhile, the HWIs and SWIs can be executed periodically.

    And this afternoon, I found one of the tsks Terminated but it shouldn't because there is a endless loops in the TSK. As below:

    for(;;)
    {
       if (SEM_pend(&SEM_waveform, MAX_WAIT ) == FALSE )

      {
        continue;
      }

    }

  • Hi Gaojian,

    Gaojian Xu said:
    I certaintly use loops in the TSKs

    Ok, great.  It seemed like you might have been missing that based on your description on them exiting.

    Gaojian Xu said:
    When debug, I set break points in these loops. But the code can get the points only one time, never come back. Meanwhile, the HWIs and SWIs can be executed periodically.

    Can you halt the target and look at ROV when this is happening?  What are the states of your TSKs?  Please take a screen shot and post to this thread.

    Gaojian Xu said:
     if (SEM_pend(&SEM_waveform, MAX_WAIT ) == FALSE )

    SEM_pend() will cause the TSK to block, waiting for another TSK (or SWI or HWI) to post the semaphore.  Are you calling SEM_post on your SEM_waveform semaphore anywhere?

    Steve

  • Hi

    I found the root cause these days. 

    One function in SWI takes too much time. The system has no time to run task.