Page 3 - Preface; Read This First; About This Manual
iii Read This First Preface Read This First About This Manual The TMS320C6000 t 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 thetedious...
Page 4 - Notational Conventions; This document uses the following conventions:; Related Documentation From Texas Instruments; TMS320C6000 CPU and Instruction Set Reference Guide (literature
How to Use This Manual iv Notational Conventions This document uses the following conventions: - Program listings, program examples, and interactive displays are shownin a special typeface . - In syntax descriptions, the function or macro appears in a bold typefaceand the parameters appear in plainf...
Page 5 - TMS320C62x Image/Video Processing Library (literature number
How to Use This Manual v Read This First TMS320C6000 Programmer’s Guide (literature number SPRU198) describes ways to optimize C and assembly code for the TMS320C6000DSPs and includes application program examples. TMS320C6000 Assembly Language Tools User’s Guide (literature number SPRU186) describes...
Page 6 - Contents; BSL Overview
Contents vii Contents 1 BSL Overview 1-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Provides an overview of the board support library (BSL), describes its beneficial features, andlists each of its API modules....
Page 7 - DIP API Module
Contents viii 5 DIP API Module 5-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Provides a description of the DIP API module, lists the individual APIs within the module, andincludes a reference section showing th...
Page 8 - Tables; –1. BSL Modules and Include Files
Tables ix Contents Tables 1–1. BSL Modules and Include Files 1-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2. BSL Support Library Name and Symbol Conventions 1-4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–3. BSL...
Page 9 - Topic; Chapter 1
1-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 Mo...
Page 10 - How The BSL Benefits You
BSL Introduction 1-2 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...
Page 11 - BSL API Modules; Also, a library will be built for a given board:; Table 1–1. BSL Modules and Include Files; Interdependencies; BSL API Module Support; Note: AIC10 codec is implemented on C5510evm.
BSL API Modules 1-3 BSL Overview 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 ...
Page 12 - Table 1–2. BSL Support Library Name and Symbol Conventions; Using BSL Handles
BSL API Modules 1-4 6711 DSK Module Support Table 1–3 shows which board each API module is supported on. Currently, allmodules 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 Lib...
Page 13 - BSL Project Settings; User’s Program Setting; function followed by the BSL initialization function,; Compiler Options; and; Device Identification Symbol
BSL Project Settings 1-5 BSL Overview 1.3 BSL Project Settings 1.3.1 User’s Program Setting Due to the interdependancies between CSL and BSL, the CSL is initialized bycalling the CSL_init() function followed by the BSL initialization function, BSL_init() . Also, the two header files <csl.h> an...
Page 14 - Chapter 2
2-1 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 APIfunctions, structures, and constants that are applicable to this module. Topic Page 2.1 AD535 API Module Description 2-2 . ....
Page 15 - . Once opened, use the device handle to call the other API
AD535 API Module Description 2-2 2.1 AD535 API Module Description The AD535 module (audio codec supported by the C6711 DSK) serves as alevel of abstraction such that it works the same for all AD535s supported onTI EVM/DSKs. To use an AD535 device, you must first open it and obtain a device handle us...
Page 17 - AD535 API Reference; Closes codec channel; Handle to codec channel, see; Configuration structure used to set up codec channel; Microphone preamp gain:
AD535_Config 2-5 AD535 API Module 2.2 AD535 API Reference Closes codec channel AD535_close 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 viaAD535_open()....
Page 18 - Sets up AD535 using configuration structure; Sets the FREE bit of an McBSP serial port to 1; port
AD535_config 2-6 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_...
Page 22 - Sets AD535’s input gain; inGain; Sets microphone preamplifier gain; micGain
AD535_inGain 2-10 Sets AD535’s input gain AD535_inGain Function void AD535_inGain( AD535_Handle hAD535, float inGain); Arguments hAD535 Handle to codec channel, see AD535_open() inGain ADC input gain. Return Value none Description Sets the AD535’s input gain. 6711 DSK - AD535_GAIN_MUTE - AD535_GAIN_...
Page 23 - Modifies specified control register; Function; Return Value; none; To modify the ADC voice input gain in control register 4:
AD535_modifyReg 2-11 AD535 API Module Modifies specified control register AD535_modifyReg Function void AD535_modifyReg( AD535_Handle hAD535, AD535_Reg ad535Register, Uint32 val, Uint32 mask); Arguments hAD535 Handle to codec channel, see AD535_open() ad535Register Control register enumeration: - AD...
Page 24 - Opens codec channel; myId; Handle to newly opened codec channel; To use the local codec:
AD535_open 2-12 Opens codec channel AD535_open Function AD535_Handle AD535_open ( AD535_Id *myId); Arguments myId Pointer to an object of type AD535_Id. This objectcontains the McBSP channel number and a McBSPhandle. C6711 DSK If you want to use the local codec, you may passthe predefined pointer AD...
Page 25 - Sets AD535’s output gain; Enables AD535’s power-down mode
AD535_powerDown 2-13 AD535 API Module Sets AD535’s output gain AD535_outGain Function void AD535_outGain( AD535_Handle hAD535, float outGain); Arguments hAD535 Handle to codec channel, see AD535_open() outGain DAC output gain. Return Value none Description Sets the AD535’s output gain. 6711 DSK - AD...
Page 26 - Returns value of ouput from ADC; Display Code at Selected Address; int; Returns value of specified control register
AD535_read 2-14 Returns value of ouput from ADC AD535_read Function int AD535_read( AD535_Handle hAD535); Arguments hAD535 Handle to codec channel, see AD535_open() Return Value int Value returned from output of ADC. Description Returns the value of the ouput from the ADC. Example int val; val = AD5...
Page 27 - Control register enumeration:; Value of specified control register.; Returns the value of the specified control register.; Example
AD535_readReg 2-15 AD535 API Module ad535Register Control register enumeration: - AD535_REG_CTRL0 - AD535_REG_CTRL1 - AD535_REG_CTRL2 - AD535_REG_CTRL3 - AD535_REG_CTRL4 - AD535_REG_CTRL5 Return Value Uint32 Value of specified control register. Description Returns the value of the specified control ...
Page 28 - val
AD535_reset 2-16 Asserts software reset AD535_reset Function void AD535_reset( AD535_Handle hAD535 ); Arguments hAD535 Handle to codec channel, see AD535_open() Return Value none Description Asserts a software reset and sets all the registers to their power-on defaultvalues. Example AD535_reset(hAD5...
Page 29 - Writes value to input of DAC; Writes value to specified control register
AD535_writeReg 2-17 AD535 API Module Writes value to input of DAC AD535_writeHwi Function void AD535_writeHwi( AD535_Handle hAD535, int val ); Arguments hAD535 Handle to codec channel, see AD535_open() val Value to be written to DAC. Return Value none Description Writes value to the input of the DAC...
Page 30 - Writes value to the specified control register.
AD535_writeReg 2-18 Description Writes value to the specified control register. 6711 DSK Note: Only the Voice channel is available on this board. This means thechanges to control registers 0, 1, and 2 will have no effect on theoperation of the codec. Example /* Set up 10.5db ADC input gain and 0dB m...
Page 31 - BOARD API Module; Chapter 3
3-1 BOARD API Module This chapter provides a description of the BOARD API module, lists the individ-ual APIs within the module, and includes a reference section showing the APIfunctions and constants that are applicable to this module. Topic Page 3.1 BOARD API Module Description 3-2 . . . . . . . . ...
Page 32 - A predefined symbol is associated with each EVM/DSK, for example,; Table 3–1. BOARD API Summary
BOARD API Module Description 3-2 3.1 BOARD API Module Description The BOARD module is where we put board-specific content. This module hasthe potential to grow in the future as more boards are placed on the market.Currently, the module has some API functions for register access such as BOARD_readReg...
Page 33 - BOARD API Reference; Returns value of specified memory-mapped register; boardRegister; Compile time constant
BOARD_SUPPORT 3-3 BOARD API Module 3.2 BOARD API Reference Returns value of specified memory-mapped register BOARD_readReg Function Uint32 BOARD_readReg( BOARD_Reg boardRegister); Arguments boardRegister Register enumeration C6711 DSK - BOARD_REG_IOPORT Return Value Uint32 Returns specified register...
Page 34 - Writes value to specified memory-mapped register; Writes the value to the specified memory-mapped register.
BOARD_writeReg 3-4 Writes value to specified memory-mapped register BOARD_writeReg Function void BOARD_writeReg( BOARD_Reg boardRegister, Uint32 val); Arguments boardRegister Register enumeration C6711 DSK - BOARD_REG_IOPORT val Value to be written to specified register. Return Value none Descriptio...
Page 35 - BSL API Module; Chapter 4
4-1 BSL API Module This chapter provides a description of the BSL API module and includes a ref-erence section showing the single API function within this module. Topic Page 4.1 BSL API Module Description 4-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 BSL API Reference...
Page 36 - Table 4–1. BSL API Function
BSL API Module Description 4-2 4.1 BSL API Module Description The BSL module serves to initialize the API modules supported by theboard.The following unique function has to be called before using the API func-tions: BSL_init () Table 4–1. BSL API Function Syntax Type Description Page BSL_init F Init...
Page 37 - BSL API Reference; Initializes all programmable modules on board
BSL_init 4-3 BSL API Module 4.2 BSL API Reference Initializes all programmable modules on board BSL_init Function void BSL_init(); Arguments none Return Value none Description This function initializes all of the programmable modules on the board. C6711 DSK - AD535 Codec - BOARD module - DIP switch ...
Page 38 - Chapter 5
5-1 DIP API Module This chapter provides a description of the DIP API module, lists the individualAPIs within the module, and includes a reference section showing the singleAPI function and constant within this module. Topic Page 5.1 DIP API Module Description 5-2 . . . . . . . . . . . . . . . . . ....
Page 39 - Table 5–1. DIP API Summary
DIP API Module Description 5-2 5.1 DIP API Module Description This module has the following single API for reading DIP switch positions: DIP_get(dip#) returns a boolean value {0,1}. Table 5–1. DIP API Summary Syntax Type Description Page DIP_get F Reads the status of the DIP switches 5-3 DIP_SUPPORT...
Page 40 - DIP API Reference; Returns current value of specified DIP switch; dipNum; Currently, all devices support this module.
DIP_SUPPORT 5-3 DIP API Module 5.2 DIP API Reference Returns current value of specified DIP switch DIP_get Function Uint32 DIP_get( Uint32 dipNum); Arguments dipNum Specifies which DIP switch to be read, can be one ofthe following: - DIP_1 - DIP_2 - DIP_3 - … Return Value Uint32 Current value of the...
Page 41 - FLASH API Module; Chapter 6
6-1 FLASH API Module This chapter provides a description of the FLASH API module, lists the individ-ual APIs within the module, and includes a reference section showing the APIfunctions and constants that are applicable to this module. Topic Page 6.1 FLASH API Module Description 6-2 . . . . . . . . ...
Page 42 - For the 6711 DSK, the 128KB FLASH is split into 128 bytes per page.; Table 6–1. FLASH API Summary
FLASH API Module Description 6-2 6.1 FLASH API Module Description The FLASH module allows access to on-board flash and executes datamemory manipulation by using the following three functions: FLASH_read(), FLASH_write() and FLASH_erase() For the 6711 DSK, the 128KB FLASH is split into 128 bytes per ...
Page 43 - FLASH API Reference; Returns checksum of specified Flash data; locator; Returns the value of the specified checksum; locator contains 32-bit address of Flash location; To get the checksum of page 0 and 1, use:
FLASH_checksum 6-3 FLASH API Module 6.2 FLASH API Reference Returns checksum of specified Flash data FLASH_checksum Function Uint32 FLASH_checksum( Uint32 locator, Uint32 length); Arguments locator Addressing and page information for location in Flashmemory. C6711 DSK - FLASH_START_ADDR - FLASH_PAGE...
Page 44 - Erases specified segment of Flash memory
FLASH_erase 6-4 Erases specified segment of Flash memory FLASH_erase Function void FLASH_erase( Uint32 locator, Uint32 length); Arguments locator Addressing and page information for location in Flashmemory. C6711 DSK - FLASH_START_ADDR - FLASH_PAGE_ADDR(x) : (x)– page number - 32-bit Flash address l...
Page 45 - Reads data from FLASH address; To read from pages 0 and 1 to readBuffer:
FLASH_read 6-5 FLASH API Module Reads data from FLASH address FLASH_read Function void FLASH_read( Uint32 locator, Uint32 dst, Uint32 length); Arguments locator Addressing and page information for location in Flashmemory. C6711 DSK - FLASH_START_ADDR - FLASH_PAGE_ADDR(x) :(x)– page number - 32-bit F...
Page 46 - Writes data to Flash address; src
FLASH_SUPPORT 6-6 Compile time constant FLASH_SUPPORT Constant FLASH_SUPPORT Description Compile time constant that has a value of 1 if the board supports theFLASH module and 0 otherwise. You are not required to use this constant. Currently, all devices support this module. Example #if (FLASH_SUPPOR...
Page 47 - Locator contains 32-bit address of Flash location; To write from writeBuffer to pages 1 and 2:
FLASH_write 6-7 FLASH API Module Description Writes data to the Flash address (locator) from a source address (src).This function is limited by the page length of the Flash memory. Note: This function does not affect unspecified segments of Flash. Forexample, altering the lower half of a page of Fla...
Page 48 - LED API Module; Chapter 7
7-1 LED API Module This chapter provides a description of the LED API module, lists the individualAPIs within the module, and includes a reference section showing the APIfunctions and constants that are applicable to this module. Topic Page 7.1 LED API Module Description 7-2 . . . . . . . . . . . . ...
Page 49 - Table 7–1. LED API Summary
LED API Module Description 7-2 7.1 LED API Module Description This module has a simple API for configuring on-board LED outputs. Threestates can be set by the following functions: - LED_on(led#) - LED_off(led#) - LED_toggle(led#) Table 7–1. LED API Summary Syntax Type Description Page LED_off F Turn...
Page 50 - LED API Reference; Turns off specified LED; Turns on specified LED; LedNum
LED_on 7-3 LED API Module 7.2 LED API Reference Turns off specified LED LED_off Function void LED_off( Uint32 LedNum); Arguments LedNum Specifies which LED to be turned off. Can be one ofthe following: - LED_1 - LED_2 - LED_3 - … Return Value none Description Turns off the specified LED. C6711 DSK -...
Page 51 - Turns on the specified LED.; Toggles specified LED
LED_SUPPORT 7-4 Description Turns on the specified LED. C6711 DSK - LED_1 = USER_LED1 - LED_2 = USER_LED2 - LED_3 = USER_LED3 - LED_ALL = all user LEDs Example If you want to turn on LED # 1 use: LED_on(LED_1); Compile time constant LED_SUPPORT Constant LED_SUPPORT Description Compile time constant ...
Page 52 - Glossary; The audio codec API module. Currently supported by the; Appendix A
A-1 Appendix A Glossary A AD535: The audio codec API module. Currently supported by the 6711 DSK. address: The location of program code or data stored; an individually accessible memory location. A-law companding: See compress and expand (compand). API: See application programming interface. API mod...
Page 53 - See board support library.
Glossary A-2 block: The three least significant bits of the program address. These corre- spond to the address within a fetch packet of the first instruction beingaddressed. BOARD: The BOARD-specific API Module. board support library (BSL): The BSL is a set of application programming interfaces (API...
Page 54 - control register file:
Glossary A-3 Glossary clock cycle: A periodic or sequence of events based on the input from the external clock. clock modes: Options used by the clock generator to change the internal CPU clock frequency to a fraction or multiple of the frequency of the inputclock signal. code: A set of instructions...
Page 55 - The DIP Switches API Module.
Glossary A-4 device ID: Configuration register that identifies each peripheral component interconnect (PCI). digital signal processor (DSP): A semiconductor that turns analog sig- nals—such as sound or light—into digital signals, which are discrete ordiscontinuous electrical impulses, so that they c...
Page 56 - The FLASH ROM API Module.
Glossary A-5 Glossary external interrupt: A hardware interrupt triggered by a specific value on a pin. external memory interface (EMIF): Microprocessor hardware that is used to read to and write from off-chip memory. F fetch packet: A contiguous 8-word series of instructions fetched by the CPU and a...
Page 57 - instruction fetch packet:; See interrupt service table.
Glossary A-6 indirect addressing: An addressing mode in which an address points to another pointer rather than to the actual data; this mode is prohibited inRISC architecture. instruction fetch packet: A group of up to eight instructions held in memory for execution by the CPU. internal interrupt: A...
Page 58 - See multichannel buffered serial port see also MCBSP module.
Glossary A-7 Glossary little endian: An addressing protocol in which bytes are numbered from right to left within a word. More significant bytes in a word have higher-num-bered addresses. Endian ordering is specific to hardware and is deter-mined at reset. See also big endian. M µ -law companding: S...
Page 59 - RTOS
Glossary A-8 P peripheral: A device connected to and usually controlled by a host device. program cache: A fast memory cache for storing program instructions al- lowing for quick execution. program memory: Memory accessed through the C6x’s program fetch in- terface. PWR: Power; see PWR module. PWR m...
Page 61 - Index
Index Index-1 Index A AD535 API module, 2-1 API constant, 2-5 AD535_SUPPORT, 2-16 API functions AD535_close, 2-5AD535_config, 2-6AD535_getMcbspHandle, 2-8AD535_inGain, 2-10AD535_micGain, 2-10AD535_modifyReg, 2-11AD535_open, 2-12AD535_outGain, 2-13AD535_powerDown, 2-13AD535_read, 2-14AD535_readReg, 2...