Home
Embedded SDK (Software Development Kit)
Contents
1. Blue Text Linkable on line efer to Chapter 7 License Number Any number is considered a 3V positive value unless preceded 410 by a minus symbol to signify a negative value DES ALL CAPITAL Variables directives defined INCLUDE DSPFUNC LETTERS constants files libraries define INCLUDE STACK CHECK ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Brackets Function keys by pressing function key F7 Quotation marks Returned messages the message Test Passed is displayed if unsuccessful for any reason it will return NULL Definitions Acronyms and Abbreviations The following list defines the acronyms and abbreviations used in this document As this template develops this list will be generated from the document As we develop more group resources these acronyms will be easily defined from a common acronym dictionary Please note that while the acronyms are in solid caps terms in the definition should be initial capped ONLY IF they are trademarked names or proper nouns DSP T O IDE LSB Digital Signal Processor or Digital Signal Processing Input Output Integrated Development Environment Least Significant Bit V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005
2. 3E xb He Sk db db db db db db db for mem h partitions external program memory available C temp registrs in data 1 internal data ROM data 2 hole data segment data 3 Stack on chip peripheral on chip peripheral MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMIC text sections V 22bis Library ONDUCTOR INC 2005 config c MUST be placed first otherwise the Interrupt Vector configInterruptVector will not be located config c text text rtlib text fp engine text user text gt pram main application data at the correct address P 0x0000 Define variables for C initialization code F_Xdata_start_addr_in_ROM ADDR rom SIZI F_StackAddr ADDR stack F_StackEndAddr Al F Xdata start addr in RAM a Memory layout data for SDK INCLUDE_MEMORY FmemEXbit WRITEH _EX_BIT FmemNumIMpartitions WRITEH NUM IM PARTITIONS FmemNumEMpartitions WRITEH NUM EM PARTITIONS FmemIMpartitionList WRITEH ADDR im1 E WRITEH SIZEOF im1 2 WRITEH ADDR im2 WRITEH SIZEOF im2 2 FmemEMpartitionList WRITEH ADDR em WRITEH SIZEOF em 2 data sections data fp state data rtlib data HE
3. 6 V 22bis Applications describes the use of V 22bis Library through test demo applications e Chapter 7 License provides the license required to use this product Suggested Reading We recommend that you have a copy of the following references e DSP56800 Family Manual DSP56800FM AD e DSP568xx User s Manual for the DSP device being implemented e Inside CodeWarrior Core Tools Metrowerks Corp MOTOROLA Preface ix For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Conventions This document uses the following notational conventions Typeface Symbol or Term Meaning Examples Courier Monospaced Type Commands command parameters code examples expressions datatypes and directives Foundational include files a data structure of type vad_tConfigure Italic Calls functions statements the pConfig argument e a e 7 defined in the C header file aec h arguments file names an applications makes a call to the Callback procedure Bold Reference sources paths efer to the Targeting DSP56824 Platform emphasis manual see C Program FilesMotorola Embedded SDK help tutorials Bold Italic Directory name project name and contains these core directories applications contains applications software CodeWarrior project 3des mcp is
4. SEMICONDUCTOR INC 2005 The applications directory includes high level software that exercises these modem libraries For example the application v22 demo shown in Figure 2 4 can interface the V 22bis library with the PC application hyperterminal to produce user specified functionality MOTOROLA Erg nos EF Td applicatians E XL applications Data H H codec H E des H E eeprom H E serial m telephony H E timer gc wee demo POR i Config H E bsp H E buildall Data Sr config E include Eg modem Eg modem Data mr v22 p vbi mc security H E signal H E sys Figure 2 4 V22bis applications Directory Directory Structure 2 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Directory Structure 2 4 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 3 V 22bis Library Interfaces 3 1 V 22bis Services V 22bis provides the data pump service which modulates the bits to be transmitted and demodulates the bits to be received This library accepts as input a stream of bits at 1200 2400bps modulates and calls back the application providing 12 samples call back at a sampling rate of 7200 samples second The us
5. Use of v22bisR X InferbiGb e ascazeseseukbecebuebt 4 mondo Use or v22bisDestroy Interface cuassonseueR ose p E RARE ER EE RES Votes Library SECUS ig eh hb Ceiba pape dad List of Examples For More Information On This Product Go to www freescale com vii Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 viii Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 About This Document This manual describes the V 22bis telecommunication algorithm for use with Motorola s Embedded Software Development Kit SDK Audience This document targets software developers implementing communications functions within software applications Organization This manual is arranged in the following sections e Chapter 1 Introduction provides a brief overview of this document e Chapter 2 Directory Structure provides a description of the required core directories e Chapter 3 V 22bis Library Interfaces describes all of the V 22bis Library functions e Chapter 4 Building the V 22bis Library tells how to execute the system library project build e Chapter 5 Linking Applications with the V 22bis Library describes organization of the V 22bis Library e Chapter
6. library The parameter p Config points to a data structure of the type v22bis sConfigure its fields initialize V 22bis operation in the following manner Flags A set of configuration options for the V 22bis data pump These flags are OR ed together to produce the Flags parameter value Flags options include V22BIS CALL MODEM Makes V 22bis a calling modem V22BIS ANSWER MODEM Makes V 22bis an answering modem V22BIS GUARD TONE ENABLE Enables the guard tone V22BIS GUARD TONE DISABLE Disables the guard tone V22BIS GUARD TONE 550Hz Sets the guard tone at 550Hz V22BIS GUARD TONE 1800Hz Sets the guard tone at 1800Hz V22BIS SELF RETRAIN ENABLE Reestablishes a connection if lost V22BIS SELF RETRAIN DISABLE Does not reestablish a lost connection V22BIS ENABLE 2100 ANSWERTONE Sends Expects 2100Hz answer tone V22BIS DISABLE 2100 ANSWERTONE 0x2000 Does not send expect 2100Hz answer tone V22BIS V14 ENABLE ASYNC MODE Enables padding start amp stop bits V22BIS V14 DISABLE ASYNC MODE No start amp stop bits plain data V22BIS LOOPBACK ENABLE Enables loopback mode for testing V22BIS LOOPBACK DISABLE Disables test loopback mode 3 6 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 pTXCallback A pointer to a v22bis_sTXCallback structure describin
7. the modem is not retraining in the data mode e Inthe data mode after handshake is complete v22bisTX should be called only after calling v22bisTXDatalnit to initialize the transmitter with the user data e Once the transmitter has been initialized with the user data by calling v22bisTXDatalnit keep calling v22bisTX until the return status is FAIL At this point all user data has been transmitted Calling v22bisTXDatalnit again supplies the next data to the transmitter e In the asynchronous mode of operation v22bisTX appends one start and one stop bit to every byte of user data In the synchronous mode no start and stop bits will be added e Inthe asynchronous mode of operation if v22bisTX is called without any user data stop bits will be transmitted every call Even if the user data is not available the application program should keep calling the v22bisTX routine to maintain the carrier synchronization with the remote modem e The v22bisTX routine should not be called when the modem is in retraining mode During this mode the receiver itself calls the transmitter and makes the transmit callback whenever 12 samples are generated MOTOROLA V 22bis Library Interfaces 3 13 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Code Example 3 6 Use of v22bisTX Inter
8. 2bis TXCallback pConfig gt RXCallback v22bis RXCallback Call Create routine pV22bis v22bisCreate Call Init routine v22bis sConfigure pConfig result v22bisInit pV22bis pConfig result v22bisRX pV22bis sample array UWordl6 NumberSamples 3 16 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 6 v22bisControl Call s Specifications Result v22bisControl UWord16 Command Required Header v22bis h Arguments Table 3 6 v22bisControl Arguments Command in The command to be executed by the v22bisControl procedure Description The v22bisControl function provides control functions to the V 22bis data pump algorithm The parameter pV22bis must have been generated from a call to v22bisCreate Currently no control commands are supported for V 22bis this is for future use Returns If used this function always returns PASS MOTOROLA V 22bis Library Interfaces 3 17 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 7 v22bisDestroy Call s void v22bisDestroy v22bis sHandle pV22bis Req
9. 3 2 for a description of the v22bis sConfigure fields Returns Upon successful completion the v22bisCreate function will return a pointer to the specific instance of V 22bis created If v22bisCreate is unsuccessful for any reason it will return NULL Special Considerations The current implementation of V 22bis requires memory sections to be allocated via linker commands For details on linking applications see Chapter 5 Code Example See Code Example 3 5 MOTOROLA V 22bis Library Interfaces 3 5 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 2 v22bislnit Call s Result v22bisInit v22bis sHandle pV22bis v22bis sConfigure pConfig Required Header v22bis h Arguments Table 3 2 v22bisinit Arguments pV22bis in Pointer to an instance of V 22 bis pConfig in A pointer to a data structure containing data for initializing the V 22bis algorithm Description The v22bisInit function will initialize the V 22bis data pump algorithm During initialization all resources will be set to their initial values in preparation for V 22bis operation The current V 22bis implementation is NOT re entrant so multiple instances are NOT supported The library itself allocates static memory for V 22bis operation so the user need not allocate memory for the
10. 7 License T4 Limited Lise License Agreement 42 eyes ceeeres E tyr Edain rr EET ji V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Tables Table 1 1 Table 3 1 Table 3 2 Table 3 3 Table 3 4 Table 3 5 Table 3 6 Table 3 7 MOTOROLA V 22016 Operating Range LiiuasssezarbreshrusA der erEgakRwdd4du iud ZO ROUES FPS 3 ud parx qd SO DKA SRE OR RO IEEE Ede dead pratici MN teo loo os PTCI EITOTTTET v22bisTXDatalnit Arguments 64424540 we edad ebd RR RRSRRSARARRIC E RR Velo FIOM chek cagdosistintdessadhnad eds cegehese chores UAE PAINS aiiud ar er REN cane scb E vedas EN IJATM ES TS Ph ON ATI oaa sachet Cn dR QS RU Fon ce dob up dci i es vabisDestroy Arguments 4 655664 259555 e rEEATERPRA ME REPE OH S54 List of Tables For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Figures Figure 2 1 Figure 2 2 Figure 2 3 Figure 2 4 Figure 4 1 Figur
11. Arg v22bis eStatus Status Wordl6 pSamples UWordl6 NumberSamples extern void RXCallbackRoutine void pCallbackArg v22bis eStatus Status char pBits UWordl16 NumberBits MOTOROLA V 22bis Library Interfaces 3 15 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 v22bis sTXCallback v22bis TXCallback Transmit callback routine v22bis sRXCallback v22bis RXCallback Receive callback routine void test v22bis void v22bis_sConfigure pConfig v22bis_sHandle pV22bis Result result UWord16 modem_config Wordl6 sample array 12 UWordl6 NumberSamples 12 12 samples in the buffer Modem configuration parameters modem config 0 modem config V22BIS ANSWI Lr GI R MODEM V22BIS GUARD TONE DISABLE V22BIS SELF RETRAIN ENABLE V22BIS V14 ENABLE ASYNC MODE Allocate memory for the init structure pConfig memMallocEM sizeof v22bis sConfigure v22bis TXCallback pCal v22bis RXCallback pCal lback TXCallbackRoutine lback RXCallbackRoutine Initialize the init structure pConfig gt Flags modem config pConfig gt TXCallback v2
12. CALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 2 2 Optional Domain Specific Directories Directory Structure Figure 2 2 demonstrates how the V 22bis algorithm is encapsulated in the domain specific directory modem EM are Eg dspB6824evm EME nos Eg applications H A bsp config include 2 c3 JE modem 2 eu signal SWS tools Figure 2 2 modem Directory The modem directory includes such modem specific algorithms as V 22bis V 42bis V 8bis and others The v22 directory includes the V 22bis specific algorithms Figure 2 3 shows the directories specific to V 22bis found in the v22 directory Cg modem Bag v22 A Figure 2 3 V22bis Directory Structure The code sub directory under the v22 directory includes the following e api includes both C and assembly API files for the V 22bis library rx contains Assembly source files to implement the V 22bis receiver e tx contains Assembly source files to implement the V 22bis transmitter The fest sub directory under the v22 directory includes the following e Config includes the configuration files appconfig h appconfig c and linker cmd for testing the V 22bis library 2 2 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semicondug tor ING a in Specific Directories ARCHIVED BY FREESCALE
13. EMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Motorola reserves the right to make changes without further notice to any products herein Motorola makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Motorola assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typical parameters which may be provided in Motorola data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Motorola does not convey any license under its patent rights nor the rights of others Motorola products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur Should Buyer purchase or use Motorola products for any such unintended or unauthorized application Buyer shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributor
14. FAIL Code Example 3 5 Use of v22bisTXDatalnit Interface include v22bis h include mem h extern void TXCallbackRoutine void pCallbackArg v22bis eStatus Status Wordl6 pSamples UWordl6 NumberSamples extern void RXCallbackRoutine void pCallbackArg v22bis eStatus Status char pBits UWordl16 NumberBits v22bis sTXCallback v22bis TXCallback Transmit callback routine v22bis sRXCallback v22bis RXCallback Receive callback routine void test v22bis void v22bis_sConfigure pConfig v22bis sHandle pV22bis Result result UWord16 modem_config char bit_array 20 V22bis testing UWord16 NumberBytes 14 Number of bytes in the string Modem configuration parameters MOTOROLA V 22bis Library Interfaces 3 11 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library Interfaces ARCHIVED BY modem_config 0 Freescale Semiconductor Inc FREESCALE SEMICONDUCTOR INC 2005 modem config V22BIS ANSWER MODEM V22BIS GUARD TONE DISABLE V22BIS SELF RETRAIN ENABLE V22BIS V14 ENABLE ASYNC MODE Allocate memory for the init structure pConfig memMallocEM sizeof v22bis sConfigure v22bis TXCallback pCallback TXCallbackRoutine v22bis RXCallback pCallback RXCallbackRoutine I
15. Freescale Semiconductor Inc Q MOTOROLA Embedded SDK Software Development Kit V 22bis Library SDK108 D Rev 2 07 23 2002 ales Pd MOTOROLA Inr D Motorola Inc 2002 All rights reserved intelligence everywhere digital dna For More Information On This Product o to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Contents About This Document JAUOISDOE casas Bek REO RAR E Ed SENE Vd EE OE E E SEE POR 1x CRGO SUB diode Ye Fe ORO AES e OR EAR SEES Oe Ra SS ix Suggested Reade iis 43edA t bbsRaXA d bireti de eae ceeds baedee RE d RR EA ix E E I E E E E GAs EE a E S E T AE o ra es X Definitions Acronyms and Abbreviations 442445200s2ceaserasienaeen es X ed PEIPER ous Lese Ear re died qiddrddduidddde sxd eS idu eeu aa xi Chapter 1 Introduction 1 1 NC BAe E E E E EEE E E E TEE E E E E E EE 1 1 1 2 CSR OF VIZ DIR aa kk ok ab SEX ud eo ERR Deed RC ewe RE ds 1 1 1 2 1 DESI oor od a PR bee e hase TANT TVRUS NE YT PESOINT ET Ed add riis 1 2 1 2 2 Features and Performance 0 0 ccc cee eee nh 1 2 Chapter 2 Directory Structure 2 1 Required Core Directories 22se nsyAmessAutpLq re e 344 ER RE sx Qn wus 2 1 2 4 Optiona
16. ION IN CONTRACT NEGLIGENCE OR PRODUCT LIABILITY EVEN IF MOTOROLA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE THIS DISCLAIMER OF WARRANTY EXTENDS TO LICENSEE OR USERS OF PRODUCTS AND IS IN LIEU OF ALL WARRANTIES WHETHER EXPRESS IMPLIED OR STATUTORY INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR PARTICULAR PURPOSE Motorola does not represent or warrant that the Software is free of infringement of any third party patents copyrights trade secrets or other intellectual property rights or that Motorola has the right to grant the licenses contained herein Motorola does not represent or warrant that the Software is free of defect or that it meets any particular requirements or need of the Licensee or that it conforms to any documentation or that it meets any standards Motorola shall not be responsible to maintain the Software provide upgrades to the Software or provide any field service of the Software Motorola reserves the right to make changes to the Software without further notice to Licensee The Software is not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Software could create a situation where personal injury or death may occur Should Licensee purchase or use the Software for any such unintended or unauthorized application Licensee
17. LABL Gl carrierlosttime 0 num bytes NumberBits gt gt 3 for i 0 i lt num bytes i Outbuffer num rx bytes pBitst num rx bytes tt if Status V22BIS CARRIER LOST IN DATAMODI Gl carrierlosttimet If carrier drop is for more than 5 sec terminate th modem connection 5 sec is chosen just to validate the API for carrier drop User needs to chose a specific time for his her own application The Rx Callback is made every 12 samples and the sampling rate is 7200 Hz For five seconds the time count is 7200 5 12 3000 if carrierlosttime 3000 connection lost 1 For details on the structures above please refer to the C header file v22bis h shown in Code Example 3 1 as a reference Returns Upon successful completion a value of TRUE will be returned Otherwise a value of FALSE will be returned Special Considerations This function must be called first and called only once by the user to initialize the V 22bis modem algorithm The current implementation of V 22bis requires memory sections to be allocated via linker commands For details on linking applications see Chapter 5 Code Example 3 4 Use of the v22bislnit Interface include v22bis h include mem h extern void TXCallbackRoutine void pCallbackArg v22bis eStatus Status Wordl6 pSamples UWordl6 NumberSamples extern void RXCallbackRoutine void pCallbackArg v22bis eStatus S
18. MAC Multiply Accumulate MIPS Million Instructions Per Second MSB Most Significant Bit OnCE On Chip Emulation OMR Operating Mode Register PC Program Counter SDK Software Development Kit SP Stack Pointer SPI Serial Peripheral Interface SR Status Register SRC Source References The following sources were used to produce this book 1 DSP56800 Family Manual DSP56800FM AD 2 DSP568xxUser s Manual 3 Embedded SDK Programmer s Guide MOTOROLA Preface For More Information On This Product Go to www freescale com Xi Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Xii Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 1 Introduction Welcome to Motorola s Family of Digital Signal Processors DSPs This document describes the V 22bis Library which is a part of Motorola s comprehensive Software Development Kit SDK for its DSPs In this manual you will find all the information required to use and maintain the V 22bis Library interface and algorithms Motorola provides these algorithms to you for use on the Motorola Digital Signal Processors to expedite your application development and reduce the time it takes to bring your own produ
19. TABLISHED connection established 1 if Status V22BIS DATA AVAILABLI for i 0 i lt NumberSamples i CodecTxBuffer i pSamples i Write the samples to the codec write CodecTx CodecTxBuffer NumberSamples CJ Receive Callback Procedure This callback routine sets a global flag connection lost to indicate to the main routine that the connection is lost with the remote modem If there are valid received bits they are written to the output buffer In Code Example 3 3 Outbuffer refers to the output buffer of type char and num rx bytes is used to count the number of bytes received This callback routine also updates a global variable carrierlosttime used to keep track of carrier lost time If carrier is lost continuously for more than 5 seconds then the global flag conection lost will be set to indicate that the connection might have been lost Code Example 3 3 Sample Receive Callback Procedure void RXCallbackRoutine void pCallbackArg v22bis eStatus Status char pBits UWord16 NumberBits UWord16 num bytes i if Status V22BIS CONNECTION LOST 3 8 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 connection_lost 1 Specifications if Status V22BIS_DATA_AVAI
20. TONE 550Hz 0x0000 define V22BIS GUARD TONE 1800Hz 0x0004 define V22BIS SELF RETRAIN ENABLE 0x0008 define V22BIS SELF RETRAIN DISABLE 0x0000 define V22BIS ENABLE 2100 ANSWERTONE 0x0000 define V22BIS DISABLE 2100 ANSWERTONE 0x2000 define V22BIS V14 ENABLE ASYNC MODE 0x4000 define V22BIS V14 DISABLE ASYNC MODE 0x0000 define V22BIS LOOPBACK ENABLE 0x8000 define V22BIS LOOPBACK DISABLE 0x0000 S EEK K KKK kk kc ke ko ke ko ko KKK kk ke ke ek k ke k ee Structure for V22bis Status FRA RA A A A AA AA A ee eee f typedef enum V22BIS_1200BPS_CONNECTION_ESTABLISHED V22BIS_2400BPS_CONNECTION_ESTABLISHED V22BIS_CONNECTION_LOST V22BIS_DATA AVAILABLE V22BIS RETRAINING V22BIS CARRIER LOST IN DATAMODI v22bis eStatus BI typedef struct void pCallback void pCallbackArg v22bis_eStatus Status char pBits UWord16 NumberBits void pCallbackArg v22bis sRXCallback typedef struct void pCallback void pCallbackArg v22bis eStatus Status Wordl6 pSamples UWordl6 NumberSamples void pCallbackArg v22bis sTXCallback Please refer to the defines above which go into Flags mentioned in the structure define below typedef struct 3 2 V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Fr
21. V22bis external data starts here TX_MEM data API data HE V22bis external data ends here MOTOROLA Linking Applications with the V EOF rom 2 DDR stack SIZEOF stack 2 1 mem h support 22bis Library 5 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Fresacale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 F Xdata ROMtoRAM length 0 F bss start addr _BSS_ADDR rtlib bss 1lo bss V22bis bss starts here TX_MEM bss API bss V22bis bss ends here F bss length _BSS_ADDR Copy DATA data FArchIO ADDR onchip2 Internal memory allocation for V22bis V22bis_internal_data ALIGN 0x100 For modulo buffer of size 256 V22B_PROM data ROM XMEM data ALIGN 0x40 For modulo buffer of size 64 RX MEM data bss sections V22B PROM bss ROM_XMEM bss RX_MEM bss gt imi 5 4 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 6 V 22bis Applications 6 1 V 22bis Test and Demo Applications To verify the V 8 algorithm test and demo applications ha
22. bis pConfig 3 10 V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 3 v22bisT XDatalnit Call s Specifications Result v22bisTXDataInit v22bis sHandle pV22bis char pBits UWordl6 NumBytes Required Header v22bis h Arguments Table 3 3 v22bisTXDatalnit Arguments pV22bis in Pointer to an instance of V 22 bis pBits in Pointer to the user data bits to be transmitted by the V 22bis NumBytes in The number of data bytes to be transmitted Description This module should be called to initialize the modem transmitter with the data to be transmitted to the remote modem Transmission of actual data user bits will begin only after the modem establishes the connection with the remote modem While the modem is transmitting data the buffer pointed by pBits should not be disturbed When the transmission of current data is complete the user can call this module with the next data available See v22bisTX Section 3 3 4 for details on the use of v22bisTXDatalnit For complete details on the use of v22bisTXDatalnit please refer to the files nos applications v22interopcans c or nos applications v22 interopcall c Returns Upon successful completion v22bisTXDatalnit will return PASS if any error occurred it will return
23. cts to market Motorola s V 22bis Library is licensed for your use on Motorola processors Please refer to the standard Software License Agreement in Chapter 7 for license terms and conditions please consult with your Motorola representative for premium product licensing 1 1 Quick Start Motorola Embedded SDK is targeted to a large variety of hardware platforms To take full advantage of a particular hardware platform use Quick Start from the Targeting Motorola DSP568xx Platform documentation For example the Targeting Motorola DSP56824 Platform manual provides more specific information and examples about this hardware architecture If you are developing an application for a DSP56824EVM board or any other DSP56824 development system refer to the Targeting Motorola DSP56824 Platform manual for Quick Start or other DSP56824 specific information 1 2 Overview of V 22 bis V 22bis conforms to the V 22 bis Low Speed Modem ITU T Standard Lower end internet telephony and e cash applications require a low speed modem for exchanging data The ITU T standard V 22bis with 2400 bits per second is usually the preferred modem for these applications Motorola has developed internally a single library module containing the V 22 bis modem Using a network simulator the modem was tested over all possible telephone networks available in continental North America and is available for the Motorola DSP568xx range of processors MOTOROLA Introduction 1 1 F
24. d keep calling only v22bisRX the V 22bis receiver as explained in Section 3 3 5 When the transmitter has 12 samples it will make a callback to the user application as described in v22bisInit Section 3 3 2 These samples are to be transmitted to the codec at 7200 samples second by the user application During handshake mode v22bisRX will make a callback to the user application with the return value V22BIS 1200BPS CONNECTION ESTABLISHED or V22BIS 2400BPS CONNECTION ESTABLISHED Once the connection is established the user calls v22bisTXDatalnit to initialize the transmitter with the data to be transmitted As explained in Code Example 3 6 v22bisTX can be called by the user application and makes a callback when it has generated 12 samples It generates 12 samples for every TWO input bits in V 22 1200bps or FOUR input bits in V 22 2400bps For complete details on the use of v22bisTX please refer to the files nos applications v22 interopans c or nos applications v22 interopcall c Returns While samples are being generated and transmitted for the valid user data PASS will be returned When all samples have been generated and transmitted FAIL will be returned Special Considerations e Inthe handshake mode the V 22bis receiver calls only the transmitter so the application program need not call the v22bisTX routine e The v22bisTX routine should be called by the application program only in the data mode and when
25. e disclose transfer sell assign rent lease or otherwise make available the Software any derivatives thereof or this license to a third party except as expressly provided herein c not remove obliterate or otherwise defeat any copyright trademark patent or proprietary notices related to the MOTOROLA License 7 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Software d not in any form export re export resell ship or divert or cause to be exported re exported resold shipped or diverted directly or indirectly the Software or a direct product thereof to any country which the United States government or any agency thereof at the time of export or re export requires an export license or other government approval without first obtaining such license or approval License THE SOFTWARE IS PROVIDED ON AN AS IS BASIS AND WITHOUT WARRANTY OF ANY KIND INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY LIABILITY OR DAMAGES OF ANY KIND INCLUDING WITHOUT LIMITATION DIRECT OR INDIRECT OR INCIDENTAL OR CONSEQUENTIAL OR PUNITIVE DAMAGES OR LOST PROFITS OR LOSS OF USE ARISING FROM USE OF THE SOFTWARE OR THE PRODUCT REGARDLESS OF THE FORM OF ACTION OR THEORY OF LIABILITY INCLUDING WITHOUT LIMITATION ACT
26. e 4 2 Figure 4 3 MOTOROLA Core DUDSCIOURR 4 646654 bob bith ons d eadi ki bees ei TAquE E modem LECT iiia d door E E SO HOOK OG HERE RO CERO ERE dad V22pis Directory SMC o disc ee oe ER PRU REICHEN ORE CEN V 22bis applications Directory 2422s casehsasssseasunbectrb4k hb nd Dependency Build for V 22bis Library 26225504 eu RRERA REP RERESEREA EA A os pra E gc b ERI d eb er RP BS PERI LS qe Pere ER aod oewes9 Edd euros deosque dd eub dq EEEE e edd qat List of Figures For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 vi Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Examples Code Example Code Example Code Example Code Example Code Example Code Example Code Example Code Example Code Example MOTOROLA 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 5 1 C Header Ple v2 5 PT Sample Transmit Callback Procedure cissecso ee ert Re nm Sample Receive Callback Procedure i 22ssassu os eh d Use or the y22bisinit DIEGEDIOES eus aw v wEeaRz AS EEP CE E YF E TY Key Use or v22bis TX Datalnit Ilet fate 2 22 22 4224949 243 eds adda es Use of v22BISTX MEIE oa3 Sese eu VII V YEAH RUM A RR
27. eescale Semiconductor Inc Interface ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 UWord16 Flags v22bis_sTXCallback TXCallback v22bis sRXCallback RXCallback v22bis sConfigure This structure is not currently used it is given here for future use typedef struct UWordl6 Flags v22bis sHandle BRK KKK k k k KKK kc kk ke ke ke k k KKK Function Prototypes Fe KARA A eee ee eee e k EXPORT v22bis sHandle v22bisCreate v22bis sConfigure pConfig EXPORT Result v22bisInit v22bis sHandle pV22bis v22bis sConfigure pConfig EXPORT Result v22bisTXDataInit v22bis sHandle pV22bis char pBits UWordl6 NumBytes EXPORT Result v22bisTX v22bis sHandle pV22bis EXPORT Result v22bisRX v22bis sHandle pV22bis Wordl6 pSamples UWord16 NumberSamples EXPORT Result v22bisDestroy v22bis sHandle pV22bis EXPORT Result v22bisControl UWord16 Command fendif MOTOROLA V 22bis Library Interfaces 3 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 Specifications The following pages describe the V 22bis library functions Function arguments for each routine are described as in out or inout An in argument means that the parameter value is an input only to the function An out argument mean
28. enter this license agreement If Licensee does not agree with and accept the terms of this Agreement Licensee must return or destroy any media containing the Software or materials related thereto and destroy all copies of the Software The Software is licensed to Licensee by Motorola Incorporated Motorola for use under the terms of this Agreement Motorola retains ownership of the Software Motorola grants only the rights specifically granted in this Agreement and grants no other rights Title to the Software all copies thereof and all rights therein including all rights in any intellectual property including patents copyrights and trade secrets applicable thereto shall remain vested in Motorola For the Source Motorola grants Licensee a personal non exclusive non assignable revocable royalty free right to use copy and make derivatives of the Source solely in a development system environment in order to produce object code solely for operating on a Motorola semiconductor device having a central processing unit Derivative Object For the Object and Derivative Object Motorola grants Licensee a personal non exclusive non assignable revocable royalty free right to copy use and distribute the Object and the Derivative Object solely for operating on a Motorola semiconductor device having a central processing unit Licensee agrees to a not use modify or copy the Software except as expressly provided herein b not distribut
29. er application must transmit these samples to the codec at 7200 samples second Similarly the receiver accepts the samples at 7200 samples second demodulates and calls back the user application providing a byte 8 bits per call back The V 22bis library can be accessed through these APIs create transmit receive and destroy 3 2 Interface The C interface for V 22bis library services is defined in the C header file v22bis h shown in Code Example 3 1 Code Example 3 1 C Header File v22bis h File v22bis h ifndef _ V22bis H define V22bis H BRK K K K ke ke kk kk ke ke ke ke ke ke ke k k ke e ek Foundational Include Files Fe AK koe ke ke ke ke ee koe e e k f include port h BKK ko kk ko kk ko ko ko kk I k k k K k k k k k k ke ke ke ke k ke k ee define for V22bis configuration flags FA KARA A oko ee AAA A He He He a HH f define V22BIS CALL MODEM 0x0000 define V22BIS ANSWER MODEM 0x0001 MOTOROLA V 22bis Library Interfaces 3 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 define V22BIS GUARD TONE ENABLE 0x0002 define V22BIS GUARD TONE DISABLE 0x0000 define V22BIS GUARD
30. essful a v22bis lib library file is created in the modem v22 Debug directory 4 2 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 5 Linking Applications with the V 22bis Library 5 1 V 22bis Library The V 22bis library includes a transmitter and a receiver The library also includes APIs which provide the interface between the user application and the V 22bis modules To use the V 22bis library APIs must be called in this order v22bisInit y v22bisRX y Keep calling this module till it returns the message V22BIS CONNECTION ESTABLISHED After the connection is established call this module whenever there are samples to be processed v22bisTxDatalInit y This module should be called by the user once the modem enters into the data mode v22bisTX y The user needs to call this module whenever there are bits to be transmitted 5 1 1 Library Sections The V 22bis Library contains program memory internal data memory and data internal or external mem Ory sections Internal data memory sections for V 22bis include e V22B PROM contains all tables for filter coefficients and the necessary data to be placed in the internal memory This section also conta
31. face incl lude incl extern void TXCa v22bis h lude mem h lbackRoutine void pCallbackArg v22bis eStatus Status extern void RXCa v22bis sTXCa v22bis sRXCal l void 3 14 Wordl6 pSamples UWordl6 NumberSamples lbackRoutine void pCallbackArg v22bis_eStatus Status test_v22bis char pBits UWordl16 NumberBits lback v22bis TXCallback Transmit callback routine back v22bis RXCallback Receive callback routine void v22bis sConfigure pConfig v22bis sHandle pV22bis Result UWord16 char UWord16 result modem_config bit_array 20 V22bis testing NumberBytes 14 Number of bytes in the string Modem configuration parameters modem_config 0 modem config V22BIS ANSWER MODEM V22BIS GUARD TONE DISABLE Allocate memory for the init structure Lu V22BIS SELF RETRAIN ENABLE V22BIS V14 ENABLE ASYNC MODI pConfig memMallocEM sizeof v22bis sConfigure v22b v22b is TXCallback pCallback TXCallbackRoutine is RXCallback pCallback RXCallbackRoutine Initialize the init structure pConfig Flags modem config pConfig gt TXCallback v22bis TXCallback pConfig RXCallback v22bis RXCallback Call Create rou
32. g the procedure which V 22bis will call as 16 bit linear PCM samples are generated by the V 22bis Transmit algorithm The callback procedure has the following declaration Specifications void pCallback void pCallbackArg v22bis_eStatus Status UWordl6 pSamples UWord16 NumberSamples The callback procedure parameter pCallbackArg is supplied by the user in the v22bis_sTXCallback structure this value is passed back to the user during the call to the callback procedure Typically pCallbackArg points to context information used by the user s callback procedure Status Takes one of the values from the enumeration v22bis_eStatus The enumeration is listed below for reference V22BIS_1200BPS_CONNECTION_ESTABLISHED V22BIS_1200BPS_CONNECTION_ESTABLISHED V22BIS_2400BPS_CONNECTION_ESTABLISHED V22BIS_CONNECTION_LOST V22BIS_DATA_AVAILABLE V22BIS_RETRAINING V22BIS CARRIER LOST IN DATAMODE pSamples A pointer to the buffer containing linear 16 bit PCM samples generated by V 22bis transmitter NumberSamples Represents the number of samples in the buffer pointed to by pSamples pRXCallback A pointer to a v22bis sRXCallback structure describing the procedure which v22bis will call as data bits are received by the V 22bis Receive algorithm The callback procedure has the following declaration void pCallback void pCallbackArg v22bis eStatus Status UWordl6 pBits UWordl16 NumberBits The callback proced
33. ically build when the application is built gloopback test mcp iof x Link Order Targets 39 application i3 Y A mE C Sources 0 0 mE g EE Dependencies i 0 D rl v ECQ9MSL D o g HO SDK Configuration D 0 e amp g SDK Libs 0 o m Eg SDK Projects D o m E bsp mep n a n a E R3 dspfunc mep n a n a E R3 sys mcp n a n a o E tools mcp n a n a E D 22 mcp ma ma m 18 files oO Z Figure 4 1 Dependency Build for V 22bis Library MOTOROLA Building the V 22bis Library 4 1 For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Building the V 22bis Lip f reescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 4 1 2 Direct Build Direct build allows you to build a V 22bis library independently of any other build Follow these steps Step 1 Open v22bis mcp project as shown in Figure 4 2 g v22 mcp Link Order Targets HQT Files g Rx Files EH C API Files Figure 4 2 v22bis mcp Project Step 2 Execute the build by pressing function key F7 or by choosing the Make command from the Project menu see Figure 4 3 Metrowerks CodeWarrior Project Sen 5 m 22 mcp Link Orde Bikes EBIGGESS 30 Library EGUITIBIIE Fokan mE Ts Files g HRs Files g E C API Files E irj Ur E irte B sinjrie Figure 4 3 Execute Make If the build is succ
34. ins modulo buffers so section alignment is needed As a rule if a section contains circular modulo buffers that section should be aligned to the maximum circular buffer length The largest modulo buffer size is 256 words so the section should be aligned for 256 words see Code Example 5 1 for information on aligning the sections ROM XMEM static data needed for V 22bis transmitter and receiver which should be placed in the internal memory e RX MEM temporary data variables needed by the V 22bis receiver which should be placed in the internal memory and should be aligned to length 64 words MOTOROLA Linking Applications with the V 22bis Library 5 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Fresacale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Data internal or external memory sections for V 22bis include e API contains data needed for API routines e TX_ MEM temporary variables needed by the V 22bis transmit routines Note All of the memory sections are grouped together for placement in different memory regions on the target The memory regions and the grouping order of the sections under each region are shown in Code Example 5 1 for reference The order of the sections within each memory region should not be altered and if altered the V 22bis library may not function as expected For details see the lin
35. ker cmd file found in the modem v22 test Config directory in the SDK Code Example 5 1 V 22bis Library Sections 4 Linker cmd file for DSP56824EVM External RAM using both internal and external data memory and using external program memory Mode 3 EMORY pram avail cwregs iml rom im2 hole data em stack onchipl onchip2 FORCE ACTIVI n ECTION j main appl S i F ij _EX_BIT Internal NUM IM PARTI Data X External RWX RW RW Memory Partitions Memory Partition NUM EM PARTI EX 0 ORIGIN 0x0000 LENGTH OxFF80 ORIGIN 0x0000 LENGTH 0x0030 ORIGIN 0x0030 LENGTH 0x0010 CodeWarrior ORIGIN 0x0040 LENGTH 0x07CO ORIGIN 0x0800 LENGTH 0x0800 ORIGIN 0x1000 LENGTH 0x0600 ORIGIN 0x1600 LENGTH 0x0A00 ORIGIN 0x2000 LENGTH 0xC000 ORIGIN OxE000 LENGTH 0x1000 ORIGIN OxF000 LENGTH 0x0F80 ORIGIN OxFF80 LENGTH 0x0040 registers ORIGIN OxFFCO LENGTH 0x0040 registers E FconfigInterruptVector Memory Layout 0 IONS 1 d iml and im2 IONS 1 d em lication code for mem h partitions V 22bis Library For More Information On This Product Go to www freescale com
36. l Domain Specific Directories 61 ssesvesk sehr day orn 2 2 Chapter 3 V 22bis Library Interfaces 3 1 Y DS BPC C s bora vx doe did EO c od GER eg wd Se RC LUCA RC RU E FR iN 3 1 3 2 Wien 1 hehe oth been bbe be eed babe oie eed he S OT EE EEE 3 1 23 er I ea ere E433 Pa aa Poe ie S E OW do Pe PE SG ee E does 3 4 23 4 VIS Aes va dpa EROR EE ER OP Bel eb ELE Ad RES 3 5 3 3 2 CES PIDE EC TRITICI 3 6 3 3 3 Ves A Dalen e eke dc ote 33 RR d e qo d depo Rd eos 3 11 3 3 4 vac bg pr aer IC OR EE E E E S P R DER 3 13 3 3 5 VEZDIGR X au Kad kd EKO PAD REOR dX e RE ERR EROR ORC RR HR ER e 3 15 3 3 6 gU Db OMITOLl ok Shae eee eee ER ERI I bupbid rbd qpecrbrbE54 3 3 17 EX MI SERDIBSUISSIDDE a 2 rude ER OX I OCHO CE ERE HOHER FORE LES S RE 3 18 Chapter 4 Building the V 22bis Library 4 1 Bua Bi Le oo hee a HORDE OR WU APR DEOR HORS GOES 4 1 4 1 1 Dependency DAL son ae es Eann ETAN EIRA TR ETERA R ES 4 1 4 1 2 Dret Duld ew aso bee E ed Hig S RADEN A Ea SE oe dee Ee eee Eee 4 2 MOTOROLA Table of Contents For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 5 Linking Applications with the V 22bis Library IA Moe Ee a E ESE E E E E E E E ees S L MA WS cu sce ee ATENE aU do oa dau Ra uod d em b Chapter 6 V 22bis Applications 6 1 V 22bis Test and Demo Applicallong asssona esses equae 3A iran Chapter
37. nge Data Rate 2400 1200 bits per second Line Bandwidth 300 3400Hz Sampling Rate 7200Hz The V 22bis library is not multichannel For details on Memory and MIPS for a particular DSP refer to the Libraries chapter of the appropriate Targeting manual 1 2 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 2 Directory Structure 2 1 Required Core Directories Figure 2 1 details required platform directories Bay sic dL dspbB824evm aE applications Eg bsp al contig S include H E sys H E tools Figure 2 1 Core Directories As shown in Figure 2 1 DSP56824EVM has no operating system nos support and contains the following core directories applications contains applications software that can be exercised on this platform e bsp contains board support package specific for this platform config contains default HW SW configurations for this platform include contains SDK header files which define the Applicatin Programming Interface e Sys contains required system components fools contains utilities used by system components There are also optional directories that include domain specific libraries MOTOROLA Directory Structure 2 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREES
38. nitialize the ini LH t structure pConfig gt Flags modem config pConfig gt TXCallback pConfig RXCallback Call Create routi pV22bis Call Init routine result v22bisInit v22bis TXCallback v22bis RXCallback ne v22bisCreate v22bis sConfigure pConfig f pV22bis pConfig Keep calling v22bisRX till the status on the trasmit callback routine becomes Connection Establ ished Once the connection is established call v22bisTXDataInit as and when user data is available result v22bisTXDataInit pV22bis bit array NumberBytes 3 12 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 4 v22bisTX Call s Specifications Result v22bisTX v22bis sHandle pV22bis Required Header v22bis h Arguments Table 3 4 v22bisTX Arguments pV22bis in Pointer to an instance of V 22 bis Description The V 22bis transmitter should be called to generate the modulated samples corresponding to the input user bits Transmission of actual data user bits will begin only after the modem establishes the connection with the remote modem Until the connection is established the user application shoul
39. oduct Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Index C Calling modem 1 2 D Dependency Build 4 1 Direct Build 4 2 DSP x DSP56800 Family Manual xi DSP56824 User s Manual xi E Embedded SDK Programmer s Guide xi I I O x I O Services 3 1 5 1 IDE x L Linking Applications 5 1 LSB x MAC xi MIPS xi MSB xi O OMR xi OnCE xi P PC xi SDK xi SP xi SPI xi SR xi SRC xi V V 22bis Applications 6 1 V22bis Library 5 1 Performance 1 2 MOTOROLA V22bis algorithm 2 2 v22bisControl 3 17 Arguments 3 17 v22bisCreate 3 5 Arguments 3 5 v22bisDestroy 3 18 Arguments 3 18 Interface 3 18 v22bisInit 3 6 Arguments 3 6 Interface 3 9 v22bisRX 3 15 Arguments 3 15 Interface 3 15 v22bisTX 3 13 Arguments 3 11 3 13 Interface 3 11 3 14 v22bisTXDatalnit 3 11 Index For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE S
40. or More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 1 2 1 Background Introduction The ITU T V 22bis recommendation describes a split band modem for use on the General Switched Telephone Network and on Point to Point two wire leased telephone type circuits A split band modem is characterized by transmission and reception on two spectral bands which do not overlap The standard defines e Calling modem to transmit with a carrier frequency of 1200Hz and receive with a carrier frequency of 2400Hz e Answering modem to transmit with a carrier frequency of 2400Hz and receive with a carrier frequency of 1200Hz Quadrature amplitude modulation technique is used for each channel with synchronous line transmission at 600 baud The constellation could be either 16 point 4 bits baud supporting an input bit rate of 2400bps or 4 point 2 bits baud supporting 1200bps A scrambler is included in the input to the transmitter and a descrambler at the output of the receiver The modem should have both an adaptive equalizer and a compromise equalizer A guard tone of 1800 20Hz or 550 20Hz may be used while transmitting only in the high channel transmitter of the answering modem 1 2 2 Features and Performance Table 1 1 shows the operating range of the V 22bis modem Table 1 1 V 22bis Operating Ra
41. s harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part Motorola and the Stylized M Logo are registered trademarks of Motorola Inc Motorola Inc is an Equal Opportunity Affirmative Action Employer MOTOROLA and the Stylized M Logo are registered in the US Patent amp Trademark Office All other product or service names are the property of their respective owners Motorola Inc 2002 How to reach us USA EUROPE Locations Not Listed Motorola Literature Distribution P O Box 5405 Denver Colorado 80217 1 303 675 2140 or 1 800 441 2447 JAPAN Motorola Japan Ltd SPS Technical Information Center 3 20 1 Minami Azabu Minato ku Tokyo 106 8573 Japan 81 3 3440 3569 ASIA PACIFIC Motorola Semiconductors H K Ltd Silicon Harbour Centre 2 Dai King Street Tai Po Industrial Estate Tai Po N T Hong Kong 852 26668334 Technical Information Center 1 800 521 6274 HOME PAGE http www motorola com semiconductors MOTOROLA For More Information On This Product SDK108 D Go to www freescale com
42. s receiver itself calls the V 22bis transmitter to generate the samples needed for handshake Once the connection is established the v22bisRX will make a callback to the user application with the return value V22BIS 1200BPS CONNECTION ESTABLISHED or V22BIS 2400BPS CONNECTION ESTABLISHED If there is any error during the handshake the callback procedure will have a return value V22BIS CONNECTION LOST During retraining in data mode the return value on the callback is V22BIS RETRAINING In retraining mode the receiver itself calls the transmitter to generate the handshake signals If the carrier is lost while the modem is in the data mode V22BIS CARRIER LOST IN DATAMODE will be returned on the callback The user application can continue to count the continuous carrier drops and can timeout accordingly The v22bisRX demodulates 12 samples at a time decodes two or four bits and calls back the user application when eight bits are collected The v22bisRX function can be called whenever the user receives samples to process For complete details on the use of v22bisRX please refer to the files nos application v22 interopans c or nos applications v22 interopcall c Returns Upon successful completion v22bisRX will return PASS if any error occurred v22bisRX will return FAIL Code Example 3 7 Use of v22bisRX Interface include v22bis h include mem h extern void TXCallbackRoutine void pCallback
43. s that the parameter value is an output only from the function An inout argument means that a parameter value is an input to the function but the same parameter is also an output from the function Typically inout parameters are input pointer variables in which the caller passes the address of a preallocated data structure to a function The function stores its results within that data structure The actual value of the inout pointer parameter is not changed 3 4 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 1 v22bisCreate Call s Specifications v22bis_sHandle v22bisCreate v22bis_sConfigure pConfig Required Header v22bis h Arguments Table 3 1 v22bisCreate Arguments pConfig in Points to the configuration data for V 22bis Description The v22bisCreate function creates an instance of the V 22bis data pump During the v22bisCreate call any dynamic resources required by the V 22bis algorithm are allocated The current V 22bis implementation is NOT re entrant so multiple instances are NOT supported One word is allocated per instance The pConfig argument points to the v22bis sConfigure structure used to configure the V 22bis operation To initialize V 22bis operation v22bisCreate calls v22bisInit Please see v22bisInit Section 3
44. shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the Software The term of this Agreement is for as long as Licensee uses the Software for its intended purpose and is not in default of any provisions of this Agreement Motorola may terminate this Agreement if Licensee is in default of any of the terms and conditions of this Agreement This Agreement shall be governed by and construed in accordance with the laws of the State of Arizona and can only be modified in a writing signed by both parties Licensee agrees to jurisdiction and venue in the State of Arizona By using modifying installing compiling or copying the Software Licensee acknowledges that this Agreement has been read and understood and agrees to be bound by its terms and conditions Licensee agrees that this Agreement is the complete and exclusive statement of the agreement between Licensee and Motorola and supersedes any earlier proposal or prior arrangement whether oral or written and any other communications relative to the subject matter of this Agreement 7 2 V 22bis Library MOTOROLA For More Information On This Pr
45. tatus char pBits UWordl6 NumberBits v22bis sTXCallback v22bis TXCallback Transmit callback routine v22bis sRXCallback v22bis RXCallback Receive callback routine MOTOROLA V 22bis Library Interfaces 3 9 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library Interfaces ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 void test_v22bis v22bis_sConfigure v22bis_sHandle Result UWord16 v22bis_sHandle Freescale Semiconductor Inc void pConfig pV22bis result modem_config pV22bis Modem configuration parameters modem config 0 modem config Allocate memo V22BIS ANSWER MODEM V22BIS GUARD TONE y DISABLE V22BIS SELF RETRAIN ENABLE V22BIS V14 ENABLE ASYNC MODE ry for the init structure pConfig memMallocEM sizeof v22bis sConfigure v22bis TXCallback pCallback TXCallbackRoutine v22bis RXCallback pCallback RXCallbackRoutine Initialize t pConfig gt Flags pConfig TXCal he init structure modem config lback v22bis TXCallback lback v22bis RXCallback pConfig RXCal Call Create routine pV22bis v22bisCreate v22bis sConfigure pConfig Call Init routine result v22bis Init pV22
46. tine pV22bis Call result v22bisCreate v22bis sConfigure pConfig Init routine v22bisInit pV22bis pConfig Keep cal lling v22bisRX till the status on the trasmit callback routine becomes Connection Established Once the connection is established call v22bisTXDataInit as and when user data is available result v22bisTXDataInit pV22bis bit array NumberBytes Keep calling till result becomes FAIL resu lt v22bisTX pV22bis V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 5 v22bisRX Call s Specifications Result v22bisRX v22bis sHandle pV22bis Wordl6 pSamples UWordl16 NumberSamples Required Header v22bis h Arguments Table 3 5 v22bisRX Arguments pV22bis in Pointer to an instance of V 22 bis pSamples in Pointer to the 16 bit linear digital PCM samples from the analog signal NumberSamples in The number of data samples pointed to by pSamples Description The user application should call v22bisRX with samples collected from the codec The sampling rate should be 7200Hz Until the connection is established the user application should keep calling the v22bisRX function only During the handshake mode before the connection is established the V 22bi
47. uired Header v22bis h Arguments Table 3 7 v22bisDestroy Arguments pV22bis in Handle to an instance of V 22bis generated by a call to v22bisCreate Description The v22bisDestroy function destroys the instance of the V 22bis data pump originally created by a call to v22bisCreate Returns This function always returns PASS Code Example 3 8 Use of v22bisDesiroy Interface include w22bis h v22bisDestroy pV22bis 3 18 V 22bis Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 4 Building the V 22bis Library 4 1 Building the V 22bis Library The V 22bis library combines all of the components described in previous sections into one library v22bis lib To build this library a Metrowerks CodeWarrior project v22bis mcp is provided This project and all the necessary components to build the V 22bis library are located in the modem v22 directory of the SDK directory structure There are two methods to execute system library project build dependency build and direct build 4 1 1 Dependency Build Dependency build is the easiest approach and requires no additional work on the user s part If you add the V 22bis library project v22bis mcp to your application project as shown in Figure 4 1 the V 22bis library will automat
48. ure parameter pCallbackArg is supplied by the user in the v22bis sRXCallback structure this value is passed back to the user during the call to the callback procedure Typically pCallbackArg points to context information used by the user s callback procedure Status is similar to that described as part of pTXCallback pBits is a pointer to the buffer containing received bits NumberBits represents the number of received bits pointed to by pBits Only the Least Significant Bits are valid Example Transmit and Receive callback procedures are shown in Code Example 3 2 for reference you must write your own callback procedure MOTOROLA V 22bis Library Interfaces 3 7 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Library Interfaces Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Transmit Callback Procedure This callback routine sets a global flag connection established to indicate to the main routine that the connection is established with the remote modem If the data is available the generated samples are written to the codec for transmission at 7200 samples second Code Example 3 2 Sample Transmit Callback Procedure void TXCallbackRoutine void pCallbackArg v22bis eStatus Status Wordl6 pSamples UWordl6 NumberSamples Wordl6 i if Status V22BIS 1200BPS CONNECTION ESTABLISHED Status V22BIS 2400BPS CONNECTION ES
49. ve been developed Refer to the Targeting Motorola DSP568xx Platform manual for the DSP you are using to see if the test and demo applicaitons are available for your target MOTOROLA V 22bis Applications 6 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 V 22bis Applications Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 6 2 V 22bis Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 7 License 7 1 Limited Use License Agreement LIMITED USE LICENSE AGREEMENT PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THIS SOFTWARE BY USING OR COPYING THE SOFTWARE YOU AGREE TO THE TERMS OF THIS AGREEMENT The software in either source code form Source or object code form Object cumulatively hereinafter Software is provided under a license agreement Agreement as described herein Any use of the Software including copying modifying or installing the Software so that it is usable by or accessible by a central processing unit constitutes acceptance of the terms of the Agreement by the person or persons making such use or if employed the employer thereof Licensee and if employed the person making such use hereby warrants that they have the authority of their employer to
Download Pdf Manuals
Related Search
Related Contents
取生及説明書 保管用 USER MANUAL - RapidVector J`VAIS L`DIRE Istruzioni per l`uso Operating Instructions Peavey Stadia II User's Manual 茨`人織・ア黒黒一スii:バL霜=トタイム』 Sony SEL30M35 camera lense Small Brains Engineering`s Numitron Clock Users Manual DICHIARAZIONE FCC - Migros partie 2 (format pdf - 4.7 Mo) Copyright © All rights reserved.
Failed to retrieve file