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.

Clock.timerId can't work

Other Parts Discussed in Thread: SYSBIOS, TMS320TCI6604

Hi all,

as per BIOS6 UG, we can select the timer to drive Clock instance by setting Clock.timerId whose tickSource is tickSource_TIMER. My understanding is that the default timerId for core0 is timer 0 and timer 1 for core1 and so on. Now I want to change the timerId for Clock instance in core0 as timer4 by Clock.timerId = 4. Unfortunately it does't work. Does anyone tell me whether my understanding is correct and what else I miss? Thanks a lot.

Best regards,

Neville Chen

  • Neville,

    Which device & BIOS version are you using?

    Regards,

    Shreyas

  • The device is C6670 and the BIOS version is 6.31.04.27.

  • Chen,

    What happens when you set Clock.timerId = 4?  You say it doesn't work...can you elaborate what you mean by this.

    Timer 4 on C6670 is a shared timer but this should be supported.  Can you try the following:

     // sets core 0 to init and release Timer 4.
     var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
     Timer.timerSettings[4].ownerCoreId = 0;
     
     var Clock = xdc.useModule('ti.sysbios.knl.Clock');
     Clock.timerId = 4;

    Judah

  • Hi Judah,

    Can you please explain what you mean by a shared timer? What is the timer shared between?

    I am trying to understand why we need to release the timer.

    On my setup using C6604 DSP, I am trying to get the BIOS to use timer 2, 4, 6 for core 1, 2 and 3 respectively. I am wondering if I need to release all these timers first?

    Thanks,
    Rashmi 

     

     

  • Rashmi,

    On the 6670, some timers are local to a particular core and some timers are shared among all cores.  Thus we have the concept of a local timer and a shared timer.  In essence, a shared timer is a timer which can generate an interrupt to multiple cores while a local timer only generates an interrupt to one core.  In the case of a shared timer, you don't want multiple cores to be "programming" up the timer and releasing it from reset, you want a single core to do this.  "releasing" a timer simply means programing it up and starting it.  I'm not sure if that was your understanding.

    I am not familar with a device called C6604.  Is this the same as a 6670? Otherwise I don't think BIOS is supported for this device.  YOu need to determine how many timers are on the device and how many of those are local versus shared.  Once you have determine that core1 can receive an interrupt from timer2, core2 from timer4, and core3 from timer6 then you need to designate each of those cores as the owner of that particular timer.

    Judah

  • Hi Judah,

    Thanks for the explanation! We are using the TMS320TCI6604 device. Sorry, I didn't write down the complete device number earlier. It is a 4-core device and has 8 timers.

    Here is the timer allocation that we plan to have:

    core 0: timers 0,1

    core 1: timer 2,3

    core 2: timer 4,5

    core 3: timer 6,7

    1. In the above example, we plan to use timers 0,2,3 and 6 as the BIOS clocks. Is that even possible? A local timer (say timer 2 for core 2) is being configured to be a timer source for BIOS clock of core 1.   

    2. My understanding is that we should make different cores the owner of the timers assigned to them and then set the BIOS to use different timerIds. Is that correct?

    Thanks,

    Rashmi

     

  • Rashmi,

    #1.  You cannot do what you are suggesting above.  Each of the Timers 0-3 are for there respective local cores and should be configured by the local core.  Timers 4-7 are shared timers and can be owned by any of the cores.  See the statement below that I copied from the TCI6604 data sheet.

    #2.  Yes, you assign different owners to the different shared timers.  Then you set BIOS to use different timerId's for its Clock module.  I believe you need BIOS 6.32.xx and later to be able to assign different owners to the different shared timers.  I don't think this support is there in BIOS 6.31.xx

    You could do something like:

    core0: timers 0, 4

    core1: timers 1, 5

    core2: timers 2, 6

    core3: timers 3, 7

    7.24.1 Timers Device-Specific Information

    The TMS320TCI6604 device has eight 64-bit timers in total. Timer0 through Timer3 are dedicated to each of the

    four CorePacs as a watchdog timer and can also be used as general-purpose timers. Each of the other four timers can

    also be configured as a general-purpose timer only, with each timer programmed as a 64-bit timer or as two separate

    32-bit timers.

    Judah

  • Thank you for your response, Judah! This helps.

    Rashmi