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 complete. 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 quality 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 license, either express 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 that third
party , or a license from TI under the patents or other intellectual property of TI.
Reproduction of 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.
Resale of TI products or services with statements dif ferent 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.
Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265
Copyright 2001, Texas Instruments Incorporated
About This Manual
Preface
Read This First
The TMS320C6000t DSK Board Support Library (BSL) is a set of application
programming interfaces (APIs) used to configure and control all on-board devices. It is intended to make it easier for developers by eliminating much of the
tedious grunt-work usually needed to get algorithms up and running in a real
system.
Some of the advantages offered by the BSL include: device ease of use, a level
of compatibility between devices, shortened development time, portability,
some standardization, and hardware abstraction. A version of the BSL is available for the TMS320C6711t Developers Starter Kit (DSK).
This document is organized as follows:
- Introduction – a high level overview of the BSL
- Six BSL API module chapters
- Glossary
How to Use This Manual
The information in this document describes the contents of the
TMS320C6000t board support library (BSL) as follows:
- Chapter 1 provides an overview of the BSL, includes a table showing BSL
- Each additional chapter discusses an individual BSL API module and pro-
API module support for various C6000 devices, and lists the API modules.
vides:
J A description of the API module
J A table showing the APIs within the module and a page reference for
more specific information
J A module API Reference section in alphabetical order listing the BSL
API functions, enumerations, type definitions, structures, constants,
and global variables. Examples are given to show how these elements
are used.
Read This First
iii
How to Use This Manual
Notational Conventions / Related Documentation From Texas Instruments
Notational Conventions
This document uses the following conventions:
- Program listings, program examples, and interactive displays are shown
in a special typeface.
- In syntax descriptions, the function or macro appears in a bold typeface
and the parameters appear in plainface within parentheses. Portions of a
syntax that are in bold should be entered as shown; portions of a syntax
that are within parentheses describe the type of information that should be
entered.
- Macro names are written in uppercase text; function names are written in
lowercase.
- TMS320C6000 devices are referred to throughout this reference guide as
C6201, C6202, etc.
Related Documentation From Texas Instruments
The following books describe the TMS320C6x devices and related support
tools. 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. Many of these documents
can be found on the Internet at http://www.ti.com.
TMS320C62x/C67x Technical Brief (literature number SPRU197) gives an
introduction to the C62x/C67x digital signal processors, development
tools, and third-party support.
TMS320C6000 Chip Support Library API User’s Guide (literature number
SPRU401) describes the chip support library (CSL), a library dedicated
for initialization and control of the on-chip peripherals.
TMS320C6000 CPU and Instruction Set Reference 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 digital
signal processors. This book includes information on the internal data
and program memories, the external memory interface (EMIF), the host
port interface (HPI), multichannel buffered serial ports (McBSPs), direct
memory access (DMA), enhanced DMA (EDMA), expansion bus, clocking and phase-locked loop (PLL), and the power-down modes.
iv
How to Use This Manual
TMS320C6000 Programmer’s Guide (literature number SPRU198)
describes ways to optimize C and assembly code for the TMS320C6000
DSPs and includes application program examples.
TMS320C6000 Assembly Language Tools User’s Guide (literature number
SPRU186) describes the assembly language tools (assembler, linker,
and other tools used to develop assembly language code), assembler
directives, macros, common object file format, and symbolic debugging
directives for the ’C6000 generation of devices.
TMS320C6000 Optimizing C Compiler User’s Guide (literature number
SPRU187) describes the ’C6000 C compiler and the assembly optimizer.
This C compiler accepts ANSI standard C source code and produces assembly language source code for the ’C6000 generation of devices. The
assembly optimizer helps you optimize your assembly code.
TMS320C62x DSP Library (literature number SPRU402) describes the 32
high-level, C-callable, optimized DSP functions for general signal processing, math, and vector operations.
TMS320C62x Image/Video Processing Library (literature number
SPRU400) describes the optimized image/video processing functions
including many C-callable, assembly-optimized, general-purpose
image/video processing routines.
Provides a description of the AD535 API module, lists the individual APIs within the module,
and includes a reference section with the API functions, structures, and constants that are applicable to this module.
Provides a description of the BOARD API module, lists the individual APIs within the module,
and includes a reference section showing the API functions and constants that are applicable
to this module.
Provides a description of the DIP API module, lists the individual APIs within the module, and
includes a reference section showing the single API function and constant within this module.
Provides a description of the FLASH API module, lists the individual APIs within the module,
and includes a reference section showing the API functions and constants that are applicable
to this module.
Provides a description of the LED API module, lists the individual APIs within the module, and
includes a reference section showing the API functions and constants that are applicable to this
module.
The BSL provides a C-language interface for configuring and controlling all onboard devices. The library consists of discrete modules that are built and archived into a library file. Each module represents an individual API and is referred to simply as an API module. The module granularity is architected such
that each device is covered by a single API module except the I/O Port Module,
which is divided into two API modules: LED and DIP.
How The BSL Benefits You
The BSL’ s beneficial features include device ease of use, shortened development time, portability, hardware abstraction, and a level of standardization and
compatibility among devices. In general, the BSL makes it easier for you to get
your algorithms up and running in the shortest length of time.
1-2
1.2BSL API Modules
For each on-board device, one header file and one source file will be generated with the following names: bsl_device.h and bsl_device.c.
Also, a library will be built for a given board:
i.e: bsl6711dsk.lib
Note : The soource files.c are archived into a single source file bsl.src.
Table 1–1 provides a current list of BSL API Modules.
Table 1–1. BSL Modules and Include Files
BSL API Modules
Board
Module
BSLTop-level module: Initialization of the BSLbsl_bsl.hBSL_init
BOARDBoard-specific module – can call CSL at run-
AD535Audio codec module (C6711 DSK)bsl_ad535.hAD535_SUPPORT
DIPDip switches modulebsl_dip.hDIP_SUPPORT
FLASHFlash ROM modulebsl_flash.hFLASH_SUPPORT
LED
DescriptionInclude File
bsl_board.hBOARD_SUPPORT
time
LED modulebsl_led.hLED_SUPPORT
Module Support
Symbol
Interdependencies
Although each API module is unique, there exists some interdependency between the CSL (Chip Support Library) and BSL modules. For example, the
AD535 module depends on the MCBSP module because MCBSP0 is dedicated to serial communication.
1.2.1BSL API Module Support
Not all API modules are supported on all boards. For example, the AIC10 module is not supported on the C6711 DSK because the board does not have an
AIC10 codec. When an API module is not supported, all of its header file information is conditionally compiled out, meaning the declarations will not exist.
Because of this, calling an AIC10 API function on a board that does not support
AIC10 results in a compiler and/or linker error.
Note: AIC10 codec is implemented on C5510evm.
BSL Overview
1-3
BSL API Modules
6711 DSK Module Support
Table 1–3 shows which board each API module is supported on. Currently , all
modules described in the following chapters are supported by the C6711 DSK.
In the future, more APIs supported by other platforms will be added to the BSL.
Table 1–2. BSL Support Library Name and Symbol Conventions
Handles are required for devices present more than once. For example, only
one AD535 codec is implemented on-board and associated with mcbsp0;
however, you can use a second AD535 implemented on a daughter board and
make data transfers through mcbsp1.
1-4
1.3BSL Project Settings
1.3.1User’s Program Setting
Due to the interdependancies between CSL and BSL, the CSL is initialized by
calling the CSL_init() function followed by the BSL initialization function,BSL_init().
Also, the two header files <csl.h> and <bsl.h> have to be included in your program in order for you to have access to the BSL APIs.
1.3.2Compiler Options
In the Compiler Option window, the Chip and Board symbols have to be defined using the –d switch. For example,
–dCHIP_6711 –dBOARD_6711DSK
Also, the paths of the “Include” folder containing the BSL and CSL header files
have to be set with the –i switch.
BSL Project Settings
1.3.3Linker Options
The paths of the CSL and BSL libraries have to be defined. The two libraries
are named, respectively, csl6711.lib and bsl6711dsk.lib.
Note: Device Identification Symbol
When using the BSL, it is up to the user to define a project-wide symbol from
a predetermined set to identify which device is being used. This board identification symbol is then used in the BSL header files to conditionally define
the support symbols. (See Section 3.2, API Reference, for more information.
BSL Overview
1-5
Chapter 2
AD535 API Module
This chapter provides a description of the AD535 API module, lists the individual APIs within the module, and includes a reference section showing the API
functions, structures, and constants that are applicable to this module.
The AD535 module (audio codec supported by the C6711 DSK) serves as a
level of abstraction such that it works the same for all AD535s supported on
TI EVM/DSKs.
To use an AD535 device, you must first open it and obtain a device handle using AD535_open(). Once opened, use the device handle to call the other API
functions. The codec may be configured by passing an AD535_Config structure to AD535_config().
Table 2–1. AD535 API Summary
SyntaxType DescriptionPage
AD535_closeFCloses the AD535 module2-5
AD535_ConfigSThe AD535 configuration structure used to set up an
AD535 codec
AD535_configFSets up the AD535 codec using the register value
passed in
AD535_freeMcbspFSets the FREE bit of an McBSP serial port to 1.2-6
AD535_getMcbspHandleFReturns the Handle of the McBSP associated with the
codec previously opened
AD535_IdSThe AD535 Identity Structure used to allocate the
Codec device and the associated McBSP
AD535_inGainFSets the AD535’s input gain2-10
AD535_micGainFSets the microphone preamplifier gain2-10
AD535_modifyRegFModifies the AD535 control registers2-11
AD535_openFOpens an AD535 codec for use2-12
AD535_outGainFSets the AD535’s output gain2-13
AD535_powerDownFPuts the AD535 in power-down mode2-13
AD535_readFReads received data (voice channel)2-14
AD535_readHwiFReads received data (voice channel)2-14
2-5
2-6
2-8
2-8
AD535_readRegFReads the contents of AD535 control registers2-14
AD535_resetFResets the AD5352-16
AD535_SUPPORT
2-2
CA compile time constant whose value is 1 if the board
supports the AD535 module
2-16
AD535 API Module Description
PageDescriptionTypeSyntax
AD535_writeFWrites data to be sent2-16
AD535_writeHwiFWrites data to be sent2-17
AD535_writeReg
Note:F = Function; C = Constant; S = Structure; T = Typedef
FWrites to the AD535 control registers2-17
AD535 API Module
2-3
2.2AD535 API Reference
AD535_Config
AD535_close
Closes codec channel
FunctionVoid AD535_close(
AD535_Handle hAD535
);
ArgumentshAD535Handle to codec channel, see AD535_open()
Return Valuenone
DescriptionThis function closes a codec channel previously opened via
AD535_open(). The registers for the codec are set to their power-on
defaults.
ExampleAD535_close(hAD535);
AD535_Config
Configuration structure used to set up codec channel