CLK Module
Application Program Interface
2-43
CLK Functions
The CLK functions performed when a timer interrupt occurs are
performed in the context of the hardware interrupt that caused the system
clock to tick. Therefore, the amount of processing performed within CLK
functions should be minimized and these functions can only invoke
DSP/BIOS calls that are allowable from within an HWI.
Note:
CLK functions should not call HWI_enter and HWI_exit as these are
called internally by DSP/BIOS when it runs CLK_F_isr. Additionally,
CLK functions should
not
use the
interrupt
keyword or the
INTERRUPT pragma in C functions.
CLK Manager
Properties
The following global properties can be set for the CLK module in the CLK
Manager Properties dialog of the DSP/BIOS Configuration Tool or in a
Tconf script:
❏
Object Memory
. The memory segment that contains the CLK
objects created in the configuration.
Tconf Name: OBJMEMSEG
Type: Reference
Example:
bios.CLK.OBJMEMSEG = prog.get("myMEM");
❏
CPU Interrupt
. Shows which HWI interrupt is used to drive the timer
services. The value is changed automatically when you change the
Timer Selection. This is an informational property only.
Tconf Name: N/A
❏
Timer Selection
. The on-device timer to use. Changing this setting
also automatically changes the CPU Interrupt used to drive the timer
services and the function property of the relevant HWI objects.
Tconf Name: TIMERSELECT
Type: String
Options:
"Timer 0", "Timer 1" (exception: "Timer 5" and "Timer
6" for OMAP 2420)
Example:
bios.CLK.TIMERSELECT = "Timer 0";
❏
Base Address of Timers in IO Space
. This property points to the
address of GP timer 5 within the DSP address space. This location is
set by the DSP MMU configuration shown in Section D.2.2,
. The locations of timers 6 and 7 are determined by
adding 0x0400 and 0x0800 respectively to the base address. (OMAP
2420 only)
Tconf Name: TIMERS_BASE
Type: Numeric
Example:
bios.CLK.TIMERS_BASE = 0x07000;