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.

creating timers statically with SYS/BIOS

Other Parts Discussed in Thread: SYSBIOS

hi all,

i am trying to use timers in a SYS/BIOS program. I created statically a timer using XGconf, i configured it's properties, but i cannot obtain it's handler to use the instruction:

Timer_start( handler);   in my source code.

Normally, the handler is the returned object from the function  Timer.create(.......) . here is a part of my cfg script:

var instti_sysbios_hal_Timer0Params0 = new ti_sysbios_hal_Timer.Params();
instti_sysbios_hal_Timer0Params0.instance.name = "myTimer";
instti_sysbios_hal_Timer0Params0.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
instti_sysbios_hal_Timer0Params0.period = 400000000;
instti_sysbios_hal_Timer0Params0.periodType = xdc.module("ti.sysbios.interfaces.ITimer").PeriodType_COUNTS;
Program.global.myTimer = ti_sysbios_hal_Timer.create(1, "&myTick", instti_sysbios_hal_Timer0Params0);

i tried 'myTimer' as an argument for Timer_start(), but the program does not recognize it.

so what is the handler of a timer created statically?

  • I will ask to have your question moved to the Embedded Software->BIOS forum. BIOS-related software questions will find the best sources of answers there, while device- and hardware-based questions will find the best sources of answers in the C6000 forums.

    In the future, it will help to identify the device and the version of SYS/BIOS and the version of CCS that you are using.

    Regards,
    RandyP

  • Mohammed,

    What do you mean by "does not recognize it"?  Is your application not compiling?  Could you try inserting the following header file into your application?

    #include <xdc/cfg/global.h>

    This will result in a configuration-specific generated header file being included, which in turn contains extern declarations of your config-time created 'handles'.

    The runtime code Timer_start(myTimer); looks right to me.

    Regards,

    Shreyas

  • thanx Shreyas,

    I meant by "does not recognize it" that the compiler classified it as a undefined symbol, and the compilation failed.

    Adding  the "#include <xdc/cfg/global.h>" statement in my source code solved the problem.

    thanks again

    regards.