Part Number:DRA71
Tool/software: TI-RTOS
Hi
We meet a probleam aboout the timer.
(1) In the Uboot , the timer 2 was used .
(2) In the DSP(C66) project , the timer 2 was configured in the C66.cfg.
Some times , the modules use the timer2 would be timeout , we doubt that it confilect with the timer 2 in the C66.cfg.
I hav teh questions :
(1)What the timer configure in c66. cfg ued for?
(2)As in our project ,we also develop ipu ,why there are no timers configure in IPU.cfg?
(3) I had try to change the timer id in the c66.cfg, errors would happen during building. (.Instance#1 : Timer device unavailable.)
(4) Do you have some materials about the SYS/BIOS cfg files?
cfg file:
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Task = xdc.useModule("ti.sysbios.knl.Task");
var Idle = xdc.useModule("ti.sysbios.knl.Idle");
var BIOS = xdc.useModule("ti.sysbios.BIOS");
var Startup = xdc.useModule("xdc.runtime.Startup");
var SysStd = xdc.useModule("xdc.runtime.SysStd");
var System = xdc.useModule("xdc.runtime.System");
System.SupportProxy = SysStd;
var Log = xdc.useModule("xdc.runtime.Log");
var Assert = xdc.useModule("xdc.runtime.Assert");
var Program = xdc.useModule("xdc.cfg.Program");
var Main = xdc.useModule("xdc.runtime.Main");
var Memory = xdc.useModule("xdc.runtime.Memory");
var Diags = xdc.useModule("xdc.runtime.Diags");
var Semaphore = xdc.useModule("ti.sysbios.knl.Semaphore");
var HeapMem = xdc.useModule("ti.sysbios.heaps.HeapMem");
var HeapBuf = xdc.useModule("ti.sysbios.heaps.HeapBuf");
var Clock = xdc.useModule("ti.sysbios.knl.Clock");
var Timestamp = xdc.useModule("xdc.runtime.Timestamp");
var Load = xdc.useModule('ti.sysbios.utils.Load');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var Queue = xdc.useModule('ti.sysbios.knl.Queue');
var SyncSem = xdc.useModule('ti.sysbios.syncs.SyncSem');
var Cache = xdc.useModule('ti.sysbios.hal.Cache');
var halCore = xdc.useModule('ti.sysbios.hal.Core');
var GateH = xdc.useModule('xdc.runtime.knl.GateH');
var Event = xdc.useModule('ti.sysbios.knl.Event');
var biosGates = xdc.useModule('ti.sysbios.gates.GateTask');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
BIOS.cpuFreq.hi = 0;
BIOS.cpuFreq.lo = 500000000;
/***********************************************
* Reset Module Configuration *
***********************************************/
//var Reset = xdc.useModule("xdc.runtime.Reset");
//Reset.fxns[Reset.fxns.length++] = "&Utils_dspMPUConfig";
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var ti_sysbios_family_c64p_Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Startup = xdc.useModule('xdc.runtime.Startup');
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
var Memory = xdc.useModule('xdc.runtime.Memory');
var BiosCache = xdc.useModule('ti.sysbios.hal.Cache');
var ti_sysbios_family_c66_Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
//var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
var EventCombiner = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
var Exception = xdc.useModule('ti.sysbios.family.c64p.Exception');
var System = xdc.useModule('xdc.runtime.System');
var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
var Idle = xdc.useModule('ti.sysbios.knl.Idle');
var Load = xdc.useModule('ti.sysbios.utils.Load');
//Program.sectMap[".vecs"] = "L2SRAM_CODE";
//Task.defaultStackSize = 0x40000;
//Program.stack = 0x40000;
BIOS.heapSize = 0x100000;
//Program.heap = 0x40000;
//BIOS.libType = BIOS.LibType_Instrumented;
/* BIOS library type, same setting is used by IPC as well */
//BIOS.libType = BIOS.LibType_Custom;
BIOS.libType = BIOS.LibType_Debug;
//BIOS.libType = BIOS.LibType_Instrumented;
/* load calculation related settings */
if(BIOS.libType==BIOS.LibType_NonInstrumented)
{
/* cannot enable these load measurement in non-instrumented libraries */
Load.swiEnabled = false;
Load.hwiEnabled = false;
Load.taskEnabled = false;
}
else
{
Load.swiEnabled = true;
Load.hwiEnabled = true;
Load.taskEnabled = true;
}
Clock.tickMode = Clock.TickMode_PERIODIC;
Clock.tickSource = Clock.TickSource_USER;
var TimerSupport = xdc.useModule('ti.sysbios.family.shared.vayu.TimerSupport');
TimerSupport.availMask = 0x0003;
/***********************************************
* Timer Module Configuraion *
***********************************************/
var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
Timer.intFreq.hi = 0;
/* system clock runs at 20 MHz */
Timer.intFreq.lo = 20000000;
Timer.checkFrequency = false;
var timerParams = new Timer.Params();
timerParams.period = 1000;
timerParams.twer.ovf_wup_ena = 1;
timerParams.tiocpCfg.emufree = 1;
timerParams.tsicr.posted = 0;
Timer.create(0, '&mainDsp1TimerTick', timerParams);
var DMTimer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
DMTimer.checkFrequency = false;
var timerParams2 = new DMTimer.Params();
timerParams2.tsicr.posted = 0;
DMTimer.intFreq.hi = 0;
DMTimer.intFreq.lo = 20000000;
var DMTimestampProvider = xdc.useModule("ti.sysbios.timers.dmtimer.TimestampProvider");
DMTimestampProvider.timerId = 1;
DMTimestampProvider.useClockTimer = false;
var Timestamp = xdc.useModule("xdc.runtime.Timestamp");
Timestamp.SupportProxy = DMTimestampProvider;