Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI C/C++ Compiler
Hi all,
Timer 2 is used for SYS/BIOS by default according to the TRM of TMS320F28388D, as follows:
Is it necessary to configure Timer 2 explicitly in script, just like the code below?
/*
* Create a timer instance to generate a periodic interrupts.
*
* Timer ID : 2 (CPU TIMER2 Interrupt (forTI/RTOS use))
*
* Core Priority: 18
*
* The timer will be started within the BIOS_start()
* thread
*/
var Timer = xdc.useModule('ti.sysbios.family.c28.Timer');
var timerParams = new Timer.Params();
timerParams.startMode = Timer.StartMode_AUTO;
timerParams.runMode = Timer.RunMode_CONTINUOUS;
/* Timer period is 1 milisecond (1,000 uSeconds) */
timerParams.period = 1000;
timerParams.periodType = Timer.PeriodType_MICROSECS;
timerParams.emulationModeInit.free = 1;
var myTimer = Timer.create(2, '&OS_1ms_ISR', timerParams);
Another question, there are 3 Timer for TMS320F28388D, i.e. Timer0/1/2. How does the SYS/BIOS know which Timer is selected for time base reference?
In other words, I confogure two timers, TIMER0/2, in script file just like this:
var Timer = xdc.useModule('ti.sysbios.family.c28.Timer');
var timerParams = new Timer.Params();
timerParams.startMode = Timer.StartMode_AUTO;
timerParams.runMode = Timer.RunMode_CONTINUOUS;
/* Timer period is 1/2 second (500,000 uSeconds) */
timerParams.period = 100;
timerParams.periodType = Timer.PeriodType_MICROSECS;
var myTimer = Timer.create(0, '&OS_100us_ISR', timerParams);
var Timer = xdc.useModule('ti.sysbios.family.c28.Timer');
var timerParams = new Timer.Params();
timerParams.startMode = Timer.StartMode_AUTO;
timerParams.runMode = Timer.RunMode_CONTINUOUS;
/* Timer period is 1 milisecond (1,000 uSeconds) */
timerParams.period = 1000;
timerParams.periodType = Timer.PeriodType_MICROSECS;
timerParams.emulationModeInit.free = 1;
var myTimer = Timer.create(2, '&OS_1ms_ISR', timerParams);
Then which timer is selected for SYS/BIOS use?
Thanks.