Other Parts Discussed in Thread: SYSBIOS, OMAPL138
I am using SYS/BIOS 6.35.4.50 and XDCTools version 3.25.3.72 with Da Vinci SOC (DM8147).
I see that timer is not consistently working. It works fine most of the time. Task_sleep() wake up is not consistent sometimes. It is completely out of range when it wakes out of sleep. For one second, it can take 10 minutes. But it is not all the time. I was trying to debug the problem.
In the debugger, RTOS Object View (ROV), I sometimes see Timer object period changing. Sometimes it is 19999. Sometimes it is random number like 4294965241. I also saw 199990. I was thinking Timer.period should always be same. From ROV, this is the values in 'Basic': name GPTimer1, StartMode_AUTO, RunMode_DYNAMIC, period 19999, periodType_COUNTS, intNum 67.
I am not doing anything in the code for using timer(guessing SYS/BIOS to handle timer registers etc) other than using Task_sleep(100).
In app.cfg:
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
var Timestamp = xdc.useModule("xdc.runtime.Timestamp");
var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
var TimestampProvider = xdc.useModule('ti.sysbios.timers.dmtimer.TimestampProvider');
var ti_sysbios_hal_Timer = xdc.useModule('ti.sysbios.hal.Timer');
Timestamp.SupportProxy = TimestampProvider;
Clock.tickPeriod = 1000; //for milliseconds
Clock.tickMode = Clock.TickMode_DYNAMIC;
Timer.intFreq.hi = 0;
Timer.intFreq.lo = 20000000;
Timer.checkFrequency =true;
Program.argSize = 0x0;
BIOS.clockEnabled = true;
BIOS.libType = BIOS.LibType_Custom;
BIOS.assertsEnabled = false;
BIOS.logsEnabled = false;
//CPU at 1Ghz
BIOS.cpuFreq.hi = 0;
BIOS.cpuFreq.lo = 1000000000;