Home
Texas Instruments TI-89 Calculator User Manual
Contents
1. TMS320C6000 DSK Board Support Library API User s Guide Literature Number SPRU432A October 2001 2 TEXAS INSTRUM ENTS Printed on Recycled Paper IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries Tl 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 Tl s terms and conditions of sale supplied at the time of order acknowledgment Tl warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with Tl 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
2. 1 2c BCE API Modulesstnensteneme foceh er motte E sara 1 3 1 3 BSE Project Settings cenean aesae eaae e a a 1 5 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 Benefits You The BSL s beneficial features include device ease of use shortened develop ment 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 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 bs _device h and bsl_device c Also a library will be built for a given board i e bsI6711dsk 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 Description Include File Symbol BSL Top level module
3. AD535_Handle hAD535 i 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 AD535_Config Configuration structure used to set up codec channel Structure AD535_Config Members AD535_Loopback 1b_mode Loopback mode AD535 LOOPBACK_DISABLE Lj AD535 LOOPBACK_ANALOG J AD535 LOOPBACK_DIGITAL AD535_MicGain mic_gain Microphone preamp gain g AD535_MICGAIN_OFF LJ AD535_MICGAIN_ON Float in_gain ADC input gain LJ AD535_GAIN_ MUTE J AD535_GAIN_0ODB OJ 36 dB lt gain lt 12 dB in 1 5 dB steps Float out_gain DAC output gain J AD535_GAIN_MUTE J AD535_GAIN_O0DB _j 36 dB lt gain lt 12 dB in 1 5 dB steps AD535 API Module 2 5 AD535_config Description Example 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 AD535_Config myConfig AD535_LOOPBACK_DISABL AD535_MICGAIN_OFF AD535_GAIN_ODB AD535_GAIN_ODB H AD535_config hAD535 amp myConfig GI AD535_config Sets up AD535 using configuration structure Function Arguments Return Value Description Example Void AD535_config AD535_Handle hAD535 AD535_Config config hAD535 Handle to
4. Initialization of the BSL bsl_bsl h BSL_init BOARD Board specific module can call CSL at run bsl_board h BOARD_SUPPORT time AD535 Audio codec module C6711 DSK bsl_ad535 h AD535_SUPPORT DIP Dip switches module bsl_dip h DIP_SUPPORT FLASH Flash ROM module bsl_flash h FLASH _SUPPORT LED LED module bsl_led h LED_SUPPORT Interdependencies Although each API module is unique there exists some interdependency be tween the CSL Chip Support Library and BSL modules For example the AD535 module depends on the MCBSP module because MCBSPO is dedi cated to serial communication 1 2 1 BSL API Module Support Not all API modules are supported on all boards For example the AIC10 mod ule is not supported on the C6711 DSK because the board does not have an AIC 10 codec When an API module is not supported all of its header file infor mation is conditionally compiled out meaning the declarations will not exist Because of this calling an AlC10 API function on a board that does not support AIC10 results in a compiler and or linker error Note AIC10 codec is implemented on C551 0evm 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
5. AD535_open val Value to be written to DAC none Writes value to the input of the DAC Unlike the AD535_write API it does not use polling to establish that the McBSP is ready to write another sample Rather it requires the McBSP to already be ready In other words the AD535_writeHwi is for use within an Interrupt Service Routine The face that you arrived at an McBSP transmit ISR signifies that the McBSP is ready with another sample The function is included in the ISR associated to McBSP receive event XEVT void AD535_writeIsr Uint val 0x0066 AD535_writeHwi hAD535 val Writes value to specified control register void AD535_writeReg AD535_Handle hAD535 AD535_Reg ad535Register Uint32 val i hAD535 Handle to codec channel see AD535_open ad535Register Control register enumeration AD535_REG_CTRLO AD535_REG_CTRL1 AD535_REG_CTRL2 AD535_REG_CTRL3 AD535_REG_CTRL4 AD535_REG_CTRL5 OO O O OL val Value to be written to specified register none AD535 API Module 2 17 AD535_writeReg Description Example Writes value to the specified control register 6711 DSK Note Only the Voice 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 Set up 10 5db ADC input gain and 0dB microphone preamp gain in control register 4 AD535_writeReg hAD535 AD535_REG_CTRL4 0x0040 Chapter 3 BOAR
6. 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 Tl is not responsible or liable for such altered documentation Resale of TI products or services with statements different 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 Preface Read This First About This Manual The TMS320C6000 DSK Board Sup
7. 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 Table 4 1 BSL API Function Syntax Type Description Page BSL_ init F Initializes the BSL library 4 3 Note F Function C Constant S Structure T Typedef BSL_init 4 2 BSL API Reference BSL_init Initializes all programmable modules on board Function void BSL_init Arguments none Return Value none Description This function initializes all of the programmable modules on the board C6711 DSK g AD535 Codec _ BOARD module _j DIP switch _ FLASH ROM Lj User LEDs Example BSL_init BSL API Module 4 3 Chapter 5 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 Topic Page 5 1 DIP API Module Description 0 000ssceecceeeeceunsenss 5 2 52 DIPAPIReference lt 2 cccckes coaceesesesecandeneceasesaccedesses 5 3 5 1 DIP API Module Description 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 C A compile time co
8. decompression A device that codes in one direction of transmission and decodes in another direction of transmission coder decoder or compression decompression codec A device that codes in one direction of transmission and decodes in another direction of transmission compiler A computer program that translates programs in a high level lan guage into their assembly language equivalents compress and expand compand A quantization scheme for audio sig nals in which the input signal is compressed and then after processing is reconstructed at the output by expansion There are two distinct com panding schemes A law used in Europe and u law used in the United States constant A fixed or invariable value or data item that can be used as an op erand control register A register that contains bit fields that define the way a de vice operates control register file A set of control registers CSL See chip support library CSL module The CSL module is the top level CSL API module It interfaces to all other modules and its main purpose is to initialize the CSL library DAT Data see DAT module DAT module The DAT is an API module that is used to move data around by means of DMA EDMA hardware This module serves as a level of ab straction that works the same for devices that have the DMA or EDMA peripheral Glossary A 3 Glossary device ID Configuration register that identifies each peripheral component in
9. handle INV Before a codec channel can be used it must first be opened by this function Once opened it cannot be opened again until closed See AD535_close To use the local codec AD535_Handle hAD535 hAD535 AD535_open AD535_ON_6711DSK To set up your own AD535_ld for example set up a codec using McBSP 1 AD535_Handle hAD535 AD535_Id myId myId Id mcbsp_no 1 hAD535 AD535_open myId AD535_powerDown AD535_outGain Sets AD535 s output gain Function Arguments Return Value Description Example void AD535_outGain AD535_Handle hAD535 float outGain i hAD535 Handle to codec channel see AD535_open outGain DAC output gain none Sets the AD535 s output gain 6711 DSK J AD535_ GAIN MUTE Lj AD535_GAIN_0DB 1 36 dB lt outGain lt 12 dB in 1 5 dB steps AD535_outGain hAD535 AD535_GAIN_ODB Nomi Enables AD535 s power down mode Function Arguments Return Value Description Example void AD535_powerDown AD535_Handle hAD535 hAD535 Handle to codec channel see AD535_open none Enables the AD535 s power down mode This performs a software power down so the control registers retain their previous values AD535_powerDown hAD535 AD535 API Module 2 13 AD535 _ read AD535_read Returns value of ouput from ADC Function Arguments Return Value Description Example int AD535_read AD535_ Handle hAD535 i hAD535 Handle to
10. to this module 2 1 AD535 API Module Description 0 2 2 2 2 AD535 API Reference 0 cece eee ene ens 2 3 BOARD API Module sic eed teas seoet cine beaadesacinesanionccteasesesedeaesines 3 1 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 3 1 BOARD API Module Description 0 0 c cee eee 3 2 3 2 BOARD API Reference 0 0c ccc tect nee tne eens 3 3 BSLAPI Mod le secare a EEEE R EG Provides a description of the BSL API module and includes a reference section showing the single API function within this module 4 1 BSLAPI Module Description su sersdrrsesui adadni timiana nee eee 4 2 4 2 BSL API Reference 00 cece teen enna 4 3 vii Contents 5 IDIPAPI Module iis cecrinss oar tedaensenawntinedeeeationsiiensdeniaeedaaces 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 0 cece eet es 5 2 5 2 DIPAPI Reference 00 00 cece i ae e dona eae 5 3 6 FLASH API MOdUIG nc ecdenseseuserdnstecinn donsuuasiceaidanpdeareswidaddiaus Provides a description of the FLASH API module lists the individual APIs within the module an
11. 5_modifyReg AD535_Handle hAD535 AD535_Reg ad535Register Uint32 val Uint32 mask hAD535 Handle to codec channel see AD535_open ad535Register Control register enumeration AD535_REG_CTRLO AD535_REG_CTRL1 AD535_REG_CTRL2 AD535_REG_CTRL3 AD535_REG_CTRL4 AD535_REG_CTRL5 OOO O LO L val Value to be masked into register mask Bit value mask A value of 1 sets the bit to the corresponding value in Val a 0 keeps the current value of the bit none Modifies the specified control register according to the bit mask Mask and value Val 6711 DSK Note Only the Voice 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 To modify the ADC voice input gain in control register 4 AD535_modifyReg hAD535 AD535_REG_CTRL4 0x001F 0x003F AD535 API Module 2 11 AD535_ open AD535_open Opens codec channel Function Arguments Return Value Description Example AD535_Handle AD535_open AD535_Id myId myId Pointer to an object of type AD535_ld This object contains the McBSP channel number and a McBSP handle C6711 DSK If you want to use the local codec you may pass the predefined pointer AD535_ON_6711DSK If you want to use another codec you must create your own AD535_ld AD535_Handle Handle to newly opened codec channel Note If the board does not support this function it will return the invalid
12. A relative offset in the program address that specifies which of the 512 frames in the cache into which the current access is mapped Glossary A 5 Glossary 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 internal interrupt A hardware interrupt caused by an on chip peripheral internal peripherals Devices connected to and controlled by a host device The C6x internal peripherals include the direct memory access DMA controller multichannel buffered serial ports McBSPs host port inter face HPI external memory interface EMIF and runtime support tim ers interrupt A signal sent by hardware or software to a processor requesting attention An interrupt tells the processor to suspend its current opera tion save the current task status and perform a particular set of instruc tions Interrupts communicate with the operating system and prioritize tasks to be performed interrupt service fetch packet ISFP A fetch packet used to service inter rupts If eight instructions are insufficient the user must branch out of this block for additional interrupt service If the delay slots of the branch do not reside within the ISFP execution continues from execute packets in the next fetch packet the next ISFP in
13. AD535_Config Struc ture to AD535_config Type Description F S O T mw TT T TN oH TTNA TN TN Closes the AD535 module The AD535 configuration structure used to set up an AD535 codec Sets up the AD535 codec using the register value passed in Sets the FREE bit of an McBSP serial port to 1 Returns the Handle of the McBSP associated with the codec previously opened The AD535 Identity Structure used to allocate the Codec device and the associated McBSP Sets the AD535 s input gain Sets the microphone preamplifier gain Modifies the AD535 control registers Opens an AD535 codec for use Sets the AD535 s output gain Puts the AD535 in power down mode Reads received data voice channel Reads received data voice channel Reads the contents of AD535 control registers Resets the AD535 A compile time constant whose value is 1 if the board supports the AD535 module N ol my rio gr Q IS D Ju rm fe fp a ER a oO oO N Si a N N if er w r N oe oo N N j 2 Aj gt ye A AD535 API Module Description Syntax Type Description Page AD535_write F Writes data to be sent 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 AD535_Config 2 2 AD535 API Reference AD535_close Closes codec channel Function Void AD535_close
14. 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 DSK AD535 X BOARD xX DIP X FLASH x LED xX 1 2 2 Using BSL Handles 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 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 lt csl h gt and lt bsl h gt 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 a 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 1 3 3 Linker Options The paths of the CSL and BSL libraries have to be defined The two libraries are named respectively cs16711 1lib and bsl671ldsk 1lib E a a i aa Note Device Identification Symbol When using the BSL it is up to the user to define
15. 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 proc essing 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 Read This First V Contents BSL OVGCIWICW i355 odie ent oeed aa a eaten E a a wenn eee EE Aaa tee eden 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 s sse essipessi eect ent e ene aaa 1 2 BSCAP MOUS e eain tide taka adda NEEN E 1 2 1 BSL API Module Support 1 2 2 Using BSL Handles s csccncceiawee a nesin aai eaii eii ei i a re kos 1 3 BSL Project Settings sdiikhdreriadu snina ia he ia i ga e e ga aE a a 1 3 1 User s Program Setting 1 3 2 Compiler Options arsaa ana i aa k ea a a a aia 1 3 3 Linker ODIOS iirorestejgsrnpape ni pr ri eb and pe ria e a ia a a a AD535 API M d le ciccc cin ccciee as dnine ikana iore eana e Gin the E A i iE a 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 ap plicable
16. Conventions Related Documentation From Texas Instruments Notational Conventions This document uses the following conventions _j Program listings program examples and interactive displays are shown ina special typeface g 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 QJ Macro names are written in uppercase text function names are written in lowercase Li 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 Instru ments 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
17. D 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 Topic Page 3 1 BOARD API Module Description 0 seeeeeeeeeeeeeees 3 2 32 CBOARD API Reference sence aa ma e a e E 3 3 3 1 BOARD API Module Description 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 A predefined symbol is associated with each EVM DSK for example BOARD_6711DSK d switch for compiler options setting Table 3 1 BOARD API Summary Syntax BOARD_readReg BOARD_SUPPORT BOARD_writeReg Type Description F Reads a specified BOARD memory mapped register C A compile time constant whose value is 1 if the board supports the BOARD module F Writes into a specified Board memory mapped register Note F Function C Constant S Structure T Typedef Page 3 3 3 3 3 4 BOARD_SUPPORT 3 2 BOARD API Reference 2 C OMCEC EE Returns value of specified memory mapped register Function Arguments Return Value Description Example Uint32 BOARD_readReg BOARD_Reg boardRegister i boardRegi
18. a project wide symbol from a predetermined set to identify which device is being used This board identi fication 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 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 x 2 40 0 lt 02s lt 0e000eceessdecuneses 2 2 2 2 SADS35 APIReterence 2 es ene cae an ccua ences nee eee ren eee 2 5 2 1 AD535 API Module Description 2 1 AD535 API Module Description Table 2 1 AD535 API Summary Syntax AD535_ close AD535_ Config AD535_config AD535_freeMcbsp AD535_getMcbspHandle AD535_Id AD535_inGain AD535_micGain AD535_modifyReg AD535_open AD535_outGain AD535_powerDown AD535_read AD535_readHwi AD535_readReg AD535_reset AD535_SUPPORT 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 DSkKs 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
19. codec channel see AD535_open Config Pointer to an initialized configuration structure see AD535_Config none Sets up the AD535 using the configuration structure The values of the structure are written to the AD535 control registers AD535_Config myConfig AD535_LOOPBACK_DISABL AD535_MICGAIN_OFF AD535_GAIN_ODB AD535_GAIN_ODB H AD535_config hAD535 amp myConfig GI No Mic iieesyeg Sets the FREE bit of an McBSP serial port to 1 Function Arguments Return Value 2 6 Void AD535_freeMcbsp int port 7 port McBSP port MCBSP_DEVO MCBSP_DEV1 none 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_DEVO AD535 API Module 2 7 AD535_getMcbspHandle AD535_getMcbsp SEREI Returns McBSP Handle Function Arguments Return Value Description Example Mcbsp_Handle AD535_getMcbspHandle i hAD535 AD535_ Handle hAD535 Handle to codec channel see AD535_open Mcbsp_handle_ Handle to the opened McBSP associated to the number of McBSP 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 funct
20. codec channel see AD535_open int Value returned from output of ADC Returns the value of the ouput from the ADC int val val AD535_read hAD535 AD535_readHwi Display Code at Selected Address Function Arguments Return Value Description Example int AD535_readHwi AD535_Handle hAD535 hAD535 Handle to codec channel see AD535_open int Value returned from output of ADC Allows the user to read the output value of ADC Unlike the AD535_read API it does not use polling to establish that the McBSP is ready for another sample Rather it requires the McBSP to always be ready In other words the AD535_readHwi routine is for use with an Interrupt Service Routine The fact that you arrived at an McBSP receive ISR signifies that the McBSP is ready with another sample The function is included in the ISR associated to McBSP receive event REVT void AD535_readIsr Uintl16 val val AD535_readHwi hAD535 POLEM CCGC Returns value of specified control register Function Arguments Uint32 AD535_readReg AD535_Handle hAD535 AD535_Reg ad535Register hAD535 Handle to codec channel see AD535_open Return Value Description Example AD535_readReg ad535Register Control register enumeration AD535_REG_CTRLO AD535_REG_CTRL1 AD535_REG_CTRL2 AD535_REG_CTRL3 AD535_REG_CTRL4 AD535_REG_CTRL5 O O O O O L Uint32 Value of specified control register Returns the value of the sp
21. d includes a reference section showing the API functions and constants that are applicable to this module 6 1 FLASH API Module Description 00 cece cee eens 6 2 6 2 FLASH API Reference 00 0 c cece eee eee tee eens 6 3 amp VED API Module 2 tei comic etd a eka dane a a E 7 1 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 Al LED API Module Description 0 eects 7 2 2 LED API Referente 22 40 42 0scd icin oad Bed a a a daw bated aad ave dene dle vs 7 3 A GIOSSANY wceitiee ee eat eaethe edad inde eked hance ene nee eet eee viii LI ee on NOP WOWDND LPEihid BSL Modules and Include Files 0 ccc ccc cent c eet e eet eee eens BSL Support Library Name and Symbol Conventions 0 000 c cee cee ees BSL API Module Support for 6711 DSK 20 0c teens AD535 API Summary BOARD API Summary 0 0 0 0 000 c cect ete ioa iiie aia BSL API Function DIP API Summary FLASH API Summary LED API Summary Tables Contents ix 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 Tele BSisintroductlonisec auiaccnar ance eunmacete meses aee cns 1 2
22. ecified control register Uint32 controlRegVal controlRegVal AD535_readReg hAD535 AD535_REG_CTRL3 AD535 API Module 2 15 AD535_reset AD535_reset Asserts software reset Function Arguments Return Value Description Example AD535_SUPPORT Constant Description Example Function Arguments Return Value Description Example void AD535_reset AD535_ Handle hAD535 hAD535 Handle to codec channel see AD535_open none Asserts a software reset and sets all the registers to their power on default values AD535_reset hAD535 Compile time constant AD535_SUPPORT Compile time constant that has a value of 1 if the board supports the AD535 module and 0 otherwise You are not required to use this constant Currently all devices support this module if AD535_SUPPORT do AD535 operations endif Writes value to input of DAC void AD535_write AD535_Handle hAD535 int val hAD535 Handle to codec channel see AD535_open val Value to be written to DAC none Writes value to the input of the DAC To read from the codec and write back the same value use AD535_write hAD535 AD535_read hAD535 AD535_writeReg POREM GE rites value to input of DAC Function Arguments Return Value Description Example AD535_writeReg Function Arguments Return Value void AD535_writeHwi AD535_Handle hAD535 int val i hAD535 Handle to codec channel see
23. ed LED C6711 DSK Jg LED_1 USER_LED1 Lj LED_2 USER_LED2 Jg LED_3 USER_LED3 g LED_ALL all user LEDs If you want to turn on LED 1 use LED_on LED_1 Compile time constant LED_SUPPORT Compile time constant that has a value of 1 if the board supports the LED module and 0 otherwise You are not required to use this constant Currently all devices support this module if LED_SUPPORT do LED operations endif Toggles specified LED void LED_toggle Uint32 LedNum LedNum Specifies which LED to be toggled can be one of the following g LED_1 Lj LED 2 Lj LED 3 J none Toggles the specified LED C6711 DSK J LED_1 USER_LED1 Lj LED_2 USER_LED2 Lj LED_3 USER_LED3 g LED_ALL all user LEDs If you want to toggle LED 1 use LED_toggle LED_1 Appendix A Glossary 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 module A set of API functions designed for a specific purpose application programming interface API Used for proprietary applica tion programs to interact with communications software or to conform to protocols from another vendor s product assembler A software program that creates a machine language p
24. een aes 6 3 6 1 FLASH API Module Description 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 6711 DSK the 128KB FLASH is split into 128 bytes per page Table 6 1 FLASH API Summary Syntax Type Description Page FLASH_checksum F Returns the check sum 6 3 FLASH_erase F Erases the specific segment of the flash and or erases the full flash FLASH_read F Reads the Flash data and copies it to a specified 6 5 destination buffer FLASH_SUPPORT C A compile time constant whose value is 1 if the board supports the FLASH module FLASH _write F Writes to Flash data from a specified source buffer Note F Function C Constant S Structure T Typedef FLASH_checksum 6 2 FLASH API Reference AEN RE Gu Returns checksum of specified Flash data Function Arguments Return Value Description Example Uint32 FLASH checksum Uint32 locator Uint32 length locator Addressing and page information for location in Flash memory C6711 DSK J FLASH_START_ADDR i FLASH_PAGE_ADDR x x page number J 32 bit FLASH address length Length in bytes of data to be read This is limited by the size of the Flash memory Uint 32 Returns the value of the specified checksum Returns the checksum of the specified Flash data Checksum calc
25. er mapped to an address in memory Some memory mapped registers are mapped to data memory and some are mapped to input output memory most significant bit MSB The highest order bit in a word multichannel buffered serial port McBSP An on chip full duplex circuit that provides direct serial communication through several channels to external serial devices multiplexer A device for selecting one of several available signals nonmaskable interrupt NMI An interrupt that can be neither masked nor disabled object file A file that has been assembled or linked and contains machine language object code off chip A state of being external to a device onchip A state of being internal to a device Glossary A 7 Glossary 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 module PWR is an API module that is used to configure the power down control registers if applicable and to invoke various power down modes random access memory RAM A type of memory device in which the individual locations can be accessed in any order register A small area of high speed memory located within a processor or electronic device that is used for temporarily storing data or instructions Each reg
26. hMcbsp AD535_getHandleMcbsp hAD535 To set up your own AD535_ld for example set up a codec using McBSP 1 AD535_Handle hAD535 AD535_Id mylId myId Id mcbsp_no 1 Mcbsp_Handle hMcbsp1 hAD535 AD535_open myId hMcbspl AD535_getHandleMcbsp hAD535 Note You can also use the Mcbsp1 if you haven t opened an AD535 handle with the predefined AD535_ON_6711DSK object AD535 API Module 2 9 AD535_inGain AD535_inGain Sets AD535 s input gain Function Arguments Return Value Description Example void AD535_inGain AD535_Handle hAD535 float inGain hAD535 Handle to codec channel see AD535_open inGain ADC input gain none Sets the AD535 s input gain 6711 DSK I AD535_GAIN MUTE 2 AD535_GAIN_ODB Q 36 dB lt inGain lt 12 dB in 1 5 dB steps AD535_inGain hAD535 6 0 AD535_micGain Sets microphone preamplifier gain Function Arguments Return Value Description Example void AD535_micGain AD535_Handle hAD535 AD535_MicGain micGain hAD535 Handle to codec channel see AD535_open micGain Microphone preamplifier gain enumeration none Sets the microphone preamplifier gain 6711 DSK J AD535_MICGAIN_OFF off 0 dB J AD535_MICGAIN_ON on 20 dB AD535_micGain hAD535 AD535_MICGAIN_OFF AD535_modifyReg POLEM Oe aee Modifies specified control register Function Arguments Return Value Description Example void AD53
27. ion Mcbsp_Handle hMcbsp hMcbsp AD535_getHandleMcbsp hAD535 LO Allocates codec channel Structure Members AD535_Id Typedef Struct struct int mcbsp_no Id Struct Boolean allocated MCBSP_Handle hMcbsp Obj AD535_Id The typedef structure AD535_Id includes 2 substructures such as Id and Obj structures The internal structure Id contains the field mcbsp_no The member mcbsp_no contains the number of the serial port you wish to use The internal structure Obj contains the boolean field to allocate the codec and the McBSP handle associated with the number of the McBSP which will be open mcbsp_no Description Example AD535_Id This AD535_1d structure is used to allocate a codec channel You 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 If you wish to use the AD535 codec implemented on C6711DSK you can pass the predefined pointer AD535_ON_6711DSK The predefined pointer AD535_1locald associates the codec to the mcbsp0 directly It s not necessary to define AD535_Id pointer mcbsp_no variable is set to 0 mcbsp0 See source file bsl_ad535 c the codec of C6711DSK use the predfined pointer AD535_ON_6711DSkK AD535_Handle hAD535 Mcbsp_Handle hMcbsp hAD535 AD535_open AD535_ON_6711DSK
28. ister is given a name contains a few bytes of information and is referenced by programs reduced instruction set computer RISC A computer whose instruction set and related decode mechanism are much simpler than those of micro programmed complex instruction set computers The result is a higher instruction throughput and a faster real time interrupt service response from a smaller cost effective chip reset A means of bringing the CPU to a known state by setting the registers and control bits to predetermined values and signaling execution to start at a specified address RTOS Real time operating system structure A collection of one or more variables grouped together under a single name synchronous burst static random access memory SBSRAM RAM whose contents does not have to be refreshed periodically Transfer of data is at a fixed rate relative to the clock speed of the device but the speed is increased Glossary synchronous dynamic random access memory SDRAM RAM whose contents is refreshed periodically so the data is not lost Transfer of data is at a fixed rate relative to the clock speed of the device syntax The grammatical and structural rules of a language All higher level programming languages possess a formal syntax system software The blanketing term used to denote collectively the chip support libraries and board support libraries tag The 18 most significant bits of the program address This value c
29. memory interface see also EMIF module EMIF module EMIF is an API module that is used for configuring the EMIF registers evaluation module EVM Board and software tools that allow the user to evaluate a specific device Glossary external interrupt A hardware interrupt triggered by a specific value ona pin external memory interface EMIF Microprocessor hardware that is used to read to and write from off chip memory fetch packet A contiguous 8 word series of instructions fetched by the CPU and aligned on an 8 word boundary flag A binary status indicator whose state indicates whether a particular condition has occurred or is in effect FLASH The FLASH ROM API Module frame An 8 word space in the cache RAMs Each fetch packet in the cache resides in only one frame A cache update loads a frame with the re quested fetch packet The cache contains 512 frames global interrupt enable bit GIE A bit in the control status register CSR that is used to enable or disable maskable interrupts host A device to which other devices peripherals are connected and that generally controls those devices host port interface HPI A parallel interface that the CPU uses to commu nicate with a host processor HPI See host port interface see also HPI module HPI module HPI is an API module used for configuring the HPI registers Functions are provided for reading HPI status bits and setting interrupt events index
30. n the central processing unit of a computer cache module CACHE is an API module containing a set of functions for managing data and program cache cache controller System component that coordinates program accesses between CPU program fetch mechanism cache and external memory CCS Code Composer Studio ceniral processing unit CPU The portion of the processor involved in arithmetic shifting and Boolean logic operations as well as the genera tion of data and program memory addresses The CPU includes the central arithmetic logic unit CALU the multiplier and the auxiliary regis ter arithmetic unit ARAU CHIP See CHIP module CHIP module The CHIP module is an API module where chip specific and device related code resides CHIP has some API functions for obtaining device endianess memory map mode if applicable CPU and REV IDs and clock speed chip support library CSL The CSL is a set of application programming interfaces APIs consisting of target side DSP code used to configure and control all on chip peripherals 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 input clock signal code A set of instructions written to perform a task a computer program or part of a program codec Coder decoder or compression
31. ngth of the FLASH memory Note This function does not affect unspecified segments of Flash For example altering the lower half of a page of Flash memory does not change the value of the upper half page C6711 DSK Lj locator contains 32 bit address of Flash location _JFLASH_START_ADDR is 0x9000000 _j Flash address range 0x90000000 to 0x90020000 J FLASH_PAGE_SIZE 0x80 128 bytes Page number range 0 to 1023 JFLASH_PAGE_ADDR x FLASH_START_ADDR x FLASH_PAGE_SIZE To read from pages 0 and 1 to readBuffer char readBuffer FLASH_PAGE_SIZE 2 FLASH_read FLASH_PAGE_ADDR 0 Uint32 readBuffer FLASH _PAGE_SIZE 2 FLASH API Module 6 5 FLASH_SUPPORT AFX Compile time constant Constant Description Example FLASH_write Function Arguments Return Value 6 6 FLASH SUPPORT Compile time constant that has a value of 1 if the board supports the FLASH module and 0 otherwise You are not required to use this constant Currently all devices support this module if FLASH SUPPORT do FLASH operations endif Writes data to Flash address int FLASH write Uint32 src Uint32 locator Uint32 length sre Source address locator Addressing and page information for location in Flash memory C6711 DSK J FLASH_START_ADDR J FLASH_PAGE_ADDR x x page number J 32 bit FLASH address length Length in bytes of data to be written This is limited b
32. nstant whose value is 1 if the board 5 3 supports the DIP module Note F Function C Constant S Structure T Typedef DIP_SUPPORT 5 2 DIP API Reference DIP_get Returns current value of specified DIP switch Function Uint32 DIP_get Arguments Return Value Description Example Uint32 dipNum i dipNum Specifies which DIP switch to be read can be one of the following g DIP_1 g DIP_2 g DIP_3 E Uint32 Current value of the specified DIP switch 0 DIP switch position is off j 1 DIP switch position is on Returns the current value of the specified DIP switch C6711 DSK J DIP_1 USER_SW1 g DIP 2 USER SW2 Q DIP_3 USER SW3 Uint32 val val DIP_get DIP_1 DIP_SUPPORT Compile time constant Constant Description Example DIP_SUPPORT Compile time constant that has a value of 1 if the board supports the DIP module and 0 otherwise You are not required to use this constant Currently all devices support this module if DIP_SUPPORT do DIP operations ndif DIP API Module 5 3 Chapter 6 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 Topic Page 6 1 FLASH API Module Description cseeeeeeeeeeeeeees 6 2 6 2 cELASH API Reference 22 ooe a a eee oe
33. 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 clock ing and phase locked loop PLL and the power down modes 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 as sembly language source code for the
34. orre sponds to the physical address of the fetch packet that is in that frame timer A programmable peripheral used to generate pulses or to time events TIMER module TIMER is an API module used for configuring the timer reg isters word A multiple of eight bits that is operated upon as a unit For the C6x a word is 32 bits in length Glossary A 9 AD535 API module 2 1 API constant 2 5 AD535_ SUPPORT 2 16 API functions AD535_close AD535_contig AD535_getMcbspHandle 2 8 AD535_inGain AD535_micGain AD535_modifyReg AD535_open AD535_outGain AD535_powerDown AD535_read AD535_readReg AD535_reset AD535_write AD535_writeReg API structures AD535_Config AD535_Id 2 8 API summar table 2 2 description 2 2 BOARD API module 3 1 API constant 3 3 BOARD_SUPPORT 3 3 API functions BOARD_readReg BOARD_writeReg API summary table 3 2 description 3 board support library BSL 6711 DSK module support 1 4 Index Index API module support 1 3 API module seca for 6711 DSK table 1 4 API modules 1 3 device identification symbol note regarding 1 5 how the BSL benefits ou 1 2 interdependencies 1 3 introduction 1 2 modules and include files table 1 3 overview 1 1 project settings 1 5 BSL API module 4 1 API function 4 3 BSL_init 4 3 description 4 2 function table 4 2 device identification symbol note rega
35. port 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 portability some standardization and hardware abstraction A version of the BSL is avail able for the TMS320C6711 Developers Starter Kit DSK This document is organized as follows _j Introduction a high level overview of the BSL J Six BSL API module chapters _ Glossary How to Use This Manual The information in this document describes the contents of the TMS320C6000 board support library BSL as follows i Chapter 1 provides an overview of the BSL includes a table showing BSL API module support for various C6000 devices and lists the API modules Each additional chapter discusses an individual BSL API module and pro vides A description of the API module m A table showing the APIs within the module and a page reference for more specific information m 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 Notational
36. rding 1 5 DIP API module 5 1 API constant 5 3 DIP_SUPPORT 5 3 API function DIP_get 5 3 API summary table 5 2 Aescdption 62 FLASH API module 6 1 API constant 6 3 FLASH_SUPPORT 6 6 API functions FLASH_checksum FLASH_erase FLASH_read 6 5 FLASH_write 6 6 description 6 2 API summary table 6 2 Index 1 Index LED API module 7 1 API constant 7 3 LED_SUPPORT 7 4 Index 2 API functions LED_off 7 3 LED_on LED_toggle API summary table 7 2 description 7 2
37. rogram from a source file that contains assembly language instructions direc tives and macros The assembler substitutes absolute operation codes for symbolic operation codes and absolute or relocatable addresses for symbolic addresses assert To make a digital logic device pin active If the pin is active low then a low voltage on the pin asserts it If the pin is active high then a high voltage asserts it bit A binary digit either a 0 or 1 big endian An addressing protocol in which bytes are numbered from left to right within a word More significant bytes in a word have lower num bered addresses Endian ordering is specific to hardware and is deter mined at reset See also ittle endian A 1 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 BOARD The BOARD specific API Module board support library BSL The BSL is a set of application programming interfaces APIs consisting of target side DSP code used to configure and control board level peripherals boot The process of loading a program into program memory boot mode The method of loading a program into program memory The C6x DSP supports booting from external ROM or the host port interface HPI BSL See board support library byte A sequence of eight adjacent bits operated upon as a unit cache A fast storage buffer i
38. s a simple API for configuring on board LED outputs Three states can be set by the following functions LJ LED_on led QD LED_off led LJ LED_toggle led Table 7 1 LED API Summary Syntax Type Description Page LED_ off F Turns off the specified LED 7 3 LED_on F Turns on the specified LED LED_SUPPORT C A compile time constant whose value is 1 if the board 7 4 supports the LED module m A LED_toggle F Toggles the specified LED Note F Function C Constant S Structure T Typedef 7 2 LED on 7 2 LED API Reference LED_off Turns off specified LED Function void LED_off Uint32 LedNum Arguments LedNum Specifies which LED to be turned off Can be one of the following J LED_1 g LED 2 g LED 3 E Return Value none Description Turns off the specified LED C6711 DSK g LED_1 USER_LED1 g LED_2 USER_LED2 Jg LED_3 USER_LED3 g LED_ALL all user LEDs Example If you want to turn off LED 1 use LED_off LED_1 Turns on specified LED Function void LED_on Uint32 LedNum F Arguments LedNum Specifies which LED to be turned on Can be one of the following g LED_1 g LED 2 g LED 3 E Return Value none LED API Module 7 3 LED_SUPPORT Description Example LED_SUPPORT Constant Description Example LED_toggle Function Arguments Return Value Description Example 7 4 Turns on the specifi
39. specified segments of Flash For example altering the lower half of a page of Flash memory does not change the value of the upper half page C6711 DSK LJ locator contains 32 bit address of Flash location JFLASH_START_ADDR is 0x9000000 4 Flash address range 0x90000000 to 0x90020000 J FLASH_PAGE_SIZE 0x80 128 bytes LJ Page number range 0 to 1023 JFLASH_PAGE_ADDR x FLASH_START_ADDR x FLASH_PAGE_SIZE Note On 5x boards 16 bit addressing is used and page information is included in the upper half word of the address argument Example To erase page 0 and 1 in the Flash FLASH_erase FLASH_PAGE_ADDR 0 FLASH_PAGE_SIZE 2 To erase the entire FLASH FLASH _erase 0 FLASH ERASE ALL Note When erasing the entire Flash memory the locator argument becomes a dummy parameter 6 4 FLASH_read FLASH_read Reads data from FLASH address Function void FLASH_read Arguments Return Value Description Example Uint32 locator Uint32 dst Uint32 length locator Addressing and page information for location in Flash memory C6711 DSK J FLASH_START_ADDR FLASH_PAGE_ADDR x x page number LJ 32 bit FLASH address dst Destination address length Length in bytes of data to be read This is limited by the size of the Flash memory none Reads data from the FLASH address locator and copies it to a destination address dst This function is limited only by the le
40. ster Register enumeration C6711 DSK L BOARD_REG_IOPORT Uint32 Returns specified register value Returns the value of the specified memory mapped register Uint32 boardRegVal boardRegVal BOARD_readReg BOARD_REG_IOPORT oy ORI Compile time constant Constant Description Example BOARD_SUPPORT Compile time constant that has a value of 1 if the board supports the different modules via MODULE_SUPPORT constants and 0 otherwise You are not required to use this constant Currently all devices support this module if BOARD_SUPPORT do DIP operations ndif BOARD API Module 3 3 BOARD writeReg TOV P MA GGE Writes value to specified memory mapped register Function Arguments Return Value Description Example void BOARD_writeReg BOARD_Reg boardRegister Uint32 val i boardRegister Register enumeration C6711 DSK L BOARD_REG_IOPORT val Value to be written to specified register none Writes the value to the specified memory mapped register BOARD_writeReg BOARD_REG_IOPORT 0x00000000 Chapter 4 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 140 cec ee oe eu enn seeeneer enon A2 Bot APIReferenco noan sane cor a a an 4 1 BSL API Module Description 4 1 BSL API Module Description
41. terconnect 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 DIP The DIP Switches API Module direct memory access DMA A mechanism whereby a device other than the host processor contends for and receives mastery of the memory bus so that data transfers can take place independent of the host DMA See direct memory access DMA module DMA is an API module that currently has two architectures used on C6x devices DMA and EDMA enhanced DMA Devices such as the 6201 have the DMA peripheral whereas the 6211 has the EDMA peripheral DMA source The module where the DMA data originates DMA data is read from the DMA source DMA transfer The process of transferring data from one part of memory to another Each DMA transfer consists of a read bus cycle source to DMA holding register and a write bus cycle DMA holding register to destina tion DSK Digital signal processor DSP starter kit Tools and documentation provided to new DSP users to enable rapid use of the product EDMA Enhanced direct memory access see EDMA module EDMA module EDMA is an API module that currently has two architectures used on C6x devices DMA and EDMA enhanced DMA Devices such as the 6201 have the DMA peripheral whereas the 6211 has the EDMA peripheral EMIF See external
42. terrupt service routine ISR A module of code that is executed in re sponse to a hardware or software interrupt interrupt service table IST A table containing a corresponding entry for each of the 16 physical interrupts Each entry is a single fetch packet and has a label associated with it IRQ nterrupt request see RQ module IRQ module IRQ is an API module that manages CPU interrupts IST See interrupt service table least significant bit LSB The lowest order bit in a word LED The LED API Module linker A software tool that combines object files to form an object module which can be loaded into memory and executed 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 u law companding See compress and expand compand maskable interrupt A hardware interrupt that can be enabled or disabled through software MCBSP See multichannel buffered serial port see also MCBSP module MCBSP module MCBSP is an API module that contains a set of functions for configuring the McBSP registers memory map A graphical representation of a computer system s memory showing the locations of program space data space reserved space and other memory resident elements memory mapped register An on chip regist
43. ulated by byte by byte addition Note This function does not affect unspecified segments of Flash For example altering the lower half of a page of Flash memory does not change the value of the upper half page C6711 DSK _j locator contains 32 bit address of Flash location _JFLASH_START_ADDR is 0x9000000 j Flash address range 0x90000000 to 0x90020000 J FLASH_PAGE_SIZE 0x80 128 bytes Page number range x 0 to 1023 JFLASH_PAGE_ADDR x FLASH_START_ADDR x FLASH_PAGE_SIZE Note On 5x boards 16 bit addressing is used and page information is included in the upper half word of the address argument To get the checksum of page 0 and 1 use Uint32 startAddr FLASH_PAGE_ADDR 0 Uint32 length FLASH_PAGE_ SIZE 2 Uint32 checksum checksum FLASH _checksum startAddr length FLASH API Module 6 3 FLASH_erase FLASH_erase Erases specified segment of Flash memory Function void FLASH_erase Uint32 locator Uint32 length Arguments locator Addressing and page information for location in Flash memory C6711 DSK J FLASH_START_ADDR J FLASH_PAGE_ADDR x x page number Lj 32 bit Flash address length Length in bytes of data to be erased This is limited by the size of the Flash memory C6711 DSK Lj length in bytes J FLASH ERASE ALL erase entire FLASH Return Value none Description Erases the specified segment of Flash memory Note This function does not affect un
44. y the size of the Flash memory none Description Example FLASH_write 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 For example altering the lower half of a page of Flash memory does not change the value of the upper half page C6711 DSK _j Locator contains 32 bit address of Flash location _JFLASH_START_ADDR is 0x9000000 _j Flash address range 0x90000000 to 0x90020000 FLASH_PAGE_SIZE 0x80 128 bytes Page number range 0 to 1023 JFLASH_PAGE_ADDR x FLASH_START_ADDR x FLASH_PAGE_ SIZE _j If the source address begins in the middle of a page the write will invalidate all other data on the page To write from writeBuffer to pages 1 and 2 char writeBuffer FLASH PAGE SIZE 2 FLASH write Uint32 writeBuffer FLASH _PAGE_ADDR 1 FLASH _PAGE_SIZE 2 FLASH API Module 6 7 Chapter 7 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 Topic Page 7A LED API Module Description c 2s lt 2 sc0ece00tscsesuecneeees 7 2 LED APIReference ernea ne a renes a 7 1 LED API Module Description 7 1 LED API Module Description This module ha
Download Pdf Manuals
Related Search
Related Contents
BMW L.E.D. RING BULB GE JE1590 User's Manual Appliance Manual 03 88 86 68 54 Fax : 03 88 86 74 76 Email : support@s User Manual - Lightspeed Technologies, Inc. BST220 BST221 Tender Notice for the Provisioning & Installation of IP MANUALE USO E MANUTENZIONE Riscaldatori elettrici a Pericolo d`infortunio Copyright © All rights reserved.
Failed to retrieve file