Operation
Initialization
Prior to using the timer service, it must be initialized. The following frag-
ment initializes the service.
ADI_TMR_RESULT Result;
Result = adi_tmr_Init(NULL);
Upon completion of this function, the timer service is initialized and
ready for use. This function does not alter the timers in any way but sim-
ply initialized internal data structures.
Opening a Timer
After the service is initialized, any timers that you need to use can be
opened. In this example, two general-purpose timers, the core timer, and
watchdog timer are opened
Result = adi_tmr_Open(ADI_TMR_GP_TIMER_0);
Result = adi_tmr_Open(ADI_TMR_GP_TIMER_1);
Result = adi_tmr_Open(ADI_TMR_CORE_TIMER);
Result = adi_tmr_Open(ADI_TMR_WDOG_TIMER);
The open function opens the timer for use and resets the timer to its
power-up values, clearing any pending status, and so on.
Configuring a Timer
After the timer is opened, the timer can be configured. The
adi_tmr_GPControl()
adi_tmr_WatchdogControl()
general-purpose timers, core timers, and the watchdog timers,
respectively.
8-10
,
adi_tmr_CoreControl()
functions are used to configure
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
// return value
and
Need help?
Do you have a question about the VisualDSP++ 5.0 and is the answer not in the manual?