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 #130 background imageLoading...
Page #130 background image
Software Interrupts
4-26
4.3.1 Creating SWI Objects
As with many other DSP/BIOS objects, you can create SWI objects either
dynamically (with a call to SWI_create) or statically (in the configuration).
Software interrupts you create dynamically can also be deleted during
program execution.
To add a new software interrupt to the configuration, create a new SWI object
in the .tcf configuration file. Set the function property for each software
interrupt to run a function when the object is triggered by the application. You
can also configure up to two arguments to be passed to each SWI function.
You can determine from which memory segment SWI objects are allocated.
SWI objects are accessed by the SWI Manager when software interrupts are
posted and scheduled for execution.
The DSP/BIOS online help describes SWI objects and their properties. See
SWI Module in the TMS320 DSP/BIOS API Reference Guide for your
platform for reference information on the SWI module API calls.
To create a software interrupt dynamically, use a call with this syntax:
swi = SWI_create(attrs);
Here, swi is the interrupt handle and the variable attrs points to the SWI
attributes. The SWI attribute structure (of type SWI_Attrs) contains all those
elements that can be statically configured for an SWI. attrs can be NULL, in
which case, a default set of attributes is used. Typically, attrs contains at least
a function for the handler.
Note:
SWI_create can only be called from the task level, not from an HWI or
another SWI.
SWI_getattrs can be used to retrieve all the SWI_Attrs attributes. Some of
these attributes can change during program execution, but typically they
contain the values assigned when the object was created.
SWI_getattrs(swi, attrs);

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