TMS320C6000 DSP/BIOS 5.x Application Programming

2y ago
20 Views
2 Downloads
2.36 MB
573 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Jewel Payne
Transcription

TMS320C6000 DSP/BIOS 5.xApplication Programming Interface (API)Reference GuideLiterature Number: SPRU403SAugust 2012

PrefaceSPRU403S—August 2012Read This FirstAbout This ManualDSP/BIOS gives developers of mainstream applications on Texas Instruments TMS320C6000TM DSPdevices the ability to develop embedded real-time software. DSP/BIOS provides a small firmware realtime library and easy-to-use tools for real-time tracing and analysis.You should read and become familiar with the TMS320 DSP/BIOS User’s Guide, a companion volumeto this API reference guide.Before you read this manual, you may use the Code Composer Studio online tutorial and the DSP/BIOSsection of the online help to get an overview of DSP/BIOS. This manual discusses various aspects ofDSP/BIOS in depth and assumes that you have at least a basic understanding of DSP/BIOS.Notational ConventionsThis 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 abold version of the special typeface to distinguish commands that you enter from items that thesystem displays (such as prompts, command output, error messages, etc.).Here is a sample program listing:Void copy(HST Obj *input, HST Obj *output){PIP Obj*in, *out;Uns*src, *dst;Unssize;} Square brackets ( [ and ] ) identify an optional parameter. If you use an optional parameter, youspecify the information within the brackets. Unless the square brackets are in a bold typeface, do notenter the brackets themselves. Throughout this manual, 62 represents the two-digit numeric appropriate to your specific DSPplatform. For example, DSP/BIOS assembly language API header files for the C6000 platform aredescribed as having a suffix of .h62. For the C64x or C67x DSP platform, substitute either 64 or 67for each occurrence of 62. Information specific to a particular device is designated with one of the following icons:SPRU403S—August 2012Submit Documentation FeedbackRead This First2

Related Documentation From Texas Instrumentswww.ti.comRelated Documentation From Texas InstrumentsThe following books describe TMS320 devices and related support tools. To obtain a copy of any of theseTI 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 overview and description of theDSP/BIOS real-time operating system.TMS320C6000 Optimizing C Compiler User's Guide (literature number SPRU187) describes the c6000C/C compiler and the assembly optimizer. This C/C compiler accepts ANSI standard C/C sourcecode and produces assembly language source code for the C6000 generation of devices.TMS320C6000 Programmer's Guide (literature number SPRU189) describes the c6000 CPU architecture,instruction set, pipeline, and interrupts for these digital signal processors.TMS320c6000 Peripherals Reference Guide (literature number SPRU190)describes common peripherals available on the TMS320C6000 family ofdigital signal processors. This book includes information on the internal data and program memories, theexternal memory interface (EMIF), the host port, multichannel buffered serial ports, direct memory access(DMA), clocking and phase-locked loop (PLL), and the power-down modes.TMS320C6000 Code Composer Studio Tutorial Online Help (literature number SPRH125) introduces theCode Composer Studio integrated development environment and software tools. Of special interest toDSP/BIOS users are the Using DSP/BIOS lessons.TMS320C6000 Chip Support LIbrary API Reference Guide (literature number SPRU401) contains a reference for the Chip Support Library (CSL) application programming interfaces (APIs). The CSL is a set ofAPIs used to configure and control all on-chip peripherals.Related DocumentationYou can use the following books to supplement this reference guide:The C Programming Language (second edition), by Brian W. Kernighan and Dennis M. Ritchie,published by Prentice-Hall, Englewood Cliffs, New Jersey, 1988Programming in C, Kochan, Steve G., Hayden Book CompanyProgramming Embedded Systems in C and C , by Michael Barr, Andy Oram (Editor), published byO'Reilly & Associates; ISBN: 1565923545, February 1999Real-Time Systems, by Jane W. S. Liu, published by Prentice Hall; ISBN: 013099651, June 2000Principles of Concurrent and Distributed Programming (Prentice Hall International Series inComputer Science), by M. Ben-Ari, published by Prentice Hall; ISBN: 013711821X, May 1990American National Standard for Information Systems-Programming Language C X3.159-1989,American National Standards Institute (ANSI standard for C); (out of print)TrademarksMS-DOS, Windows, and Windows NT are trademarks of Microsoft Corporation.3Read This FirstSPRU403S—August 2012Submit Documentation Feedback

Trademarkswww.ti.comThe Texas Instruments logo and Texas Instruments are registered trademarks of Texas Instruments.Trademarks of Texas Instruments include: TI, XDS, Code Composer, Code Composer Studio, ProbePoint, Code Explorer, DSP/BIOS, RTDX, Online DSP Lab, BIOSuite, SPOX, TMS320, TMS320C28x,TMS320C54x, TMS320C55x, TMS320C62x, TMS320C64x, TMS320C67x, TMS320C5000, andTMS320C6000.All other brand or product names are trademarks or registered trademarks of their respective companiesor organizations.August 29, 20124Read This FirstSPRU403S—August 2012Submit Documentation Feedback

Contents1 API Functional Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9This chapter provides an overview to the TMS320C6000 DSP/BIOS API functions. 91.1 DSP/BIOS Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.2 Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.3 Assembly Language Interface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.4 DSP/BIOS Tconf Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.5 List of Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Application Program Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26This chapter describes the DSP/BIOS API modules and functions. 262.1 ATM Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.2 BCACHE Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402.3 BUF Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552.4 C62 and C64 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652.5 CLK Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742.6 DEV Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912.7 ECM Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1322.8 GBL Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1392.9 GIO Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1522.10 HOOK Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1682.11 HST Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1732.12 HWI Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1772.13 IDL Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2022.14 LCK Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2062.15 LOG Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2122.16 MBX Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2262.17 MEM Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2322.18 MPC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2522.19 MSGQ Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2612.20 PIP Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2962.21 POOL Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3142.22 PRD Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3182.23 PWRM Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3252.24 QUE Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3692.25 RTDX Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3842.26 SEM Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4002.27 SIO Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4112.28 STS Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4362.29 SWI Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4452.30 SYS Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4722.31 TRC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4882.32 TSK Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4922.33 std.h and stdlib.h functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528SPRU403S—August 2012Submit Documentation FeedbackContents5

ContentsAwww.ti.comFunction Callability and Error Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530This appendix provides tables describing TMS320C6000 errors and function callability. 530A.1 Function Callability Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530A.2 DSP/BIOS Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539BC6000 DSP/BIOS Register Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540This appendix provides tables describing the TMS320C6000TM register conventions in terms of preservationacross multi-threaded context switching and preconditions. 540B.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540B.2 Register Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541CC64x Exception Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545This appendix provides describes support for C64x exception handling. 545C.1 C64x Exception Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C.2 Using the DSP/BIOS EXC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C.3 Data Types and Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C.4 EXC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C.5 MPC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6Contents545546548549557SPRU403S—August 2012Submit Documentation Feedback

iters and Reader of a Message Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Components of the MSGQ Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .MSGQ Function Calling Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Pipe Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Allocators and Message Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Buffer Layout as Defined by STATICPOOL Params . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .PRD Tick Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Statistics Accumulation on the Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .SPRU403S—August 2012Submit Documentation FeedbackFigures2642642652973153173224387

-102-112-122-13A-1A-2A-3B-18TablesDSP/BIOS Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Timer Counter Rates, Targets, and Resets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75High-Resolution Time Determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77HWI interrupts for the TMS320C6000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184Conversion Characters for LOG printf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221Typical Memory Segments for c6x EVM Boards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241Typical Memory Segment for c6711 DSK Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241Statistics Units for HWI, PIP, PRD, and SWI Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437Conversion Characters Recognized by SYS printf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479Conversion Characters Recognized by SYS sprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481Conversion Characters Recognized by SYS vprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483Conversion Characters Recognized by SYS vsprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485Events and Statistics Traced by TRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488Function Callability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530RTS Function Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539Register and Status Bit Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541SPRU403S—August 2012Submit Documentation Feedback

Chapter 1SPRU403S—August 2012API Functional OverviewThis chapter provides an overview to the TMS320C6000 DSP/BIOS API functions.Topic1.1Page1.1DSP/BIOS Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.2Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.3Assembly Language Interface Overview . . . . . . . . . . . . . . . . . . . . . . 101.4DSP/BIOS Tconf Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.5List of Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12DSP/BIOS ModulesTable 1–1. DSP/BIOS ModulesModuleDescriptionATM ModuleAtomic functions written in assembly languageBCACHE ModuleCache operation manager (C64x only)BUF ModuleMaintains buffer pools of fixed size buffersC62 and C64 ModulesTarget-specific functionsCLK ModuleSystem clock managerDEV ModuleDevice driver interfaceECM ModuleEvent combiner manager (C64x only)EXC ModuleException manager (C64x only)GBL ModuleGlobal setting managerGIO ModuleI/O module used with IOM mini-driversHOOK ModuleHook function managerHST ModuleHost channel managerHWI ModuleHardware interrupt managerIDL ModuleIdle function and processing loop managerLCK ModuleResource lock managerLOG ModuleEvent Log managerSPRU403S—August 2012Submit Documentation FeedbackAPI Functional Overview9

Naming Conventions1.2www.ti.comModuleDescriptionMBX ModuleMailboxes managerMEM ModuleMemory managerMPC ModuleMemory protection manager (C64x only)MSGQ ModuleVariable-length message managerPIP ModuleBuffered pipe managerPOOL ModuleAllocator interface modulePRD ModulePeriodic function managerPWRM ModuleReduce application’s power consumptionQUE ModuleQueue managerRTDX ModuleReal-time data exchange managerSEM ModuleSemaphores managerSIO ModuleStream I/O managerSTS ModuleStatistics object managerSWI ModuleSoftware interrupt managerSYS ModuleSystem services managerTRC ModuleTrace managerTSK ModuleMultitasking managerstd.h and stdlib.h functionsStandard C library I/O functionsNaming ConventionsThe format for a DSP/BIOS operation name is a 3- or 4-letter prefix for the module that contains theoperation, an underscore, and the action.1.3Assembly Language Interface OverviewThe assembly interface that was provided for some of the DSP/BIOS APIs has been deprecated. Theyare no longer documented.Assembly functions can call C functions. Remember that the C compiler adds an underscore prefix tofunction names, so when calling a C function from assembly, add an underscore to the beginning of theC function name. For example, call myfunction instead of myfunction. See the TMS320C6000Optimizing

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

Related Documents:

Component Dsp codec wrapper Component Dsp render. HIFI4 Core. Dsp codecs. SAI/ESAI/DMA DAC. Figure 2. Software architecture for DSP processor The DSP-related code includes the DSP framework, DSP remoteproc driver, DSP wrapper, unit test, DSP codec wrapper, and DSP codec. The DSP framework is a firmware code which runs on the DSP core.

Guide (literature number SPRU175) describes the I2C module that pro-vides an interface between a TMS320C6000 digital signal processor (DSP) and any I2C-bus-compatible device that connects by way of an I2C bus. TMS320C6000 DSP Multichannel Audio Serial Port (McASP) Reference Guide (literature

Checks for the latest BIOS release revision on the network, and lets the user decide whether to download the BIOS image and update System. 2. Lock BIOS Version If not selected, then BIOS updates are al-lowed, if selected then updates to BIOS are not allowed. 3. Click on the field to see the options. 4. Allow BIOS Updates Using a Network

– The BIOS stored on the ROM chip attached to the motherboard is called the system BIOS – The ROM chip that stores the system BIOS is called the system ROM BIOS Core Group of Hardware Hardware that is common, necessary and never changes – Keyboard, speaker Stored on the system BIOS chip BIOS is a group of programs.

HP Computer Setup Item Specific Help 1. Check HP.com for BIOS Updates Checks for the latest BIOS release revision on the network, and lets the user decide whether to download the BIOS image and update System. 2. Lock BIOS Version If not selected, then BIOS updates are al-lowed, if selected then updates to BIOS are not allowed. 3.

Linux DSP Tools provides the following foundational target content for DSP development. DSP/BIOS Real time kernel. Configurable, scalable, deterministic task scheduling with API’s for real time analysis. DSP/BIOS Link Program load, memory read write, shared memory channel driver for int

Nov 29, 2013 · Title Chip Mega Man X3/ Rockman X3 CX4 Mega Man X2/ Rockman X2 CX4 Suzuka 8 Hours DSP-1 Super F1 Circus Gaiden DSP-1 Super Bases Loaded 2 / Super 3D Baseball DSP-1 Super Air Diver 2 DSP-1 Shutokō Battle 2: Drift King Keichii Tsuchiya & Masaaki Bandoh DSP-1 Shutokō Battle '94: Keichii Tsuchiya Drift King DSP-1 Pilotwings DSP-1 Mic

The API also provides the user with ability to perform simple processing on measurements made by the CTSU for each channel and then treat each channel as a Touch Button, or group channels and use them as linear or circular sliders. The API inherently depends on the user to provide valid configuration values for each Special Function Register (SFR) of the CTSU. The user should obtain these .