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 Clock timerId not working

Other Parts Discussed in Thread: SYSBIOS

Hi All,

I am using the Clock module in my core 0 on the C6678 and it ONLY works when I select the Timer Id to be ANY or 0.

I understand that Timers 0 to 7 are for Watchdogs on cores 0 to 7 and 8 to 15 are shred timers...But None of the timers had worked with the Clock.

I am only using HWI 12 and no other HWI, SWI, Timers are used

C6678 EVM

bios_6_35_04_50

pdk_C6678_1_1_2_6

xdctools_3_25_03_72

I am using the .cfg to statically configure the clock and set the Timer Id to 1, this is what I get when I run the code:

[C66xx_0] ti.sysbios.timers.timer64.Timer: line 567: assertion failure: A_notAvailable: static created timer not available
xdc.runtime.Error.raise: terminating execution

I am using the .cfg to statically configure the clock and set the Timer Id to 10 (The SYS/BIOS GUI only shows ANY, 0 to 7 ?!?!?!?!), this is what I get when I run the code:

[C66xx_0] ti.sysbios.family.c64p.Hwi: line 188: E_alreadyDefined: Hwi already defined: intr# 15
xdc.runtime.Error.raise: terminating execution

I need to select another timer since I want to use a watchdog on core 0 and when I do that, the system crashed

Regards,

Murad

  • I also followed the example under CCS module ti.sysbios.timer64.Timer and no luck!!!

    The following sample .cfg code sets core 0 to initialize a shared timer with id 4. It also configures the Clock module to use this timer. This allows multiple cores to share timer 4 for the Clock module's interrupt source.

    // 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;
  • I am using CCS 5.5.0.00077
  • Hi,

    We have tested the MCSDK based timer example on C6678 EVM, it is working properly. Please try to run the same example on your test.

    MCSDK Path: \ti\pdk_C6678_1_1_2_6\packages\ti\csl\example\timer

    Also, i attached my tested timer project for your reference. 5040.Timer.zip

    Thanks,

  • Hello Ganapathi,
    Thank you for your reply
    The timer test you mentioned is not using the sys /bios.
    Have you tested adding a clock module to a sys/bios project and change the timer id using the sys/bios GUI (.cfg file)?!...try doing that in the HUA demo project

    Regards,

    Murad
  • Thank you Rajasekaran for the reply...
    Unfortunately, the posts you mentioned above didn't help...my problem is easy to reproduce. I actually got the same issue using the C6657 EVM and C6678 EVM by adding a clock to the HUA Demo project using the XGCONF (.cfg)...coule you please try adding a clock to the same HUA project and see if you get the same issue!

    Regards,

    Murad
  • Hi Murad,

    Please refer below thread for SYS/BIOS timer example.

    Thank you.

  • Hello Rajasekaran,
    I know how to setup a Timer...my PROBLEM is with using the CLOCK module with a timer id other than ANY...Could you please just try changing the CLOCK id of the HUA Demo project to anything but (ANY or 0) and see if you get it to work...I updated my tools to bios_6_37_05_35 and xdctools_3_25_06_96 and still no luck...Also, The id Options are still wrong (ANY, 0 to 7 instead of 0-15 for C6678 chip)

    Regards,

    Murad
  • The HUA demo I am referring to is at:
    C:\ti\mcsdk_2_01_02_06\demos\hua
  • Any idea guys?...did you try repeating the problem with the HUA project?...We have to ship a unit to a customer and I need to solve this issue so we can add a watchdog timer to the unit before we ship

    Regards,

    Murad
  • If something is not clear about my problem, please let me know...but just ignoring the issue is not what I used to from TI !!!
  • Hello Ganapathi,
    The project you attached triggers the WDT ISR only once and never reach the line after "while (timerISRCounter != 5);" ?!
  • BTW: I still have no luck solving this problem!!!
  • 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.

    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.

    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;

    Note: You can not use the timer id 4 from core 0 as it is dedicated to core4.

    Thank you.
  • Thank you, Raja!
    When I do this, I get the following error when I run the code (compiles ok)

    [C66xx_0] ti.sysbios.family.c64p.Hwi: line 190: E_alreadyDefined: Hwi already defined: intr# 15
    xdc.runtime.Error.raise: terminating execution

    I tried changing the INT# as follows:
    var ti_sysbios_timers_timer64_Timer0Params0 = new ti_sysbios_timers_timer64_Timer.Params();
    ti_sysbios_timers_timer64_Timer0Params0.instance.name = "ti_sysbios_timers_timer64_Timer0";
    ti_sysbios_timers_timer64_Timer0Params0.intNum = 11;
    Program.global.ti_sysbios_timers_timer64_Timer0 = ti_sysbios_timers_timer64_Timer.create(10, null, ti_sysbios_timers_timer64_Timer0Params0);

    BUT, I got a compilation error:

    Description Resource Path Location Type
    ti.sysbios.timers.timer64.Timer.Instance#0 : Timer 10 is already in use or reserved (check availMask). .xdchelp /DIAGNOSTX_MASTER line 2472 C/C++ Problem
    Description Resource Path Location Type
    Timer 10 is already in use or reserved (check availMask). DIAGNOSTX_MASTER.cfg /DIAGNOSTX_MASTER ti.sysbios.timers.timer64.Timer.Instance#0 XDCTools Configuration Marker

    The only way I can get it to work is by using changing the Clock to use a User Tick
    Clock.tickSource = Clock.TickSource_USER;

    and have timer 10 ISR call: Clock_tick();

    How Can I change the INT# for Timer 10 to something not being used in my code and use :
    Clock.tickSource = Clock.TickSource_TIMER;


    Regards,

    Murad
  • Hi Murad,

    We could run the application with changes in my previous post. I recommend you to test the timer interrupt example separately and integrate it with your application. 

    Please refer below thread for reference,

    If you could not solve the issue, we recommend you to post your timer code in "TI-RTOS" forum for appropriate and faster response. Thank you.

  • Dear Raja,
    Thank you for your help and patient!
    Lesson Learned...the hard way!:
    Raja: "Note: You can not use the timer id 4 from core 0 as it is dedicated to core4.".....so core n can ONLY use Timer n and Timers 8-15
    My project was using intNum15 for the UART, BUT intNum15 is used by the shared Timers (8-15), (TINTLxL, x=8-15).
    I used Timer 8 for the Clock.timerId
    I changed the UART intNum to 11
    ...and everything worked fine!


    Regards,

    Murad
  • Thank you for the update. We are glad that you could solve the issue.