Resumo do conteúdo contido na página número 1
TMS320C6000 DSK
Board Support Library
API User’s Guide
Literature Number: SPRU432A
October 2001
Printed on Recycled Paper
Resumo do conteúdo contido na página número 2
IMPORTANT NOTICE 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 t
Resumo do conteúdo contido na página número 3
Preface Read This First About This Manual The TMS320C6000 DSK Board Support Library (BSL) is a set of application programming interfaces (APIs) used to configure and control all on-board de- vices. 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
Resumo do conteúdo contido na página número 4
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 p
Resumo do conteúdo contido na página número 5
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 gener
Resumo do conteúdo contido na página número 6
Contents Contents 1 BSL Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Provides an overview of the board support library (BSL), describes its beneficial features, and lists each of its API modules. 1.1 BSL Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 1.2 BSL API Modules . . . . . . . . . . . . . . . . . . .
Resumo do conteúdo contido na página número 7
Contents 5 DIP API Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 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. 5.1 DIP API Module Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 5.2 DIP API Re
Resumo do conteúdo contido na página número 8
Tables Tables 1–1. BSL Modules and Include Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 1–2. BSL Support Library Name and Symbol Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 1–3. BSL API Module Support for 6711 DSK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 2–1. AD535 API Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Resumo do conteúdo contido na página número 9
Chapter 1 BSL Overview This chapter provides an overview of the board support library (BSL), de- scribes its beneficial features, and lists each of its API modules. Topic Page 1.1 BSL Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 1.2 BSL API Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 1.3 BSL Project Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Resumo do conteúdo contido na página número 10
BSL Introduction 1.1 BSL Introduction The BSL provides a C-language interface for configuring and controlling all on- board devices. The library consists of discrete modules that are built and ar- chived into a library file. Each module represents an individual API and is re- ferred 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 B
Resumo do conteúdo contido na página número 11
BSL API Modules 1.2 BSL API Modules For each on-board device, one header file and one source file will be gener- ated 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 Board Module Support Module Symbol Description Include File BSL Top-level module:
Resumo do conteúdo contido na página número 12
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 Board BSL library BSL Symbol CSL library CSL symbol 6711DSK bsl6711.lib BOARD_6711DSK csl6711.lib CHIP_6711 Table 1–3. BSL API Module Support for 6711 DSK Module 6711
Resumo do conteúdo contido na página número 13
BSL Project Settings 1.3 BSL Project Settings 1.3.1 User’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 and have to be included in your pro- gram in order for you to have access to the BSL APIs. 1.3.2 Compiler Options In the Compiler Option window, the Chip and Board symbols have to be de- fined using the –d switch.
Resumo do conteúdo contido na página número 14
Chapter 2 AD535 API Module This chapter provides a description of the AD535 API module, lists the individ- ual APIs within the module, and includes a reference section showing the API functions, structures, and constants that are applicable to this module. Topic Page 2.1 AD535 API Module Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 2.2 AD535 API Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 2-1
Resumo do conteúdo contido na página número 15
AD535 API Module Description 2.1 AD535 API Module Description 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 us- ing AD535_open(). Once opened, use the device handle to call the other API functions. The codec may be configured by passing an AD535_Config struc- ture to AD535_config(). Table 2–1. AD535 API Summary
Resumo do conteúdo contido na página número 16
AD535 API Module Description Syntax Type Description Page AD535_write F Writes data to be sent 2-16 AD535_writeHwi F Writes data to be sent 2-17 AD535_writeReg F Writes to the AD535 control registers 2-17 Note: F = Function; C = Constant; S = Structure; T = Typedef AD535 API Module 2-3
Resumo do conteúdo contido na página número 17
AD535_Config 2.2 AD535 API Reference AD535_close Closes codec channel Function Void AD535_close( AD535_Handle hAD535 ); Arguments hAD535 Handle to codec channel, see AD535_open() Return Value none Description This function closes a codec channel previously opened via AD535_open(). The registers for the codec are set to their power-on defaults. Example AD535_close(hAD535); Configuration structure used to set up codec channel AD535_Config Structure AD535_Config Members AD535_Loopback lb_mode L
Resumo do conteúdo contido na página número 18
AD535_config Description This is the AD535 configuration structure used to set up a codec channel. You create and initialize this structure and then pass its address to the AD535_config() function. Example AD535_Config myConfig = { AD535_LOOPBACK_DISABLE, AD535_MICGAIN_OFF, AD535_GAIN_0DB, AD535_GAIN_0DB }; AD535_config(hAD535,&myConfig); Sets up AD535 using configuration structure AD535_config Function Void AD535_config( AD53
Resumo do conteúdo contido na página número 19
AD553_freeMcbsp Description Sets 1 to the FREE field of the SPCR register of the given McBSP port. When FREE is set to 1, the serial clocks continue to run during an emulation halt. Example /* Set the FREE bit of Mcbsp serial port 0 */ AD535_freeMcbsp (MCBSP_DEV0); AD535 API Module 2-7
Resumo do conteúdo contido na página número 20
AD535_getMcbspHandle AD535_getMcbsp Returns McBSP Handle Handle Function Mcbsp_Handle AD535_getMcbspHandle( AD535_Handle hAD535, ); Arguments hAD535 Handle to codec channel, see AD535_open() Return Value Mcbsp_handle Handle to the opened McBSP associated to the number of McBSP. Description Returns the McBSP Handle associated with the McBSP used for AD535 communication. Note: The Mcbsp_Handle type is defined in the Chip Suppport Library (CSL) and created by the internal call of the MCBSP_open()