EasyManuals Logo

Texas Instruments TMS320 User Manual

Texas Instruments TMS320
288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #178 background imageLoading...
Page #178 background image
Timers, Interrupts, and the System Clock
4-74
To do the same thing on C28x platforms with a 40 MIPS processor using the
CPU to drive the clock, the period register value is:
Period = 0.001 sec * 40,000,000 cycles per second = 40,000
4.9.2 System Clock
Many DSP/BIOS functions have a timeout parameter. DSP/BIOS uses a
system clock to determine when these timeouts should expire. The system
clock tick rate can be driven using either the low-resolution time or an external
source.
The TSK_sleep function is an example of a function with a timeout parameter.
After calling this function, its timeout expires when a number of ticks equal to
the timeout value have passed in the system clock. For example, if the
system clock has a resolution of 1 microsecond and we want the current task
to block for 1 millisecond, the call should look like this:
/* block for 1000 ticks * 1 microsecond = 1 msec */
TSK_sleep(1000)
Note:
Do not call TSK_sleep or SEM_pend with a timeout other than 0 or
SYS_FOREVER if the program is configured without something to drive the
PRD module. In a default configuration, the CLK module drives the PRD
module.
If you are using the default CLK configuration, the system clock has the same
value as the low-resolution time because the PRD_clock CLK object drives
the system clock.
There is no requirement that an on-device timer be used as the source of the
system clock. An external clock, for example one driven by a data stream
rate, can be used instead. If you do not want the on-device timer to drive the
low-resolution time, destroy the CLK object named PRD_clock in the
configuration script. If an external clock is used, it can call PRD_tick to
advance the system clock. Another possibility is having an on-device
peripheral such as the codec that is triggering an interrupt at regular intervals,
call PRD_tick from that interrupt’s HWI. In this case, the resolution of the
system call is equal to the frequency of the interrupt that is calling PRD_tick.

Table of Contents

Other manuals for Texas Instruments TMS320

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320 and is the answer not in the manual?

Texas Instruments TMS320 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320
CategoryComputer Hardware
LanguageEnglish

Related product manuals