Gebruiksaanwijzing /service van het product TMS320C6000 van de fabrikant Texas Instruments
Ga naar pagina of 62
TMS320C6000 DSK Board Support Library API User ’ s Guide Literature Number: SPRU432A October 2001 Printed on Recycled Paper.
IMPORT ANT NOTICE T exas 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.
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.
How to Use This Manual iv 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.
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 TMS320C6000 DSPs and includes application program examples.
Contents vii 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.
Contents viii 5 DIP API Module 5-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
T ables ix Contents T ables 1– 1. BSL Modules and Include Files 1-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1– 2. BSL Support Library Name and Symbol Conventions 1-4 . . . . . . . . .
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. T opic Page 1.1 BSL Introduction 1-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BSL Introduction 1-2 1.1 BSL Introduction Th e 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.
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: bsl671 1dsk.
BSL API Modules 1-4 671 1 DSK Module Support T able 1 – 3 shows which board each API module is supported on. Currently , all modules described in the following chapters are supported by the C671 1 DSK. In the future, more APIs supported by other platforms will be added to the BSL.
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 by calling the CSL_init() function followed by the BSL initialization function, BSL_init() .
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 API functions, structures, and constants that are applicable to this module. T opic Page 2.
AD535 API Module Description 2-2 2.1 AD535 API Module Description The AD535 module (audio codec supported by the C671 1 DSK) serves as a level of abstraction such that it works the same for all AD535s supported on TI EVM/DSKs. T o use an AD535 device, you must first open it and obtain a device handle us- ing AD535_open() .
AD535 API Module Description 2-3 AD535 API Module Page Description T ype Syntax 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 AD.
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 V alue none Description This function closes a codec channel previously opened via AD535_open().
AD535_config 2-6 Description This is the AD535 configuration structure used to set up a codec channel. Y ou create and initialize this structure and then pass its address to the AD535_config() function.
AD553_freeMcbsp 2-7 AD535 API Module 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.
AD535_getMcbspHandle 2-8 Returns McBSP Handle AD535_getMcbsp Handle Function Mcbsp_Handle AD535_getMcbspHandle( AD535_Handle hAD535, ); Arguments hAD535 Handle to codec channel, see AD535_open() Return V alue Mcbsp_handle Handle to the opened McBSP associated to the number of McBSP .
AD535_Id 2-9 AD535 API Module Description This AD535_Id structure is used to allocate a codec channel. Y ou create and initialize this structure, then pass its address to the AD535_open() function. Also, this structure allows you to access to the McBSP handle through the AD535_getMcbspHandle() function after calling AD535_open() .
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 V alue none Description Sets the AD535 ’ s input gain.
AD535_modifyReg 2-1 1 AD535 API Module Modifies specified control register AD535_modifyReg Function void AD535_modifyReg( AD535_Handle hAD535, AD535_Reg ad535Register, Uint32 val, Uint32 mask ); Argum.
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 object contains the McBSP channel number and a McBSP handle. C671 1 DSK If you want to use the local codec, you may pass the predefined pointer AD535_ ON_6711DSK .
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 V alue none Description Sets the AD535 ’ s output gain.
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 V alue int V alue returned from output of ADC. Description Returns the value of the ouput from the ADC.
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 V alue Uint32 V alue of specified control register . Description Returns the value of the specified control register .
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 V alue none Description Asserts a software reset and sets all the registers to their power-on default values.
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 V alue to be written to DAC. Return V alue none Description Writes value to the input of the DAC.
AD535_writeReg 2-18 Description Writes value to the specified control register . 671 1 DSK Note: Only the V oice channel is available on this board. This means the changes to control registers 0, 1, and 2 will have no effect on the operation of the codec.
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 API functions and constants that are applicable to this module. T opic Page 3.
BOARD API Module Description 3-2 3.1 BOARD API Module Description The BOARD module is where we put board-specific content. This module has the 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() , and BOARD_writeReg() .
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 boardRegi.
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 C671 1 DSK - BOARD_REG_IOPOR T val V alue to be written to specified register .
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. T opic Page 4.1 BSL API Module Description 4-2 . . . . . . . . . . . . . . . . . . . . .
BSL API Module Description 4-2 4.1 BSL API Module Description The BSL module serves to initialize the API modules supported by the board.The following unique function has to be called before using the API func- tions: BSL_init () T able 4–1.
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 V alue none Description This function initializes all of the programmable modules on the board.
5-1 DIP API Module This chapter 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. T opic Page 5.1 DIP API Module Description 5-2 .
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}.
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 of the following: - DIP_1 - DIP_2 - DIP_3 - … Return V alue Uint32 Current value of the specified DIP switch.
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 API functions and constants that are applicable to this module. T opic Page 6.
FLASH API Module Description 6-2 6.1 FLASH API Module Description The FLASH module allows access to on-board flash and executes data memory manipulation by using the following three functions: FLASH_read(), FLASH_write() and FLASH_erase() For the 671 1 DSK, the 128KB FLASH is split into 128 bytes per page.
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 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 Flash memory .
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 Flash memory .
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 the FLASH module and 0 otherwise. Y ou are not required to use this constant. Currently , all devices support this module.
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 .
7-1 LED API Module This chapter 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. T opic Page 7.1 LED API Module Description 7-2 .
LED API Module Description 7-2 7.1 LED API Module Description This module has a simple API for configuring on-board LED outputs. Three states can be set by the following functions: - LED_on(led#) - LED_off(led#) - LED_toggle(led#) T able 7–1.
LED_on 7-3 LED API Module 7.2 LED API Reference T urns off specified LED LED_off Function void LED_off( Uint32 LedNum ); Arguments LedNum Specifies which LED to be turned of f. Can be one of the following: - LED_1 - LED_2 - LED_3 - … Return V alue none Description T urns off the specified LED.
LED_SUPPORT 7-4 Description T urns on the specified LED. C671 1 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: LE.
A-1 Appendix A Glossary A AD535: The audio codec API module. Currently supported by the 671 1 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.
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 being addressed.
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 CP U clock frequency to a fraction or multiple of the frequency of the input clock signal.
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 or discontinuous electrical impulses, so that they can be manipulated.
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 aligned on an 8-word boundary .
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 in RISC architecture. instruction fetch packet: A group of up to eight instructions held in memory for execution by the CPU.
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.
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.
Glossary A-9 Glossary synchronous dynamic random-access memory (SDRAM): RAM whose contents is refreshed periodically so the data is not lost. T ransfer of data is at a fixed rate relative to the clock speed of the device. syntax: The grammatical and structural rules of a language.
Index Index-1 Index A AD535 API module, 2-1 API constant, 2-5 AD535_SUPPORT , 2-16 API functions AD535_close, 2-5 AD535_config, 2-6 AD535_getMcbspHandle, 2-8 AD535_inGain, 2-10 AD535_micGain, 2-10 AD5.
Index Index-2 L LED API module, 7-1 API constant, 7-3 LED_SUPPORT , 7-4 API functions LED_off, 7-3 LED_on, 7-3 LED_toggle, 7-4 API summary table, 7-2 description, 7-2.
Een belangrijk punt na aankoop van elk apparaat Texas Instruments TMS320C6000 (of zelfs voordat je het koopt) is om de handleiding te lezen. Dit moeten wij doen vanwege een paar simpele redenen:
Als u nog geen Texas Instruments TMS320C6000 heb gekocht dan nu is een goed moment om kennis te maken met de basisgegevens van het product. Eerst kijk dan naar de eerste pagina\'s van de handleiding, die je hierboven vindt. Je moet daar de belangrijkste technische gegevens Texas Instruments TMS320C6000 vinden. Op dit manier kan je controleren of het apparaat aan jouw behoeften voldoet. Op de volgende pagina's van de handleiding Texas Instruments TMS320C6000 leer je over alle kenmerken van het product en krijg je informatie over de werking. De informatie die je over Texas Instruments TMS320C6000 krijgt, zal je zeker helpen om een besluit over de aankoop te nemen.
In een situatie waarin je al een beziter van Texas Instruments TMS320C6000 bent, maar toch heb je de instructies niet gelezen, moet je het doen voor de hierboven beschreven redenen. Je zult dan weten of je goed de alle beschikbare functies heb gebruikt, en of je fouten heb gemaakt die het leven van de Texas Instruments TMS320C6000 kunnen verkorten.
Maar de belangrijkste taak van de handleiding is om de gebruiker bij het oplossen van problemen te helpen met Texas Instruments TMS320C6000 . Bijna altijd, zal je daar het vinden Troubleshooting met de meest voorkomende storingen en defecten #MANUAl# samen met de instructies over hun opplosinge. Zelfs als je zelf niet kan om het probleem op te lossen, zal de instructie je de weg wijzen naar verdere andere procedure, bijv. door contact met de klantenservice of het dichtstbijzijnde servicecentrum.