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.

Why can't call TSK_sleep() in dsplink sample app?

Hi,

    I face a very basic problem when using DSPlink。 In the loop sample code, when I added a statement on line 251 of file dsp/src/samples/loop/tskLoop.c:


       TSK_sleep(100);


   the result application will hang forever after print "  Entered LOOP_Execute() " !


   I am using DSPLink 1.65.00.03 and bios version 5.41.07.24, on a custom DM6467 board.


  Is this a bug of dsplink or bios ? Or do I misunderstand something that, in that context I can't call TSK_sleep()?

 

  • Zhang

    Are you building DSPLink in tskmode? The default is swimode? This setting is done when you run dsplink script? A quick way to check is whether you can put a breakpoint in tskLoop.c?

    The TSK_sleep uses a timer internally?

    Could there be an overlap in the configuration of timers on Linux and DSP/BIOS?  This problem has commonly been seen on OMAPL137 and DA830 where the timer 0 is used by DSP/BIOS and Linux. In that case: Update the sample to change the BIOS timer to use a different timer. See a sample configuration to change to timer 1.

    Clock = xdc.useModule(‘ti.sysbios.knl.Clock’);
    Clock.timerId = 1;

    Deepali
  • Deepali, 

         thanks for your reply.

         For the first question, I build DSPLink in swimode, the configuration script is :

              perl config/bin/dsplinkcfg.pl --platform=DAVINCIHD --nodsp=1 --dspcfg_0=DM6467GEMSHMEM --dspos_0=DSPBIOS5XX --gppos=DM6467LSP --comps=ponslrmc

         But I am a bit confused of your question: A quick way to check is whether you can put a breakpoint in tskLoop.c? AFAIK, the dsplink can use tsk or swi mode, and the loop application can too.  I build the sample application in tsk mode, in which case I can put a breakpoint in tskLoop.c. The dsplink lib and the loop sample appliction can use different mode, am I right?

         For the second question, I don't  know the answer.I think how the TSK_sleep is implemented, is depend on bios code.

         For the last question, I try to use  timer1 for bios clk. I think your code is based on sys/bios 6, but I am using dsp/bios 5, so I add a line in loop.tci:


             bios.CLK.TIMERSELECT = "Timer 1";

         the result is the same : the appliction hangs forever.

  • Deepali,

            For the last question, when I changed the linux kernel source code to not disable timer 1 and the the sample application to use timer 1 for bios, the result is OK ! thank you very much! 

     

  • Zhang,

    I think I'm having similar issues to you.  What did you change in the linux kernel source to not disable timer 1?  Is this a configuration option?