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.

Clocks

Other Parts Discussed in Thread: SYSBIOS

Hi All,

I'm having immense difficulty with (what I think) should be a seemingly simple item, clocks.  Since I have run short of timers, I need to use a few clocks in my application (four).  I have two problems.  First being, I can't seem to configure the clock to behave the way I want.  From my app.cfg file, I have added the clock support to my project and set the tick period to 10 uS (I would like 1, but this alwatys crashes). Moving to the instance area, I add an instance and set the timeout to 1 and period to 1.  FIRST QUESTION. The period and timeout, are they with respect to the system clock (like a timer) or are they referencing the Tick period from the Clock Module page?  My second problem is, if I do not check 'start at boot' the program fails to run at all.

In both fail cases (start set to false and/or tick period < 10 uS) if I run then pause, I receive the error

Can't find a source file at "/db/vtree/library/trees/mcusdk/mcusdk-b25/product/tirtos_1_01_00_25/products/bios_6_34_04_22/packages/ti/sysbios/knl/Clock.c"

Locate the file or edit the source lookup path to include its location.

 

Any help would be greatly appreciated.

  • First of all, the clock module uses one of the timers. You can specify which one by setting the Timer Id.

    The period and the initial timeout specify how frequently you want to call the function you specify in the clock instance.

    For example, if you have a tick period = 10 us in the clock module page and have period and initial timeout as 10 in the instance page, then the function you specify will run as a Swi every 10 x 10 = 100 us.

    If you do not check 'start at boot', then you need to explicitly start the clock module using Clock_start() in your code..

    Hope this helps.

     

  • What device are you using, what is the CPU rate, and what is the clock rate to the timer?

    I think part of the difficulty you are having is that 10 usec may be too fast for your setup.  It may be that at that interrupt rate the Clock functions aren’t finished executing before another tick happens, and eventually the stack is blown.  Can you slow the tick rate and verify you get proper behavior before going faster?

    The “Can’t find a source file…” is a message from CCS that it can’t find the Clock.c source file.  If you browse to the same subdirectory in your tirtos install on your hard drive CCS will be able to display the sources.