Part Number: PROCESSOR-SDK-OMAPL137
Other Parts Discussed in Thread: SYSBIOS
Tool/software: Code Composer Studio
Hi,
I am trying to configure timer as counter using SYS/BIOS .cfg file. I have added following to my .cfg file
var ti_sysbios_timers_timer64_Timer0Params = new ti_sysbios_timers_timer64_Timer.Params();
ti_sysbios_timers_timer64_Timer0Params.instance.name = "ti_sysbios_timers_timer64_Timer0";
ti_sysbios_timers_timer64_Timer0Params.emuMgtInit.soft = false;
ti_sysbios_timers_timer64_Timer0Params.periodType = xdc.module("ti.sysbios.interfaces.ITimer").PeriodType_COUNTS;
ti_sysbios_timers_timer64_Timer0Params.extFreq.lo = 0;
ti_sysbios_timers_timer64_Timer0Params.period = 2000;
ti_sysbios_timers_timer64_Timer0Params.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
ti_sysbios_timers_timer64_Timer0Params.half = ti_sysbios_timers_timer64_Timer.Half_LOWER;
Program.global.ti_sysbios_timers_timer64_Timer0 = ti_sysbios_timers_timer64_Timer.create(1, null, ti_sysbios_timers_timer64_Timer0Params);
If we use Timer_getCount API to get the counter value of timer but the counter value next time not starting from zero instead of that it decreases from my period value.
How can I configure timer as counter and also how to calculate frequency from counter value?