package ti.sysbios.timers |
|
Contains various timer modules
This package contains Timer modules that manage the timer peripherals
available on various devices. For the IDs, names, and base addresses of
supported devices, see the following Timer Mapping Tables:
[
more ... ]
package ti.sysbios.timers [2, 0, 0, 0] {
}
DETAILS
This package contains Timer modules that manage the timer peripherals
available on various devices. For the IDs, names, and base addresses of
supported devices, see the following Timer Mapping Tables:
The Timer modules let you use and configure various timers that exist
on a particular device. This is achieved by specifying a timer ID when
calling Timer_create().
By default, the
ti.sysbios.knl.Clock module statically configures
a
ti.sysbios.hal.Timer
timer instance to provide the periodic 1 ms tick interrupt. If you
want to use a custom configured timer for the Clock module's tick source,
use the following example configuration as a guide:
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
// Tell the Clock module that YOU are providing the periodic interrupt
Clock.tickSource = Clock.TickSource_USER;
// this example uses the ti.sysbios.timers.dmtimer.Timer module
var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
// create a dmtimer config parameter object
var timerParams = new Timer.Params();
// make sure you set the period to 1000 us (1ms)
timerParams.period = 1000;
// custom dmtimer config parameters here...
timerParams.twer.ovf_wup_ena = 1;
// Create the timer.
// This example uses timer id 3.
// The timer interrupt handler must be set to 'Clock.tick'.
Timer.create(3, Clock.tick, timerParams);
generated on Sat, 19 Jan 2019 15:38:16 GMT