Texas Instruments TMS320 User Manual page 107

Dsp/bios v5.40
Hide thumbs Also See for TMS320:
Table of Contents

Advertisement

shorter deadlines. See Section 4.2, Hardware Interrupts, page 4-11, for
details about hardware interrupts.
❏ Software interrupts (SWI). Patterned after hardware interrupt (HWIs).
While HWIs are triggered by a hardware interrupt, software interrupts are
triggered by calling SWI functions from the program. Software interrupts
provide additional priority levels between hardware interrupts and TSKs.
SWIs handle threads subject to time constraints that preclude them from
being run as tasks, but whose deadlines are not as severe as those of
hardware ISRs. Like HWI's, SWI's threads always run to completion.
Software interrupts should be used to schedule events with deadlines of
100 microseconds or more. SWIs allow HWIs to defer less critical
processing to a lower-priority thread, minimizing the time the CPU
spends inside an interrupt service routine, where other HWIs can be
disabled. See Section 4.3, Software Interrupts, page 4-25, for details
about software interrupts.
❏ Tasks (TSK). Tasks have higher priority than the background thread and
lower priority than software interrupts. Tasks differ from software
interrupts in that they can wait (block) during execution until necessary
resources are available. DSP/BIOS provides a number of structures that
can be used for inter task communication and synchronization. These
structures include queues, semaphores, and mailboxes. See Section 4.4,
Tasks, page 4-39, for details about tasks.
❏ Background thread. Executes the idle loop (IDL) at the lowest priority in
a DSP/BIOS application. After main returns, a DSP/BIOS application
calls the startup routine for each DSP/BIOS module and then falls into the
idle loop. The idle loop is a continuous loop that calls all functions for the
IDL objects. Each function must wait for all others to finish executing
before it is called again. The idle loop runs continuously except when it is
preempted by higher-priority threads. Only functions that do not have
hard deadlines should be executed in the idle loop. See Section 4.5, The
Idle Loop, page 4-49, for details about the background thread.
There are several other kinds of functions that can be performed in a
DSP/BIOS program. These are performed within the context of one of the
thread types in the previous list.
❏ Clock (CLK) functions. Triggered at the rate of the on-device timer
interrupt. By default, these functions are triggered by a hardware interrupt
and are performed as HWI functions. See Section 4.9, Timers, Interrupts,
and the System Clock, page 4-71, for details.
❏ Periodic (PRD) functions. Performed based on a multiple of either the
on-device timer interrupt or some other occurrence. Periodic functions
are a special type of software interrupt. See Section 4.10, Periodic
Function Manager (PRD) and the System Clock, page 4-76, for details.
Overview of Thread Scheduling
Thread Scheduling
4-3

Advertisement

Table of Contents
loading

Table of Contents