Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers
should obtain the latest relevant information before placing orders and should verify that such information is current and com plete. All
products are sold subject to TI's terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI's standard
warranty. Testing and other qualit y control techniques are used to the extent TI deems necessary to support this warranty. Except where
mandated by government requirements, testing of all parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate
design and operating safeguards.
TI does not warrant or represent that any licens e, either ex press or implied, is granted under any TI patent right, copyright, mask work
right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used.
Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services
or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual
property of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied
by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive
business practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional
restrictions.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids
all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not
responsible or liable for any such statements.
TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonably
be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governin g
such use. Buyers represent that they have all necessary expertise in the safety and regulatory r amifications of their applications, and
acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their products
and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may
be provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products
in such safety-critical applications.
TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are
specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military
specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely
at the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use.
TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are
designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they u se any non-designated
products in automotive applications, TI will not be responsible for any failure to meet such requirements.
Following are URLs where you can obtain information on other Texas Instruments products and application solutions:
Products Applications
Amplifiersamplifier.ti.comAudiowww.ti.com/audio
Data Convertersdataconverter.ti.comAutomotivewww.ti.com/automotive
DSPdsp.ti.comBroadbandwww.ti.com/broadband
Interfaceinterface.ti.comDigital Controlwww.ti.com/digitalcontrol
Logiclogic.ti.comMilitarywww.ti.com/military
Power Mgmtpower.ti.comOptical Networkingwww.ti.com/opticalnetwork
Microcontrollersmicrocontroller.ti.comSecuritywww.ti.com/security
RFIDwww.ti-rfid.comTelephonywww.ti.com/telephony
Low Power Wirelesswww.ti.com/lpwVideo & Imagingwww.ti.com/video
Wirelesswww.ti.com/wireless
DSP/BIOS gives developers of mainstream applications on Texas
Instruments TMS320C5000
real-time s oftw are. DS P/BIOS provid es a sma ll fir mware real- time li brar y and
easy-to-use tools for real-time tracing and analysis.
You should read and become fam iliar with the TMS320 DSP/BIOS User ’sGuide, a companion volume to this API reference guide.
Before you read this manual, you may use the Code Composer Studio online
tutorial and the DSP/BIOS sec tion of the online help to get an overview of
DSP/BIOS. This man ual discusses various aspects of DSP/ BIOS in depth
and assumes that you have at least a basic understanding of DSP/BIOS.
Notational Conventions
This document uses the following conventions:
❏Program listings, program examples, and interactive displays are shown
in a special typeface. Examples use a bold version of the
special typeface for emphasis; interactive displays use a bold version
of the special typeface to distinguish commands that you enter from items
that the system displays (such as prompts, command output, error
messages, etc.).
Here is a sample program listing:
TM
DSP devices the ability to develop embedded
Void copy(HST_Obj *input, HST_Obj *output)
{
PIP_Obj *in, *out;
Uns *src, *dst;
Uns size;
}
iii
Related Documentation From Texas Instruments
❏Square brackets ( [ and ] ) identify an optional parameter. If you use an
optional parameter, you specify the information within the brackets.
Unless the square brackets are in a bold typeface, do not enter the
brackets themselves.
Related Documentation From Texas Instruments
The following books des c ribe T M S3 20 de vi c es and re late d s upp or t too ls. To
obtain a copy of any of these TI documents, call the Texas Instruments
Literature Response Center at (800) 477-8924. When ordering, please
identify the book by its title and literature number.
TMS320 DSP/BIOS User's Guide (literature number SPRU423) provides an over-
view and description of the DSP/BIOS real-time operating system.
TMS320C55x Optimizing C Compiler User’s Guide (literature number
SPRU281) describes the C55x C compiler. This C compiler accepts ANSI
standard C source code and produc es TMS3 20 as s embl y langu age s ourc e
code for the C55x generation of devices.
TMS320C55x Programmer's Guide (literature number SPRU376) describes
ways to optimize C and assembly code for the TMS320C55x DSPs and
includes application program examples.
TMS320C55x Code Composer Studio Tutorial Online Help (literature number
Related Documentation
You can use the following books to supplement this reference guide:
The C Programming Language (second edition), by Brian W. Kernighan
and Dennis M. Ritc hie, published by Prentice-Ha ll, Englewood Cliffs, New
Jersey, 1988
Programming in C, Kochan, Steve G., Hayden Book Company
Programming Embedded Systems in C and C++, by Michael Barr, Andy
Oram (Editor), published by O'Reilly & Associates; ISBN: 1565923545,
February 1999
Real-Time Systems, by Jane W. S. Liu, published by Pre ntice Hall; ISBN:
013099651, June 2000
SPRH097) introduces the Code Composer Studio integrated developme nt
environment and software tools. Of special interest to DSP/BIOS us ers are
the Using DSP/BIOS lessons.
iv
Trademarks
Trademarks
Principles of Concurrent and Distributed Programming (Prentice Hall
International Series in Computer Science), by M. Ben-Ari, published by
Prentice Hall; ISBN: 013711821X, May 1990
American National Standard for Information Systems-Programming
Language C X3.159-1989, American National Standards Institute (ANSI
standard for C); (out of print)
MS-DOS, Windows, and Windows NT are trademarks of Microsoft
Corporation.
The Texas Instruments logo and Texas Instruments are registered
trademarks of Texas Instruments. Trademarks of Texas Instruments include:
TI, XDS, Code Composer, Code Composer Studio, Probe Point, Code
Explorer, DSP/BIOS, RTDX, Online DSP Lab, BIOSuite, SPOX, TMS320,
TMS320C28x, TMS320C54x, TMS320C55x, TMS320C62x, TMS320C64x,
TMS320C67x, TMS320C5000, and TMS320C6000.
All other brand or product names are trademarks or registered trademarks of
their respective companies or organizations.
This appendix provides tables describing the TMS320C55x register conventions in terms of preservation across multi-threaded context switching and preconditions.
ATM ModuleAtomic functions written in assembly language
BUF ModuleMaintains buf fer poo ls of fixed size buffers
C55 ModuleTarget-specific functi ons
CLK ModuleSystem clock manager
DEV Module Device driver interface
GBL Module Global setting manager
GIO ModuleI/O module used with IOM mini-drivers
HOOK Module Hook function manager
HST Module Host channel manager
HWI ModuleHardware interrupt manager
IDL Module Idle function and processing loop manager
LCK Module Resource lock manager
LOG Module Event Log manager
MBX Module Mailboxes manager
MEM Module Memory manager
MSGQ ModuleVariable-length message manager
PIP Module Buffered pipe manager
POOL ModuleAllocator interface module
PRD Module Periodic function manager
PWRM ModuleReduce a pplication’s power consumption
QUE Module Queue manager
RTDX Module Real-time data exchange manager
SEM Module Semaphores manager
SIO Module Stream I/O manager
STS Module Statistics object manager
SWI Module Software interrupt manager
SYS Module System services manager
TRC Module Trace manager
TSK Module Multitasking manager
std.h and stdlib.h functions Standard C library I/O functions
1-2
1.2Naming Conventions
The format for a DSP/BIO S operation name is a 3- or 4-letter prefix for
the module that contains the operation, an underscore, and the action.
1.3Assembly Language Interface Overview
The assembly interface that was provided for some of the DSP/BIOS
APIs has been deprecated. They are no longer documented.
Assembly functions ca n c all C fun ctions . Re mem ber that the C compiler
adds an underscore prefix to function names, so when calling a C
function from assembly, add an underscore to the begin ning of the C
function name. For example, call _myfunction instead of myfunction. See
the TMS320C55x Optimizing Compiler User’s Guide for more details.
When you are using the DSP/BIOS Configuration Tool, use a leading
underscore before the name of any C function you configure. (The
DSP/BIOS Configuration Tool generates assembly code, but does no t
add the underscore automatically.) If you are using Tconf, do not add an
underscore before the function name; Tconf internally adds the
underscore needed to call a C function from assembly.
Naming Conventions
All DSP/BIOS APIs follow standard C calling conventions as documented
in the C programmer’s guide for the device you are using.
DSP/BIOS APIs save and restore context for each thread during a
context switch. Your code should simply follow standard C register usage
conventions. Code written in assembly language should be written to
conform to the regis ter usage model speci fied in th e C comp iler ma nual
for your device . When writing assem bly language, take spe cial care to
make sure the C context is pre served. For example, if you chan ge the
AMR register on the ‘C6000, you should be sure to change it back before
returning from your assembly language routine. See the Register Usage
appendix in this book to see how DSP/BIOS uses specific registers.
1.4DSP/BIOS Tconf Overview
The section descr ibing eac h modul es in th is man ual li sts proper ties tha t
can be configured in Tconf scripts, along with their types and default
values. The sections on manager properties and instance properties also
provide Tconf examples that set each property.
For details on Tconf scripts, see the DSP/BIOS Tconf User’s Guide
(SPRU007). The language used is JavaScript with an object model
specific to the needs of DSP/BIOS configuration.
API Functional Overview1-3
DSP/BIOS Tconf Overview
In general, property names of Module objects are in all uppercase letters.
For example, "STACKSIZE". Prope rty names of Instan ce objects begin
with a lowercase word. Subsequent words have their first letter
capitalized. For exampl e, "s tackS ize" .
Default values for many properties are dependent on the values of other
properties. The defau lts shown are those that apply if related proper ty
values have not been modi fied. De fault val ues fo r many H WI pr operties
are different for each instance.
The data types shown for th e pr o per ties ar e n ot u sed as syn tax in Tconf
scripts. However, they do indicate the type of valu es that are valid for
each property. The types used are as follows:
❏Arg. Arg properties hold ar guments to pass to program functions.
They may be strings, integers, labels, or other types as neede d by
the program function.
❏Bool. You may assign a valu e of either true or 1 to set a Boolea n
property to true. You may assign a value of either false or 0 (zero) to
set a Boolean property to false. Do not set a Boolean property to the
quoted string "true" or "false".
❏EnumInt. Enumerated integer properties accept a set of valid integer
values. These values are displayed in a drop-down list in the
DSP/BIOS Configuration Tool.
❏EnumString. Enumerated string properties accept certain string
values. These values are displayed in a drop-down list in the
DSP/BIOS Configuration Tool.
❏Extern. Properti es that hol d function name s use the Ext ern type. I n
order to specify a fu nction Extern, u se the prog.extern( ) method as
shown in the examples to refer to objects defined as asm, C, or C++
language symbols. The default language is C.
❏Int16. Integer properties hold 16-bit unsigned integer values. The
value range accepted for a property may have additional limits.
❏Int32. Long integ er properties hold 32-bit unsigned integer values.
The value range accepted for a property may have additional limits.
❏Numeric. Numeric properties hold either 32-bit si gned or unsigned
values or decimal values, as appropriate for the property.
❏Reference. Properties that reference other configures objects
contain an object reference. Use the prog .get() method to specify a
reference to another object.
❏String. S tring properties hold text strings.
1-4
List of Operations
1.5List of Operations
Table 1-2. DSP/BIOS Operations
ATM module operations
FunctionOperation
ATM_andi, ATM_anduAtomically AND memory location with mask and return previous value
ATM_cleari, ATM_clearuAtomically clear memory location and return previous value
ATM_deci, ATM_decuAtomically decrement memory and return new value
ATM_inci, ATM_incuAtomically increment memory and return new value
ATM_ori, ATM_oruAtomically OR memory location with mask and return previous value
ATM_seti, ATM_setuAtomically set memory and return previous value
BUF module operations
FunctionOperation
BUF_allocAllocate a fixed memory buffer out of the buffer pool
BUF_createDynamically create a buffer pool
BUF_deleteDelete a dynamically created buffer pool
BUF_freeFree a fixed memory buffer into the buffer pool
BUF_maxbuffCheck the maximum number of buffers used from the buffer pool
BUF_statDetermine the status of a buffer pool (buffer size, number of free buffe rs, total
number of buffers in the pool)
C55 operations
FunctionOperation
C55_disableIER0,
C55_disableIER1,
C55_disableInt
C55_enableIER0,
C55_enableIER1,
C55_enableInt
C55_l2AckIntAcknowledge an L2 interrupt (OMAP 2320/2420 only)
Disable certain maskable interrupts
Enable certain maskable interrupts
API Functional Overview1-5
List of Operations
FunctionOperation
C55_l2DisableMIR,
C55_l2DisableMIR1
C55_l2EnableMIR,
C55_l2EnableMIR1
C55_l2SetIntPrioritySet the priority of an L2 interrupt (OMAP 2320/2420 only)
C55_plugC function to plug an interrupt vector
Disable certain level 2 interrupts (OMAP 2320/2420 only)
Enable certain level 2 interrupts (OMAP 2320/2420 only)
CLK module operations
FunctionOperation
CLK_countspmsNumber of hardware timer counts per millisecond
CLK_cpuCyclesPerHtimeReturn multiplier for converting high-res time to CPU cycles
CLK_cpuCyclesPerLtimeReturn multiplier for converting low-res time to CPU cycles
CLK_gethtimeGet high-resolution time
CLK_getltimeGet low-resolution time
CLK_getprdGet period register value
CLK_reconfigReset timer period and registers
CLK_startRestart the low-resolution timer
CLK_stopHalt the low-resolution timer
DEV module operations
FunctionOperation
DEV_createDeviceDynamically creates device with user-defined parameters
DEV_deleteDeviceDeletes the dynamically created device
DEV_matchMatch a device name with a driver
Dxx_closeClose device
Dxx_ctrlDevice control operation
Dxx_idleIdle device
Dxx_initInitialize device
1-6
FunctionOperation
Dxx_issueSend a buffer to the device
Dxx_openOpen device
Dxx_readyCheck if device is ready for I/O
Dxx_reclaimRetrieve a buffer from a device
DGN DriverSoftware generator driver
DGS DriverStackable gather/scatter driver
DHL DriverHost link driver
DIO DriverClass driver
DNL DriverNull driver
DOV DriverStackable overlap driver
DPI DriverPipe driver
DST DriverStackable split driver
List of Operations
DTR DriverStackable streaming transformer driver
GBL module operations
FunctionOperation
GBL_getClkinGet configured value of board input clock in KHz
GBL_getFrequencyGet current frequency of the CPU in KHz
GBL_getProcIdGet configured processor ID used by MSGQ
GBL_getVersionGet DSP/BIOS version information
GBL_setFrequencySet frequency of CPU in KHz for DSP/BIOS
GBL_setProcIdSet configured value of processor ID used by MSGQ
API Functional Overview1-7
List of Operations
GIO module operations
FunctionOperation
GIO_abortAbort all pending input and output
GIO_controlDevice-specific control call
GIO_createAllocate and initialize a GIO object
GIO_deleteDelete underlying IOM mini-drivers and free GIO object and its structure
GIO_flushDrain output buffers and discard any pending input
GIO_newInitialize a pre-allocated GIO object
GIO_readSynchronous read command
GIO_submitSubmit a GIO packet to the mini-driver
GIO_writeSynchronous write comm and
HOOK module operations
FunctionOperation
HOOK_getenvGet environment pointer for a given HOOK and TSK combination
HOOK_setenvSet envir onment pointer for a given HOOK and TSK combination
HST module operations
FunctionOperation
HST_getpipeGet corresponding pipe object
HWI module operations
FunctionOperation
HWI_disableGlobally disable hardware interrupts
HWI_dispatchPlugPlug the HWI dispatcher
HWI_enableGlobally enable hardware interrupts
HWI_enterHardware interrupt service routine prolog
1-8
FunctionOperation
HWI_exitHardware interrupt service routine epilog
HWI_isHWICheck to see if called in the context of an HWI
HWI_restoreRestore global interrupt enable state
IDL module operations
FunctionOperation
IDL_runMake one pass through idle functions
LCK module operations
FunctionOperation
LCK_createCreate a resource lock
LCK_deleteDelete a resource lock
LCK_pendAcquire ownership of a resource lock
List of Operations
LCK_postRelinquish ownership of a resource lock
LOG module operations
FunctionOperation
LOG_disableDisable a log
LOG_enableEnable a log
LOG_error/LOG_messageWrite a message to the system log
LOG_eventAppend an unformatted message to a log
LOG_printfAppend a formatted message to a message log
LOG_resetReset a log
API Functional Overview1-9
List of Operations
MBX module operations
FunctionOperation
MBX_createCreate a mailbox
MBX_deleteDelete a mailbox
MBX_pendWait for a message from mailbox
MBX_postPost a message to mailbox
MEM module operations
FunctionOperation
MEM_alloc, MEM_valloc,
MEM_calloc
MEM_defineDefine a new memory heap
MEM_freeFree a block of memory
MEM_getBaseAddressGet base address of a memory heap
MEM_increaseTableSizeIncrease the internal MEM table size
MEM_redefineRedefine an existing memory heap
MEM_statReturn the status of a memory heap
MEM_undefineUndefine an existing memory segment
Allocate from a memory heap
MSGQ module operations
FunctionOperation
MSGQ_allocAllocate a message. Performed by writer.
MSGQ_closeCloses a message queue. Performed by reader.
MSGQ_countReturn the number of messages in a message queue
MSGQ_freeFree a message. Performed by reader.
MSGQ_getReceive a message from the message queue. Performed by reader.
MSGQ_getAttrsGet attributes of a message queue.
MSGQ_getDstQueueGet destination message queue field in a message.
1-10
FunctionOperation
MSGQ_getMsgIdReturn the message ID from a message.
MSGQ_getMsgSizeReturn the message size from a message.
MSGQ_getSrcQueueExtract the reply destination from a message.
MSGQ_isLocalQu eueReturn whether queue is local.
MSGQ_locateSynchronously find a message queue. Performed by writer.
MSGQ_locateAsyncAsynchronously find a message queue. Performed by writer.
MSGQ_openOpens a message queue. Performed by reader.
MSGQ_putPlace a message on a message queue. Performed by writer.
MSGQ_releaseRelease a located message queue. Performed by writer.
MSGQ_setErrorHandlerSet up handling of internal MSGQ errors.
MSGQ_setMsgIdSets the message ID in a message.
MSGQ_setSrcQueueSets the reply destination in a message.
List of Operations
PIP module operations
FunctionOperation
PIP_allocGet an empty frame from a pipe
PIP_freeRecycle a frame that has been read back into a pipe
PIP_getGet a full frame from a pipe
PIP_getReaderAddr
PIP_getReaderNumFramesGet the number of pipe frames available for reading
PIP_getReaderSizeGet the number of words of data in a pipe frame
PIP_getWriterAddr
PIP_getWriterNumFramesGet the number of pipe frames available to be written to
PIP_getWriterSizeGet the number of words that can be written to a pipe frame
PIP_peekGet the pipe frame size and address without actually claiming the pipe frame
PIP_putPut a full fram e into a pipe
PIP_resetReset all fields of a pipe object to their original values
PIP_setWriterSizeSet the number of valid words written to a pipe frame
Get the value of the
Get the value of the writerAddr pointer of the pipe
readerAddr pointer of the pipe
API Functional Overview1-11
List of Operations
PRD module operations
FunctionOperation
PRD_getticksGet the current tick counter
PRD_startArm a peri odic function for one-time execution
PRD_stopStop a periodic function from exec uti on
PRD_tickAdvance tick counter, dispatch periodic functions
PWRM module operations
FunctionOperation
PWRM_changeSetpointInitiate a change to the V/F setpoint
PWRM_configureSet new configuration parameters for PWRM
PWRM_getCapabilitiesGet information on PWRM’s capabilities on the current platform
PWRM_getCurrentSetpoin tGet the current setpoint in effect
PWRM_getDependencyCountGet count of dependencies currently declared on a resource
PWRM_getNumSetpointsGet the number of setpoints supported for the current platform
PWRM_getSetpointInfoGet the corresponding frequency and CPU core voltage for a setpoint
PWRM_getTransitionLatencyG et the latenc y to sca le bet ween setpoints
PWRM_idleClocksImmediately idle the clock domains
PWRM_registerNotifyRegister a function to be called on a specific power event
PWRM_releaseDepe nd enc yRelease a dependency that has been prev io us ly dec la red
PWRM_setDependencyDeclare a dependency upon a resource
PWRM_sleepDSPTransition the DSP to a new sleep state
PWRM_unregisterNotifyUnregister for an event notification from PWRM
1-12
QUE module operations
FunctionOperation
QUE_createCreate an empty queue
QUE_deleteDelete an empty queue
QUE_dequeueRemove from front of queue (non-atomically)
QUE_emptyTest for an empty queue
QUE_enqueueInsert at end of queue (non-atomically)
QUE_getGet element from front of queue (atomically)
QUE_headReturn element at front of queue
QUE_insertInsert in middle of queue (non-atomically)
QUE_newSet a queue to be empty
QUE_nextReturn next element in queue (non-atomically)
QUE_prevReturn previous element in queue (non-atomically)
List of Operations
QUE_putPut element at end of queue (atomically)
QUE_removeRemove from middle of queue (non-atomically)
RTDX module operations
FunctionOperation
RTDX_channelBusyReturn status indicating whether a channel is busy
RTDX_CreateInputChannelDeclare input channel structure
RTDX_CreateOutputChannelDeclare output channel structure
RTDX_disableInputDisable an input channel
RTDX_disableOutputDisable an output channel
RTDX_enableInputEnable an input channel
RTDX_enableOutputEnable an output channel
RTDX_isInputEnabledReturn status of the input data channel
RTDX_isOutputEn abledReturn status of the output dat a chan nel
RTDX_readRead from an input channel
API Functional Overview1-13
List of Operations
FunctionOperation
RTDX_readNBRead from an input channel without blocking
RTDX_sizeofInputReturn the number of bytes read from an input channel
RTDX_writeWrite to an output channel
SEM module operations
FunctionOperation
SEM_countGet current semaphore count
SEM_createCreate a semaphore
SEM_deleteDelete a semaphore
SEM_newInitialize a semaphore
SEM_pendWait for a counting semaphore
SEM_pendBinaryWait for a binary semaphore
SEM_postSignal a counting semaphore
SEM_postBinarySignal a binary semaphore
SEM_resetReset semaphore
SIO module operations
FunctionOperation
SIO_bufsizeSize of the buffers used by a stream
SIO_createCreate stream
SIO_ctrlPerform a device-dependent control operation
SIO_deleteDelete stream
SIO_flushIdle a stream by flushing buffers
SIO_getGet buffer from stream
SIO_idleIdle a stream
SIO_issueSend a buffer to a stream
SIO_putPut buffer to a stream
1-14
FunctionOperation
SIO_readyDetermine if device for stream is ready
SIO_reclaimRequest a buffer back from a stream
SIO_reclaimxRequest a buffer and frame status back from a stream
SIO_segidMemory section used by a stream
SIO_selectSelect a ready device
SIO_staticbufAcquire s tatic buffer from stream
STS module operations
FunctionOperation
STS_addAdd a value to a statistics object
STS_deltaAdd computed value of an interval to object
STS_resetReset the values stored in an STS object
STS_setStore initial value of an interval to object
List of Operations
SWI module operations
FunctionOperation
SWI_andnClear bits from SWI’s mailbox and post if becomes 0
SWI_andnHookSpecialized version of SWI_andn
SWI_createCreate a software interrupt
SWI_decDecrement SWI’s mailbox and post if becomes 0
SWI_deleteDelete a software interrupt
SWI_disableDisable software interrupts
SWI_enableEnable software interrupts
SWI_getattrsGet attributes of a software interrupt
SWI_getmboxReturn SWI’s mailbox value
SWI_getpriReturn an SWI’s priority mask
SWI_incIncrement SWI’s ma ilb ox and post
SWI_isSWICheck to see if called in the context of a SWI
API Functional Overview1-15
List of Operations
FunctionOperation
SWI_orSet or mask in an SWI’s mailbox and post
SWI_orHookSpecialized version of SWI_or
SWI_postPost a software interrupt
SWI_raisepri
SWI_restorepri
SWI_selfReturn address of currently executing SWI object
SWI_setattrsSet attributes of a software interrupt
Raise an SWI’s priority
Restore an SWI’s priority
SYS module operations
FunctionOperation
SYS_abortAbort program execution
SYS_atexitStack an exit handler
SYS_errorFlag error condition
SYS_exitTerminate program execution
SYS_printf, SYS_sprintf,
SYS_vprintf, SYS_vsprintf
SYS_putcharOutput a single character
Formatted output
TRC module operations
FunctionOperation
TRC_disableDisable a set of trace controls
TRC_enableEnable a set of trace controls
TRC_queryTest whether a set of trace controls is enabled
TSK module operations
FunctionOperation
TSK_checkstacksCheck for stack overflow
TSK_createCreate a task ready for execution
TSK_dele teDelete a task
TSK_deltatimeUpdate task STS with time difference
1-16
FunctionOperation
TSK_disableDisable DSP/BIOS task scheduler
TSK_enableEnable DSP/BIOS task scheduler
TSK_exitTerminate execution of the current task
TSK_getenvGet task environment
TSK_geterrGet task error number
TSK_getnameGet task name
TSK_getpriGet task priority
TSK_getstsGet task STS object
TSK_isTSKCheck to see if called in the context of a TSK
TSK_itickAdvance system alarm clock (interrupt only)
TSK_selfReturns a handle to the current task
TSK_setenvSet task environment
TSK_seterrSet task error number
TSK_setpriSet a task execution priority
TSK_settimeSet task STS previous time
TSK_sleepDelay execution of the current task
TSK_statRetrieve the status of a task
TSK_tickAdvance system alarm clock
TSK_timeReturn current value of system clock
TSK_yieldYield processor to equal priority task
List of Operations
C library stdlib.h
FunctionOperation
atexitRegisters one or more exit functions used by exit
callocAllocates memory block initialized with zeros
exitCalls the exit functions registered in atexit
freeFrees memory block
getenvSearches for a matching environment string
mallocAllocates memory block
reallocResizes previous ly allocated memory block
API Functional Overview1-17
List of Operations
DSP/BIOS std.h special utility C macros
FunctionOperation
ArgToInt(arg)Casting to treat Arg type parameter as integer (Int) type on the given target
ArgToPtr(arg)Casting to treat Arg type parameter as pointer (Ptr) type on the given target
1-18
Chapter 2
Application Program Interface
This chapte r describes the DSP/BIOS API modules and functions.
The ATM module includes assembly language functions.
Functions❏ATM_andi, ATM_andu. AND memory and return previous value
❏ATM_cleari, ATM_clearu. Clea r mem ory and retur n previ ous val ue
❏ATM_deci, ATM_decu. Decrement memory and return new value
❏ATM_inci, ATM_incu. Increment memory and return new value
❏ATM_ori, ATM_oru. OR memory and return previous value
❏ATM_seti, ATM_setu. Set memory and return previous value
DescriptionATM provides a set of assembly language functions that are used to
manipulate variables with interrupts disabled. These functions can
therefore be used on data shared between tasks, and on da ta shared
between tasks and interrupt routines.
2-2
Loading...
+ 569 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.