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.

C6678 - Bios system tick and WD timer

Guru 10750 points
Other Parts Discussed in Thread: SYSBIOS

Hi,

The C6678 have 16 timers where 8 of then can be used as WD timer this timers are timers 0-7 each timer connects to one core,

When Ii'm using the BIOS I need to define for the Timer Control the Timer Id the options are ANY or 0-7, the issue is that if I'm taking any of the 0-7 timers than that core will not have a WD timer, how can I overcome this?

Thanks,

HR

  • Hi HR,

    If you use (8-15) as the Timer Id when creating a timer, one of the 8 shared timers will be used while If you use Timer_ANY when creating a timer, one of the 8 core-local Timers will be used. So, in order to avoid using the 8 local timers (and reserve them for Watchdog use), you can explicitly specify the timer Id when creating the timers.

    You can look at the documentation for ti.sysbios.timers.timer64.Timer for more details. I have pasted an excerpt from the documentation explaining Timer id selection:

    Note: Creating a timer with 'Timer.ANY' specified as the id will not return a shared timer on a homogeneous multicore device. To use a shared timer, specify the timer id explicitly when creating it. On these devices Timer.ANY specifies the local timer id. This allows a single image to run on multiple cores since each core will program a different local timer.

    Best,

    Ashish

  • Hi Ashish,

    Please note that the Timer Id goes from 0-7 does it means that "0" is "8" and "7" is "15"?

    I assume you can use Clock.tickSource_USER on all the cores having core "0" setting one global timer and having timer interrupt on all the cores to call Clock_tick(), probably can use SWi as Clock.tickSource_TIMER uses, this will also allow a single image, is this correct?

    Thanks,

    HR

  • Hi HR,

    HRi said:

    Please note that the Timer Id goes from 0-7 does it means that "0" is "8" and "7" is "15"?

    On C6678, you can use Timer Ids 0-15 when creating timers. Ids 0-7 map to the local timers and Ids 8-15 map to the shared timers.

    HRi said:

    I assume you can use Clock.tickSource_USER on all the cores having core "0" setting one global timer and having timer interrupt on all the cores to call Clock_tick(), probably can use SWi as Clock.tickSource_TIMER uses, this will also allow a single image, is this correct?

    Yes, you can configure multiple cores to use a shared timer as the Clock module's interrupt source. Here's an example .cfg file to do it:

    // sets core 0 to init and release Timer 10.

    var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');

    Timer.timerSettings[10].ownerCoreId = 0;

    // Clock tick source is Clock.tickSource_TIMER by default

    var Clock = xdc.useModule('ti.sysbios.knl.Clock');

    Clock.timerId = 10;

    You can use a single image on all the cores. Each core will use the select shared timer as the Clock tick source.

    Best,

    Ashish

  • Hi Ashish,

    Please note that on the XGCONF Clock module the Timer Id options are ANY or 0-7, is there a specific C66x clock module?

    Thanks,

    HR

  • Hi HR,

    I looked at the XGCONF tool and confirmed it allows the user to select timer ids 0-8 only, even though for C6678 it should allow Ids 0-15. I will study this in more detail and get back.

    Can you confirm the target and platform you are using ?

    Thanks,

    Ashish

  • Hi Ashish,

    C6678 and the TMDSEVM6678,

    Thanks,

    HR

  • Hi HR,

    XGCONF Timer Id dropdown menu has a bug. It is the same for all targets/platforms. The drop-down menu will be extended to show ids 8-15 in the next BIOS (6.34.00) release. You can follow these steps to get around this problem:

    -Open your application's .cfg file.

    - In the System Overview view select Timer module.

    - In the Timer -> Module view, select Add the portable Timer management module to my configuration

    - In Timer -> Instance view, create the required number of timers. You can use any Timer Id while creating these timers here (say Id 1 for all timers). We will override this Timer Id with the desired Timer Id (>8) in the next step.

    -Now select the Source tab at the bottom of the XGCONF page. Scroll down to the Timer.create() calls. You can manually override the Timer Id values here.

    Note: Once you override these values, do not attempt to change the Timer Id from the drop down menu in Timer -> Instance view. This will cause the Timer Id values to change to the value you select.

    - Save the .cfg file. You can now rebuild your app.

    Best,

    Ashish

  • Hi Ashish,

    Great ! I think that this can also be done by changing the Clock module -> Advanced -> timerId,

    Thanks,

    HR

  • Yes.  You can modify the timer Id used by Clock from the Clock -> Advanced view.

    Best,

    Ashish

  • Ashish,

    Great ! Thanks,

    HR