Quick viewing(Text Mode)

SDK146 Reference Manual

SDK146 Reference Manual

Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... Embedded SDK and

(Software Development Kit) lines

Common Tone Generation Library product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States SDK146/D Rev. 1, 07/17/2002 United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

© Motorola, Inc., 2002. All rights reserved. For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Contents not are

About This Document currently Audience ...... ix Organization ...... ix here Suggested Reading ...... ix Conventions ...... x indicated Definitions, Acronyms, and Abbreviations ...... x References...... xi numbers

Chapter 1 part nc... Introduction and 1.1 Quick Start ...... 1-1 lines 1.2 Overview of Generation ...... 1-1 1.2.1 Background...... 1-1 1.2.2 Features and Performance...... 1-2 product DSP56852VFE Chapter 2

Directory Structure 2010:

2.1 Required Core Directories ...... 2-1 BGA-packaged 2.2 Optional (Domain-Specific) Directories...... 2-2 September to Chapter 3 Commission, Common Tone Generation Library Interfaces prior Trade 3.1 Common Tone Generation Services ...... 3-1 States 3.2 Interface ...... 3-1

3.3 Specifications ...... 3-5 United

3.3.1 ctgCreate ...... 3-6 the International in

Freescale Semiconductor, I 3.3.2 ctgInit ...... 3-8 ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR,

3.3.3 ctgGenerate ...... 3-16 sale States

3.3.4 ctgDestroy...... 3-17 or United Chapter 4 import the Building the Common Tone Generation Library for from 4.1 Building the Common Tone Generation Library ...... 4-1 order 4.1.1 Dependency Build...... 4-1 Freescale

4.1.2 Direct Build...... 4-2 an from of Because available

MOTOROLA Table of Contents i For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Chapter 5 Linking Applications with the Common Tone Generation Library

5.1 Common Tone Generation (CTG) ...... Library5-1

5.1.1 Library Sections ...... 5-1 not are Chapter 6 Common Tone Generation Applications currently 6.1 Test and Demo Applications...... 6-1 here

Chapter 7

License indicated

7.1 Limited Use License Agreement ...... 7-1 numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

ii Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

List of Tables not are

Table 3-1 ctgCreate Arguments ...... 3-6 Table 3-2 ctgInit Arguments ...... 3-8 currently

Table 3-3 ctgGenerate Arguments ...... 3-16 here Table 3-4 ctgDestroy Arguments ...... 3-17 indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA List of Tables iii For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

iv Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

List of Figures not are

Figure 2-1 Core Directories ...... 2-1 Figure 2-2 telephony Directory Structure...... 2-2 currently

Figure 2-3 ctg Directory Structure ...... 2-3 here Figure 2-4 applications directory structure...... 2-4

Figure 3-1 Cadence (Repeated) ...... 3-13 indicated Figure 4-1 Dependency Build for the CTG Library ...... 4-2 Figure 4-2 ctg.mcp Project ...... 4-2 numbers Figure 4-3 Execute Make ...... 4-3 part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA List of Figures v For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

vi Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

List of Examples not are

Code Example 3-1 C Header File ctg.h ...... 3-1 Code Example 3-2 ctgCreate Function ...... 3-6 currently

Code Example 3-3 Use of ctgCreate Interface ...... 3-7 here Code Example 3-4 Use of ctgInit Interface ...... 3-10

Code Example 3-5 Initialization and Generation of Special Information Tone for indicated Switzerland ...... 3-13 Code Example 3-6 Use of ctgDestroy ...... 3-17 Code Example 5-1 linker.cmd ...... 5-1 numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA List of Examples vii For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

viii Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are About This Document currently This manual describes the Common Tone Generation (CTG) algorithm for use with Motorola’s Embedded Software Development Kit (SDK). here

Audience indicated This document targets software developers implementing CTG within software applications. numbers part nc... Organization and This manual is arranged in the following sections: lines • Chapter 1, Introduction —provides a brief overview of this document • Chapter 2, Directory Structure —provides a description of the required core directories product • Chapter 3, Common Tone Generation Library Interfaces —describes all of the Common Tone Generation Library functions DSP56852VFE • Chapter 4, Building the Common Tone Generation Library —tells how to execute the system 2010: library project build

• Chapter 5, Linking Applications with the Common Tone Generation Library —describes BGA-packaged organization of the Common Tone Generation Library

• Chapter 6, Common Tone Generation Applications —describes the use of Common Tone September Generation Library through test/demo applications to Commission, • Chapter 7, License —provides the license required to use this product prior Trade Suggested Reading States

We recommend that you have a copy of the following references: United

the International

• DSP56800 Family Manual, DSP56800FM/AD in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, • DSP56800E 16-bit DSP Core Reference Manual, DSP56800ERM/D sale States

• DSP56824 User’s Manual, DSP56824UM/AD or • Inside CodeWarrior: Core Tools, Metrowerks Corp. United import the for from order Freescale an from of Because available

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: not Typeface,

Meaning Examples are Symbol or Term

Courier Code examples //Process command for line flash

Monospaced currently Type here Italic Directory names, ...and contains these core directories: project names, applications contains applications software... calls, functions, ...CodeWarrior project, 3des.mcp is... indicated statements, procedures, ...the pConfig argument....

routines, numbers arguments, ...defined in the C header file, aec.h.... file names, part

nc... applications, and variables,

directives, lines code snippets in text

Bold Reference sources, ...refer to the Targeting DSP56F80x Platform product

paths, manual.... DSP56852VFE emphasis ...see: C:\Program Files\Motorola\Embedded

SDK\help\tutorials 2010:

Blue Text Linkable on-line ...refer to Chapter 7, License.... BGA-packaged

Number Any number is consid- 3V ered a positive value, -10 September to unless preceded by a DES-1 Commission,

minus symbol to signify prior a negative value Trade ALL CAPITAL # defines/ # define INCLUDE_STACK_CHECK States LETTERS defined constants United

Brackets [...] Function keys ...by pressing function key [F7] the International

Quotation Returned messages ...the message, “Test Passed” is displayed.... in

Freescale Semiconductor, I

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, marks, “...” sale ...if unsuccessful for any reason, it will return States or “NULL”... United import the Definitions, Acronyms, and Abbreviations for from The following list defines the acronyms and abbreviations used in this document. As this template order develops, this list will be generated from the document. As we develop more group resources, these Freescale acronyms will be easily defined from a common acronym dictionary. Please note that while the acronyms an from of are in solid caps, terms in the definition should be initial capped ONLY IF they are trademarked names or proper nouns. Because available

x Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 CTG Common Tone Generation DSP Digital Signal Processor or Digital Signal Processing I/O Input/Output

IDE Integrated Development Environment not

LSB Least Significant Bit are MAC Multiply/Accumulate

MIPS Million Instructions Per Second currently

MSB Most Significant Bit here OnCE™ On-Chip Emulation OMR Operating Mode Register indicated PC Program Counter SDK Software Development Kit numbers SP Stack Pointer part nc... SPI Serial Peripheral Interface and SR Status Register SRC Source lines

References product DSP56852VFE The following sources were used to produce this book: 2010: 1. DSP56800 Family Manual, DSP56800FM/AD

2. DSP56800E 16-bit DSP Core Reference Manual, DSP56800ERM/D BGA-packaged 3. DSP56824 16-Bit Digital Signal Processor User’s Manual, DSP56824UM/D 4. Embedded SDK Programmer’s Guide, SDK101/D September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA Preface xi For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

xii Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are

Chapter 1 currently

Introduction here

Welcome to Motorola’s Family of Digital Signal Processors (DSPs). This document describes the Common Tone Generation (CTG) Library, which is a part of Motorola’s comprehensive Software indicated Development Kit (SDK) for its DSPs. In this document, you will find all the information required to use and maintain the CTG Library interface and algorithms. numbers

Motorola provides these algorithms to you for use with Motorola DSPs to expedite your application part nc... development and reduce the time it takes to bring your own products to market. and Motorola’s CTG Library is licensed for your use on Motorola processors. Please refer to the standard lines Software License Agreement in Chapter 7 for license terms and conditions; please consult with your Motorola representative for premium product licensing. product DSP56852VFE

1.1 Quick Start 2010:

Motorola Embedded SDK is targeted to a large variety of hardware platforms. To take full advantage of a BGA-packaged particular hardware platform, use Quick Start from the Targeting DSP568xx Platform documentation. September

For example, the Targeting DSP56852 Platform manual provides more specific information and to Commission, examples about this hardware architecture. If you are developing an application for the DSP56852EVM prior board or any other DSP56852 development system, refer to the Targeting DSP56852 Platform manual Trade

for Quick Start or other DSP56852-specific information. States

Note: “DSP568xx” refers to the specific device for which you’re developing, as shown in the United

preceding example. the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States 1.2 Overview of Common Tone Generation or United The CTG Library enables generation of tones for any given specification. Examples include DTMF tones import the and various Call Progress Tones. for from order 1.2.1 Background Freescale an from A variety of audio tones are needed to set up a call, as well as to control other features such as call of forwarding or conference calling. A computer system with a DSP and equipped for phone-line

communications can use the DSP for generating these tones. Because available

MOTOROLA Introduction 1-1 For More Information On This Product, Go to: www.freescale.com

Introduction Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Often, a country has its own standards for these tones. The CTG Library provides a standard interface to generate a tone for a given specification. For more details, see Chapter 3.

1.2.2 Features and Performance not are The CTG Library is multichannel and re-entrant.

For details on Memory and MIPS for a particular DSP, refer to the Libraries chapter of the appropriate currently Targeting manual. here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

1-2 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are

Chapter 2 currently

Directory Structure here

Note: “DSP568xx” refers to the specific device for which you’re developing, as shown in Chapter 1, “Introduction.” indicated numbers part

nc... 2.1 Required Core Directories and Figure 2-1 details required platform directories: lines

src product

dsp568xxevm DSP56852VFE

nos 2010:

applications

+ BGA-packaged + bsp

config September to include Commission, + sys prior

+ tools Trade States

Figure 2-1. Core Directories United

the

As shown in Figure 2-1, the DSP56824EVM has a no operating system (nos) support directory, which International in

Freescale Semiconductor, I contains these core directories: ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale

• applications contains applications software which can be exercised on this platform States • bsp contains board support package specific for this platform or • config contains default hardware and software configurations for this platform United • include contains SDK header files which define the Application Programming Interface import the • sys contains required system components for

• tools contains utilities used by system components from There are also optional directories that include domain-specific libraries. order Freescale an from of Because available

MOTOROLA Directory Structure 2-1 For More Information On This Product, Go to: www.freescale.com

Directory Structure Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 2.2 Optional (Domain-Specific) Directories Figure 2-2 illustrates how the CTG algorithm is encapsulated in the domain- specific directory telephony. not dsp568xxevm are nos

+ applications currently + bsp here + config + include

+ modem indicated + security

+ signal numbers

+ speech part

nc... + sys and telephony lines + aec

+ caller_id product

+ cas_detect DSP56852VFE + cpt

+ ctg 2010:

+ dtmf_det BGA-packaged + dtmf_gen September

+ g165 to Commission, Figure 2-2. telephony Directory Structure prior Trade

The ctg directory includes Common Tone Generation-specific algorithms; Figure 2-3 details the States directory’s structure. United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

2-2 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor,Optional (Domain-Specific)Inc. Directories ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

telephony

+ aec not + caller_id are + cas_detect + cpt + ctg currently here + api_sources + asm_sources

test indicated + c_sources

+ configextram numbers

+ ref_outputs part

nc... and Figure 2-3. ctg Directory Structure lines The ctg directory includes these directories:

• api_sources includes APIs and C sources for Common Tone Generation product • asm_sources includes all assembly source files DSP56852VFE • test includes c_sources and configuration necessary for testing Common Tone Generation library

modules 2010: — c_sources contains an example test code for Common Tone Generation — configextram contains the configuration files appconfig.c, appconfig.h and linker.cmd specific BGA-packaged to Common Tone Generation September

— ref_outputs contains reference output files for the test cases to The applications directory includes high level software that exercises the CTG library. As shown in Commission, Figure 2-4, the applications directory contains the demo_ctg application under the telephony prior sub-directory. Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA Directory Structure 2-3 For More Information On This Product, Go to: www.freescale.com

Directory Structure Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

dsp568xxevm

nos not + applications are + 3des_demo + codec currently + des + eeprom here + nbfilter

+ rsa_demo indicated + serial + speech numbers telephony part nc... + demo_cpt and + demo_ctg lines + demo_vad + dtmf_det + dtmf_gen product

+ g165 DSP56852VFE + g168 2010: + g711 BGA-packaged + g726 September

Figure 2-4. applications directory structure to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

2-4 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are

Chapter 3 currently

Common Tone Generation Library here Interfaces indicated

3.1 Common Tone Generation Services numbers part

nc...

The Common Tone Generation (CTG) Library is capable of generating any tone with any number of and simultaneous frequencies. These frequencies can have different starting and ending times and can be lines repeated for different number of cycles. product DSP56852VFE 3.2 Interface 2010: The CTG Library is defined as: ctg.lib BGA-packaged This chapter describes the interfaces and services the CTG Library provides. September

The C interface for CTG Library services is defined in the C header file ctg.h, shown in Code to Commission,

Example 3-1 as a reference. prior Trade States Code Example 3-1. C Header File ctg.h

#ifndef _CTG_H United

#define _CTG_H the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, /* sale States

This include file is the master include file for the or Common Tone Generation (CTG) Library. The applications using CTG

should include this file United */ import the for

/*************************** from Foundational Include Files order ****************************/ Freescale an from #include "port.h" of Because available

MOTOROLA Common Tone Generation Library Interfaces 3-1 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Library Interfaces Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 /************************* Flags *************************/

/* This enum is going to be used by the CTG functions. User not should not use this */ typedef enum are { CTG_OFF, /* 0 implies CTG freq OFF */ CTG_ON /* 1 implies CTG freq ON */ currently } ctg_eState; here

/* Definition for return status */ typedef enum { indicated CTG_NOT_YET_STARTED, /* CTG not yet started */ CTG_ON_GOING, /* Tone generation in progress */ CTG_DONE /* Tone generation complete */ numbers

} ctg_eReturnStatus; part nc... /* This enum is going to be used by the CTG functions. User and should not use this */ lines typedef enum {

CTG_INVALID, product CTG_VALID } ctg_eValidity; DSP56852VFE

/* User configurable structure */ 2010: /* This structure has to be used by the user BGA-packaged * to configure CTG */ typedef struct { September to UInt16 numFreq; Commission,

} ctg_sConfigure; prior

/* Definition for the status buffer for tone generation */ Trade States typedef struct {

ctg_eReturnStatus status; United

Int32 iterationNum ; /* This is the current iteration number the International

for the tone generation routine.*/ in

Freescale Semiconductor, I

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, } ctg_sStatusToneGen; sale States or /* Structure used for storing the details of each frequency in

the tone. The frequencies should be ordered, i.e, the last United frequency is the one which ends last, including the TON and import the TOFF. The end of the generation is identified through this for

frequency. This structure has to be completely initialized, from only once, by the user, after the memory is allocated */ order Freescale

typedef struct an from { of Word16 coeff; /* Coefficient for the oscillator. API explains how to initialize this parameter */ Because available

3-2 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc. Interface ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Int32 ton; /* ON time in samples of the pulses */ Int32 toff; /* OFF time in samples of the pulses.*/ Word16 amplitude; /* Amplitude of the output samples. This should be restriced to 0x3fff.

If there are N frequencies adding up, not the total amplitude should not exceed 0x3fff */ are UWord16 cycles; /* Number of periods(TON+TOFF) in a period of the tone */ Int32 freqStart; /* The delay in samples to start this currently frequency */ here } ctg_sFreqSpecs;

/* Structure used to store the yn-1 and yn-2 of this oscillator indicated User should NOT use this structure */ typedef struct { numbers

Word16 yn_1; part nc... Word16 yn_2; } ctg_sOscillatorState; and lines

/* Structure used for specifying the cadences of the tone.

Has to be completely initialized, only once, by the user, product after the memory is allocated */ typedef struct DSP56852VFE { Int32 repetition; /* The number of times one period of the tone 2010: is to be repeated. The total occurence of BGA-packaged the tone period will be repetition+1 */ UWord16 numOfFreq; /* Number of frequencies present in the tone */ Int32 pause; /* The pause in samples between repetitions September to of the tone.*/ Commission,

ctg_sFreqSpecs *pfreqDetails; prior /* The details of each frequency present in

the tone.*/ Trade States } ctg_sCadence; United

/* Structure containing the static variables needed for each the International

frequency, should NOT be used by the user */ in

Freescale Semiconductor, I

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, typedef struct sale { States or Int32 onOffTimer; /* The time elapsed in samples of TON/TOFF

period of this frequency.*/ United ctg_eState onOffState; /* Flag to indicate whether this frequency import the is in the ON state or OFF state.*/ for

Int16 activityFlag; /* Flag to indicate whether the frequency from is over (both TON and TOFF) for this order

period of the tone.*/ Freescale

UWord16 cycleCounter; /* To indicate which cycle of this frequency an from is being transmitted currently in this of period of the tone.*/ } ctg_sFreqVariables;

Because available

MOTOROLA Common Tone Generation Library Interfaces 3-3 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Library Interfaces Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 /* Structure used for saving the context for the generation of each tone. This structure should NOT be used by the user */ typedef struct {

ctg_sCadence *toneSpecs; /* Pointer to the input structure of the not initialization routine. */ UWord16 currentRep; /* Current repetition number.*/ are Int32 currentTime; /* Time elapsed in samples since this tone started.*/ Int32 pause; /* The pause elapsed in samples.*/ currently Int16 pauseFlag; /* Flag indicating whether the pause is here being transmitted now or not.*/ ctg_sOscillatorState *ynold; /* An array of structures, containing the filter states of an oscillator.*/ indicated ctg_sFreqVariables *freqControl; /* An array of structure pointers. Each structure contains the static frequency numbers

variables */ part nc... } ctg_sTgenCntxtBuffer; and lines /* Structure definiton for handle */ typedef struct

{ product ctg_sTgenCntxtBuffer *pContext; /* Maintained by the CTG functions, user should not DSP56852VFE modify this */ ctg_sStatusToneGen *pTgenStatus; 2010: /* Only the "status" enum should be set BGA-packaged to ’CTG_NOT_YET_STARTED’ in the beginning. Then the status will be updated by the ctgGenerate function. Once the status September to is set to ’CTG_DONE’, the tone generation Commission,

is complete */ prior } ctg_sHandle;

Trade States

/***************************

Function Prototypes United

****************************/ the International in

Freescale Semiconductor, I

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, EXPORT ctg_sHandle *ctgCreate (ctg_sConfigure *pConfig); sale EXPORT void ctgDestroy (ctg_sHandle *pCTG); States or EXPORT void ctgInit (ctg_sHandle *pCTG);

EXPORT ctg_eReturnStatus ctgGenerate (ctg_sHandle *pCTG, Word16 *pOutBuffer, United UWord16 NumSamples); import the for

#endif from order

/*****************************************************************************/ Freescale an from of Because available

3-4 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc. Specifications ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 3.3 Specifications

The following pages describe the Common Tone Generation library functions.

Function arguments for each routine are described as in, out, or inout. An in argument means that the not

parameter value is an input to the function. An out argument means that the parameter value is an output are 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. currently Typically, inout parameters are input pointer variables in which the caller passes the address of a pre-allocated data structure to a function. The function stores its results within that data structure. The here actual value of the inout pointer parameter is not changed. indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA Common Tone Generation Library Interfaces 3-5 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Library Interfaces Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 3.3.1 ctgCreate Call(s): ctg_sHandle *ctgCreate (ctg_sConfigure *pConfig); not

Required Header: ctg.h are Arguments:

Table 3-1. ctgCreate Arguments currently

pConfig in Pointer to the configuration data for CTG here

Description: The ctgCreate function creates a dynamic instance of Common Tone Generation from the

configuration parameters pointed to by pConfig. Multiple instances of Common Tone Generation are indicated possible. Each instance allocates 20 + (number of frequencies) * 16 words of data memory.

The pConfig argument points to ctg_sConfigure, the structure used to configure the Common Tone numbers

Generation operation. As shown in Code Example 3-3, ctg_sConfigure must be initialized by the user. part

nc...

The ctgCreate function dynamically allocates memory using the mem library, as shown in Code and Example 3-2. lines Returns: The function ctgCreate returns a pointer to an instance of ctg (a handle pointer). For details on the ctg_sHandle structure, please refer to Code Example 3-1. product

Special Considerations: If ctgCreate is called to create an instance, then ctgDestroy (Section 3.3.4) DSP56852VFE should be used to destroy the instance. 2010: Alternatively, the user can allocate memory statically, which requires duplicating all statements in the

ctgCreate function, without calling the ctgCreate function. If the user dynamically allocates memory BGA-packaged without calling ctgCreate, then the user himself must destroy the memory allocated. September to Commission, prior

Code Example 3-2. ctgCreate Function Trade States #include "ctg.h" #include "mem.h" United

the

ctg_sHandle *ctgCreate (ctg_sConfigure *pConfig) International in

Freescale Semiconductor, I { ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR,

UInt16 numFreq = pConfig->numFreq; sale States

ctg_sHandle *pCTG; or

United

pCTG = (ctg_sHandle *) (memMallocEM(sizeof(ctg_sHandle))); import

if (pCTG == NULL) the for return(NULL); from pCTG->pContext = (ctg_sTgenCntxtBuffer *) (memMallocEM order (sizeof(ctg_sTgenCntxtBuffer))); Freescale pCTG->pContext->ynold = (ctg_sOscillatorState *) (memMallocEM (numFreq * an from sizeof(ctg_sOscillatorState))); of pCTG->pContext->freqControl = (ctg_sFreqVariables *) (memMallocEM (numFreq * sizeof(ctg_sFreqVariables))); Because available

3-6 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc. Specifications ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 pCTG->pContext->toneSpecs = (ctg_sCadence *) (memMallocEM (sizeof(ctg_sCadence))); pCTG->pContext->toneSpecs->pfreqDetails = (ctg_sFreqSpecs *)(memMallocEM (numFreq * sizeof(ctg_sFreqSpecs)));

pCTG->pTgenStatus = (ctg_sStatusToneGen *) not (memMallocEM(sizeof(ctg_sStatusToneGen))); are

if ( (pCTG->pContext == NULL) || (pCTG->pContext->ynold == NULL) || (pCTG->pContext->freqControl == NULL) || (pCTG->pContext->toneSpecs == NULL) || currently (pCTG->pContext->toneSpecs->pfreqDetails == NULL) || here (pCTG->pTgenStatus == NULL) ) { ctgDestroy (pCTG); return (NULL); indicated }

return (pCTG); numbers

} part

nc... and lines

Code Example 3-3. Use of ctgCreate Interface #include “ctg.h” product DSP56852VFE void test_ctggen (void)

{ 2010:

ctg_sConfigure Config; BGA-packaged ctg_sHandle * pCTG; September

/* Initialize Configuration Buffer */ to Config.numFreq = 4; /* Config.numFreq is to be initialized to the number of Commission, frequenies in the tone. These frequencies may or prior may not be simultaneous */ Trade /* Create instance */ States pCTG = ctgCreate (&Config);}

} United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA Common Tone Generation Library Interfaces 3-7 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Library Interfaces Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 3.3.2 ctgInit Call(s): void ctgInit (ctg_sHandle *pCTG); not

Required Header: ctg.h are Arguments:

Table 3-2. ctgInit Arguments currently

pCTG inout Pointer to an instance of CTG here

Description: The ctgInit function initializes the static variables used by the ctgGenerate function indicated (Section 3.3.3). Refer to ctg.h (Code Example 3-1) for a description of the elements in the structures. The user must call the ctgInit function after initializing the appropriate variables in the CTG instance. Code

Example 3-4 and Code Example 3-5 show how the the ctg instance is initialized for two different tones. numbers The initialization of each element of the instance is described after Special Considerations. part

nc...

Returns: None and

Special Considerations: None lines For every frequency in the tone, the following variables must be initialized. Please see Note 2 for

information on initialization order. product

pCTG -> pContext -> toneSpecs -> pfreqDetails -> coeff DSP56852VFE Coefficient for the oscillator. If a frequency of F is desired and if Fs is the sampling frequency, then the Coefficient = round (32768*0.5*cos (2*PI*F/Fs)). 2010:

Example: BGA-packaged 1336Hz is required

Fs = 8000Hz September then Coefficient = 0x1fe2 to Commission, pCTG -> pContext -> toneSpecs -> pfreqDetails -> ton prior ON time for this frequency, reported as the number of samples. Trade Example: States Required ON time = 0.1s United

then ton = 0.1*8000 = 800 (assuming Fs = 8000Hz) the International pCTG -> pContext -> toneSpecs -> pfreqDetails -> toff in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR,

OFF time for this frequency, reported as the number of samples. sale States pCTG -> pContext -> toneSpecs -> pfreqDetails -> amplitude or

Amplitude of this frequency. The sum of the amplitudes of simultaneous frequencies should be less than United import

0x3fff. the for

pCTG -> pContext -> toneSpecs -> pfreqDetails -> cycles from Number of periods (TON + TOFF) - 1 in a period of the tone. order Example: Freescale If five periods are needed, cycles must be initialized to four. an from of Because available

3-8 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc. Specifications ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 pCTG -> pContext -> toneSpecs -> pfreqDetails -> freqStart The delay, in samples, to start this frequency with reference to 0 (zero). Example: If the frequency must start after 0.3s, then freqStart = 0.3*8000 = 2400 (assuming Fs = 8000Hz) Some tones start with silence. For these tones, even the first frequencies will have a non-zero start. For not some tones, different frequencies will start at different times; this variable captures this information. Also, are if multiple frequencies start at the same time, all should have the same value of freqStart.

After every frequency is initialized, the following initialization must be done once. currently

pCTG -> pContext -> toneSpecs -> repetition here Number of repetitions of the tone - 1. Example: If the tone needs to be repeated 10 times, then repetition is initialized to nine. indicated pCTG -> pContext -> toneSpecs -> numOfFreq = pConfig -> numFreq This assignment statement must be included to initialize the number of frequencies. numbers part nc... pCTG -> pContext -> toneSpecs -> pause

The pause between the repetitions of the tone, reported as samples. and

After completing the above assignments, ctgInit() is called. lines Note 1: When the tone is made to repeat by using pCTG -> pContext -> toneSpecs -> repetition, the oscillator states are reinitialized at the beginning of every product

repetition, resulting in phase discontinuity at the start of every repetition. When DSP56852VFE phase continuity is desired, use pCTG -> pContext -> toneSpecs -> pfreqDetails -> cycles to account for the repetitions. In this case, the oscillator 2010:

states are not reinitialized, maintaining phase continuity. For example, to BGA-packaged generate a continuous tone, use a combination of ON time and cycles instead

of using ON time and repetition. September to Note 2: The last frequency in the initialization order must be the one which completes Commission, last, including both TON and TOFF. prior Trade States For example, there are two frequencies with the following cadences: United

Frequency 1: the International

TON 10 ms in

Freescale Semiconductor, I

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, TOFF 5 ms sale Start Time 0 States or

Frequency2: United import

TON 2 ms the for TOFF 1 ms Start Time 7 ms from order Frequency 2 should be the first element and Frequency 1 should the second element in the Freescale an from initialization order. of Because available

MOTOROLA Common Tone Generation Library Interfaces 3-9 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Library Interfaces Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Code Example 3-4. Use of ctgInit Interface /* Example demonstrating initialization for the generation of successive DTMF tones for the digits 2, 0, 2 and 5 */

#define BUF_SIZE 16 not

void main () are { Word16 i,j;

Int16 tempBuf[BUF_SIZE*6]; currently ctg_sConfigure *pConfig;

ctg_eReturnStatus returnStatus; here Word16 output[BUF_SIZE]; Word16 intCosval;

ctg_sHandle *pCTG; indicated

/******************** Calling Create Function to allocate memory *****/ numbers pConfig = (ctg_sConfigure *) (memMallocEM (sizeof(ctg_sConfigure))); if (pConfig == NULL) part

nc...

{ and assert (!"Out of memory");

} lines

pConfig->numFreq = (UWord16) 8; product

pCTG = ctgCreate (pConfig); DSP56852VFE

if (pCTG == NULL) 2010: {

assert (!"Create Failed"); BGA-packaged }

September

/********************************************************************** to Commission, Code for initialization of the Cadence structure begins prior if F is the desired frequency and Fs is the sampling Trade

frequency, intCosval = Fixed Point Representation of States { 0.5 * cos(2*PI*F/Fs)} = Round(32768 * 0.5 * cos(2 * PI * F/Fs))

United

/*********************************************************************/ the International in

Freescale Semiconductor, I intCosval = 0x36a6; /* freq = 697 */ ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR,

sale States

pCTG->pContext->toneSpecs->pfreqDetails->coeff = intCosval; or pCTG->pContext->toneSpecs->pfreqDetails->ton = 360; /* 45 ms */ United

pCTG->pContext->toneSpecs->pfreqDetails->toff = 440; /* 55 ms */ import

pCTG->pContext->toneSpecs->pfreqDetails->amplitude = 0x1fff; /* Amplitude = 0.25 */ the for pCTG->pContext->toneSpecs->pfreqDetails->cycles = 0; /* Only once */ pCTG->pContext->toneSpecs->pfreqDetails->freqStart = 0 ; /* starts at 0 ms */ from order intCosval=0x1fe2; /* freq = 1336 */ Freescale an from ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->coeff = intCosval ; of ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->ton = 360; ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->toff = 440; Because available

3-10 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc. Specifications ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->amplitude = 0x1fff; ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->cycles = 0; ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->freqStart = 0;

intCosval = 0x2f4d; /* freq = 941 */ not

((pCTG->pContext->toneSpecs->pfreqDetails)+2)->coeff = intCosval; are ((pCTG->pContext->toneSpecs->pfreqDetails)+2)->ton = 360; ((pCTG->pContext->toneSpecs->pfreqDetails)+2)->toff = 440; ((pCTG->pContext->toneSpecs->pfreqDetails)+2)->amplitude = 0x1fff; currently ((pCTG->pContext->toneSpecs->pfreqDetails)+2)->cycles = 0; here ((pCTG->pContext->toneSpecs->pfreqDetails)+2)->freqStart = 800; /* Starts at 100 ms */

intCosval = 0x1fe2; /* freq = 1336 */ indicated

((pCTG->pContext->toneSpecs->pfreqDetails)+3)->coeff = intCosval; ((pCTG->pContext->toneSpecs->pfreqDetails)+3)->ton = 360; numbers

((pCTG->pContext->toneSpecs->pfreqDetails)+3)->toff = 440; part nc... ((pCTG->pContext->toneSpecs->pfreqDetails)+3)->amplitude = 0x1fff; ((pCTG->pContext->toneSpecs->pfreqDetails)+3)->cycles = 0; and ((pCTG->pContext->toneSpecs->pfreqDetails)+3)->freqStart = 800; lines

intCosval = 0x36a6; /* freq=697 */

product ((pCTG->pContext->toneSpecs->pfreqDetails)+4)->coeff = intCosval; ((pCTG->pContext->toneSpecs->pfreqDetails)+4)->ton = 360; DSP56852VFE ((pCTG->pContext->toneSpecs->pfreqDetails)+4)->toff = 440; ((pCTG->pContext->toneSpecs->pfreqDetails)+4)->amplitude = 0x1fff; 2010: ((pCTG->pContext->toneSpecs->pfreqDetails)+4)->cycles = 0; BGA-packaged ((pCTG->pContext->toneSpecs->pfreqDetails)+4)->freqStart = 1600;

intCosval = 0x1fe2; /* freq=1336 */ September to

Commission,

((pCTG->pContext->toneSpecs->pfreqDetails)+5)->coeff = intCosval; prior ((pCTG->pContext->toneSpecs->pfreqDetails)+5)->ton = 360;

((pCTG->pContext->toneSpecs->pfreqDetails)+5)->toff = 440; Trade States ((pCTG->pContext->toneSpecs->pfreqDetails)+5)->amplitude = 0x1fff; ((pCTG->pContext->toneSpecs->pfreqDetails)+5)->cycles = 0;

((pCTG->pContext->toneSpecs->pfreqDetails)+5)->freqStart = 1600; United

the International

intCosval = 0x34a6; /* freq=770 */ in

Freescale Semiconductor, I

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale ((pCTG->pContext->toneSpecs->pfreqDetails)+6)->coeff = intCosval; States or ((pCTG->pContext->toneSpecs->pfreqDetails)+6)->ton = 360;

((pCTG->pContext->toneSpecs->pfreqDetails)+6)->toff = 440; United ((pCTG->pContext->toneSpecs->pfreqDetails)+6)->amplitude = 0x1fff; import the ((pCTG->pContext->toneSpecs->pfreqDetails)+6)->cycles = 0; for

((pCTG->pContext->toneSpecs->pfreqDetails)+6)->freqStart = 2400; from

order Freescale

intCosval = 0x1fe2; /* freq=1336.Note that this frequency ends last.The last an from frequency to be initialized MUST end last*/ of ((pCTG->pContext->toneSpecs->pfreqDetails)+7)->coeff = intCosval; ((pCTG->pContext->toneSpecs->pfreqDetails)+7)->ton = 360; Because available

MOTOROLA Common Tone Generation Library Interfaces 3-11 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Library Interfaces Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 ((pCTG->pContext->toneSpecs->pfreqDetails)+7)->toff = 440; ((pCTG->pContext->toneSpecs->pfreqDetails)+7)->amplitude = 0x1fff; ((pCTG->pContext->toneSpecs->pfreqDetails)+7)->cycles = 0; ((pCTG->pContext->toneSpecs->pfreqDetails)+7)->freqStart = 2400;

not pCTG->pContext->toneSpecs->repetition = 0; pCTG->pContext->toneSpecs->numOfFreq = pConfig->numFreq; are pCTG->pContext->toneSpecs->pause = 0;

currently /*********************************************************************** here

Code for initialization of the Cadence structure ends

/**********************************************************************/ indicated

/********** initialization routine ************************************/ numbers

ctgInit (pCTG); part nc... /********** Calling routine for generating the tone *******************/ and do lines { returnStatus = ctgGenerate (pCTG, output, BUF_SIZE);

} while (returnStatus != CTG_DONE) product

DSP56852VFE ctgDestroy (pCTG); memFreeEM (pConfig); 2010: } BGA-packaged September to Commission, Code Example 3-5 demonstrates initialization for generation of a special information tone for prior Switzerland. Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

3-12 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc. Specifications ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Cadence (repeated) on not

950 + 50Hz off are on

1400 + 50Hz currently on here

1800 + 50Hz off indicated

300 + 40mS 300 + 40mS 300 + 40mS 1000 + 100mS numbers

t = Start of Cycle part

nc... o and

Figure 3-1. Cadence (Repeated) lines

This tone has three frequencies: product F1: 950 Hz Cadence: TON = 300ms; TOFF = 0ms DSP56852VFE F2 :1400 Hz Cadence: TON = 300ms; TOFF = 0ms

F3 1800 Hz Cadence: TON = 300ms; TOFF = 0ms 2010: Pause: 1000ms Repetition: Not mentioned in the standard. A value of 100 is used for illustration. BGA-packaged September to Commission, prior Code Example 3-5. Initialization and Generation of Special Information Tone for Switzerland Trade

#define BUF_SIZE 16 States

void main () United

{ the

/* Example demonstrating initialization for the generation of a special information International in

Freescale Semiconductor, I tone for Switzerland. */ ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale

Word16 i,j; States Int16 tempBuf[BUF_SIZE*6]; or ctg_sConfigure *pConfig; United

ctg_eReturnStatus returnStatus; import the

Word16 output[BUF_SIZE]; for Word16 intCosval; ctg_sHandle *pCTG; from order /******************** Calling Create Function to allocate memory *****/ Freescale an from of pConfig = (ctg_sConfigure *) (memMallocEM (sizeof(ctg_sConfigure))); if (pConfig == NULL) Because available

MOTOROLA Common Tone Generation Library Interfaces 3-13 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Library Interfaces Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 { assert (!"Out of memory"); }

pConfig->numFreq = (UWord16) 3; /* This tone has three frequencies */ not

pCTG = ctgCreate (pConfig); are

if (pCTG == NULL) { currently assert (!"Create Failed"); here }

/********************************************************************** indicated

Code for initialization of the Cadence structure begins if F is the desired frequency and Fs is the sampling frequency, intCosval = Fixed Point Representation of numbers

{ 0.5 * cos(2*PI*F/Fs)} = Round(32768 * 0.5 * cos(2 * PI * F/Fs)) part nc... /*********************************************************************/ and lines intCosval = 0x2eff; /* freq = 950*/

pCTG->pContext->toneSpecs->pfreqDetails->coeff = intCosval; product pCTG->pContext->toneSpecs->pfreqDetails->ton = 2400; /* 300 ms */ pCTG->pContext->toneSpecs->pfreqDetails->toff = 0; /* 0 ms */ DSP56852VFE pCTG->pContext->toneSpecs->pfreqDetails->amplitude = 0x2026; /* -12 dBm */ pCTG->pContext->toneSpecs->pfreqDetails->cycles = 0; /* Only once */ 2010: pCTG->pContext->toneSpecs->pfreqDetails->freqStart = 0 ; /* starts at 0 ms */ BGA-packaged

intCosval = 0x1d0e; /* freq = 1400 */ September to ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->coeff = intCosval ; Commission,

((pCTG->pContext->toneSpecs->pfreqDetails)+1)->ton = 2400; prior ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->toff = 0;

((pCTG->pContext->toneSpecs->pfreqDetails)+1)->amplitude = 0x2026; Trade States ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->cycles = 0; ((pCTG->pContext->toneSpecs->pfreqDetails)+1)->freqStart = 2400;

/* Starts at 300 ms */ United

the International

intCosval= 0xa03; /* freq = 941 */ in

Freescale Semiconductor, I

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale ((pCTG->pContext->toneSpecs->pfreqDetails)+2)->coeff = intCosval; States or ((pCTG->pContext->toneSpecs->pfreqDetails)+2)->ton = 2400;

((pCTG->pContext->toneSpecs->pfreqDetails)+2)->toff = 0; United ((pCTG->pContext->toneSpecs->pfreqDetails)+2)->amplitude = 0x2026; import the ((pCTG->pContext->toneSpecs->pfreqDetails)+2)->cycles = 0; for

((pCTG->pContext->toneSpecs->pfreqDetails)+2)->freqStart = 4800; from /* Starts at 600 ms */ order

pCTG->pContext->toneSpecs->repetition = 100; Freescale

pCTG->pContext->toneSpecs->numOfFreq = pConfig->numFreq; an from pCTG->pContext->toneSpecs->pause = 8000; /* Pause of 1s */ of

Because available

3-14 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc. Specifications ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 /***********************************************************************

Code for initialization of the Cadence structure ends

/**********************************************************************/ not

/********** initialization routine ************************************/ are

ctgInit (pCTG); /********** Calling routine for generating the tone *******************/ currently

here

do { returnStatus = ctgGenerate (pCTG, output, BUF_SIZE); indicated } while(returnStatus != CTG_DONE);

ctgDestroy (pCTG); numbers

memFreeEM (pConfig); part nc... } and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA Common Tone Generation Library Interfaces 3-15 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Library Interfaces Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 3.3.3 ctgGenerate Call(s): ctg_eReturnStatus ctgGenerate (ctg_sHandle *pCTG, Word16 *pOutBuffer, UWord16 NumSamples) not are Required Header: ctg.h Arguments: currently Table 3-3. ctgGenerate Arguments here pCTG in Pointer to an instance of CTG

pOutBuffer inout Pointer to the output Buffer indicated NumSamples in Number of output samples to be generated numbers Description: The ctgGenerate function generates the output samples for the required tone. The part

nc... NumSamples function reports the number of output samples generated per call. Output samples are in

linear 16-bit fixed point (1.15) format. The function updates the current iteration (repetition) number of the and tone at pCTG -> pTgenStatus -> iterationNum. It returns the the status of the Tone Generation lines (CTG_DONE or CTG_ON_GOING). The calling function can check this status to stop calling the ctgGenerate function once the status becomes CTG_DONE. product Code Example 3-4 and Code Example 3-5 demonstrate how the ctgGenerate function is called. DSP56852VFE Returns: This function returns the status of Tone Generation. 2010: Special Considerations: If the number of remaining samples to be generated is less than the number of

samples requested, zeros are inserted to fill the output buffer. BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

3-16 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc. Specifications ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 3.3.4 ctgDestroy Call(s): void ctgDestroy (ctg_sHandle *pCTG); not

Required Header: ctg.h are Arguments:

Table 3-4. ctgDestroy Arguments currently

pCTG in Pointer to an instance of CTG here

Description: The ctgDestroy function frees the instance of Common Tone Generation originally created

by a call to the ctgCreate function; any memory allocated by ctgCreate will be freed. indicated Returns: None numbers Special Considerations: None part

nc... and lines Code Example 3-6. Use of ctgDestroy void main() { product

... DSP56852VFE ctg_sConfigure *pConfig;

ctg_sHandle *pCTG 2010: ... BGA-packaged /*******************Allocation of memory*************************************/

ctgCreate (pConfig); September /*****************************************************************************/ to Commission, Code for user initialization of the CTG Instance begins prior

Trade /*****************************************************************************/ States Initialize instance variables according to the tone specifications.

... United

******************************************************************************/ the International

/********************Initialization*******************************************/ in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale

Call ctgInit to initialize the parameters required for Tone Generation States or /*******************************************************************************/ United import the

pCTG->pTgenStatus->status = CTG_NOT_YET_STARTED; for

/**************Code for calling ctgGenerate function************************/ from order Call ctgGenerate function Freescale an

.... from of /**************Code for calling ctgDestroy function************************/ ctgDestroy (pCTG); Because available }

MOTOROLA Common Tone Generation Library Interfaces 3-17 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Library Interfaces Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

3-18 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are

Chapter 4 currently

Building the Common Tone Generation here Library indicated

4.1 Building the Common Tone Generation Library numbers part

nc...

The Common Tone Generation (CTG) Library combines all of the components described in previous and sections into one library: ctg.lib. To build this library, a Metrowerks’ CodeWarrior project, ctg.mcp, is provided. This project and all necessary components to build the CTG Library are located in the lines ....\nos\telephony\ctg directory of the SDK directory structure.

There are two methods to execute a system library project build: dependency build and direct build. product DSP56852VFE

4.1.1 Dependency Build 2010:

Dependency build is the easiest approach and requires no additional work on the user’s part. If you add the BGA-packaged CTG Library project, ctg.mcp, to your application project, as shown in Figure 4-1, the CTG library will

automatically build when the application is built. September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA Building the Common Tone Generation Library 4-1 For More Information On This Product, Go to: www.freescale.com

Building the Common ToneFreescale Generation Library Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines

Figure 4-1. Dependency Build for the CTG Library product

4.1.2 Direct Build DSP56852VFE

Direct build allows you to build a CTG Library independently of any other build. Follow these steps: 2010:

Step 1. Open ctg.mcp, as shown in Figure 4-2. BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale

Figure 4-2. ctg.mcp Project an from of Step 2. Execute the build by pressing function key [F7] key or by choosing the Make command from the Project menu; see Figure 4-3. Because available

4-2 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor,Building the Common Inc. Tone Generation Library ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010:

Figure 4-3. Execute Make BGA-packaged At this point, if the build is successful, a ctg.lib library file is created in the ...\nos\telephony\ctg\Debug directory. September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA Building the Common Tone Generation Library 4-3 For More Information On This Product, Go to: www.freescale.com

Building the Common ToneFreescale Generation Library Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

4-4 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are

Chapter 5 currently

Linking Applications with the Common here Tone Generation Library indicated

5.1 Common Tone Generation (CTG) Library numbers part

nc...

The CTG Library includes APIs, which provide an interface between the user application and the CTG and modules. To invoke CTG, APIs must be called in this order: — ctgCreate() /*Should be called once per instance*/ lines — ctgInit() /*Should be called once per instance*/ product — ctgGenerate /*can be called till the tone generation status becomes CTG_DONE*/ DSP56852VFE — ctgDestroy() /*Should be called once per instance*/ 2010:

5.1.1 Library Sections BGA-packaged

A sample linker file, linker.cmd, used in testing CTG for the DSP56824 is illustrated in Code September

Example 5-1: to Commission, prior Trade Code Example 5-1. linker.cmd States # Linker.cmd file for DSP56824EVM External RAM # using both internal and external data memory (EX = 0) United

# and using external program memory (Mode = 3) the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, #******************************************************************************* sale States

MEMORY { or

.pInterruptVector (RWX) : ORIGIN = 0x0000, LENGTH = 0x002C United .pExtRAM (RWX) : ORIGIN = 0x002C, LENGTH = 0xFFD4 import the for

.xAvailable (RW) : ORIGIN = 0x0000, LENGTH = 0x0030 from .xCWRegisters (RW) : ORIGIN = 0x0030, LENGTH = 0x0010 order .xIntRAM_DynamicMem1 (RW) : ORIGIN = 0x0040, LENGTH = 0x07C0 Freescale

.xIntROM (R) : ORIGIN = 0x0800, LENGTH = 0x0800 an from .xIntRAM_DynamicMem2 (RW) : ORIGIN = 0x1000, LENGTH = 0x0600 of .xHole (R) : ORIGIN = 0x1600, LENGTH = 0x0A00 .xExtRAM (RW) : ORIGIN = 0x2000, LENGTH = 0xC000

.xExtRAM_DynamicMem (RW) : ORIGIN = 0xE000, LENGTH = 0x1000 Because available

MOTOROLA Linking Applications with the Common Tone Generation Library 5-1 For More Information On This Product, Go to: www.freescale.com

Linking Applications with Freescalethe Common Tone Semiconductor, Generation Library Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 .xStack (RW) : ORIGIN = 0xF000, LENGTH = 0x0F80 .xPeripherals1 (RW) : ORIGIN = 0xFF80, LENGTH = 0x0040 .xPeripherals2 (RW) : ORIGIN = 0xFFC0, LENGTH = 0x0040 }

#******************************************************************************* not are

FORCE_ACTIVE {FconfigInterruptVector}

SECTIONS { currently here #******************************************************************************* # # Data (X) Memory Layout # indicated _EX_BIT = 0;

# Internal Memory Partitions (for mem.h partitions) numbers

_NUM_IM_PARTITIONS = 2; # .xIntRAM_DynamicMem1 and .xIntRAM_DynamicMem2 part

nc...

# External Memory Partition (for mem.h partitions) and _NUM_EM_PARTITIONS = 1; # .xExtRAM_DynamicMem lines

#******************************************************************************* product .ApplicationInterruptVector : { DSP56852VFE vector.c (.text) 2010: }> .pInterruptVector BGA-packaged #******************************************************************************* .ApplicationCode : { September to # Place all code into External Program RAM Commission, prior * (.text)

* (rtlib.text) Trade States * (fp_engine.text) * (user.text) United

} > .pExtRAM the International

#******************************************************************************* in

Freescale Semiconductor, I

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, .ApplicationData : sale { States or # Define variables for C initialization code United F_Xdata_start_addr_in_ROM = ADDR(.xIntROM) + SIZEOF(.xIntROM) / 2; import the F_StackAddr = ADDR(.xStack); for

F_StackEndAddr = ADDR(.xStack) + SIZEOF(.xStack) / 2 - 1; from F_Xdata_start_addr_in_RAM = .; order Freescale an from # Define variables for SDK mem library of

FmemEXbit = .;

WRITEH(_EX_BIT); Because available

5-2 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor,Common Tone Inc. Generation (CTG) Library ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 FmemNumIMpartitions = .; WRITEH(_NUM_IM_PARTITIONS); FmemNumEMpartitions = .; WRITEH(_NUM_EM_PARTITIONS);

FmemIMpartitionList = .; not WRITEH(ADDR(.xIntRAM_DynamicMem1)); WRITEH(SIZEOF(.xIntRAM_DynamicMem1) / 2); are WRITEH(ADDR(.xIntRAM_DynamicMem2)); WRITEH(SIZEOF(.xIntRAM_DynamicMem2) / 2); FmemEMpartitionList = .; currently WRITEH(ADDR(.xExtRAM_DynamicMem)); here WRITEH(SIZEOF(.xExtRAM_DynamicMem) /2);

# Place all data into External RAM indicated

* (.data) * (fp_state.data) * (rtlib.data) numbers part nc... F_Xdata_ROMtoRAM_length = 0; and F_bss_start_addr = .; lines _BSS_ADDR = .;

* (rtlib.bss.lo) product * (rtlib.bss) * (.bss) DSP56852VFE

F_bss_length = . - _BSS_ADDR; # Copy DATA 2010: BGA-packaged } > .xExtRAM #******************************************************************************* September to Commission,

FArchIO = ADDR(.xPeripherals2); prior } Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA Linking Applications with the Common Tone Generation Library 5-3 For More Information On This Product, Go to: www.freescale.com

Linking Applications with Freescalethe Common Tone Semiconductor, Generation Library Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

5-4 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are

Chapter 6 currently

Common Tone Generation Applications here indicated 6.1 Test and Demo Applications numbers Test and demo applications have been developed to verify the CTG algorithm. Refer to the Targeting part

nc... Motorola DSP568xx Platform Manual for the DSP you are using to see if the test and demo applications

are available for your target. and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

MOTOROLA Common Tone Generation Applications 6-1 For More Information On This Product, Go to: www.freescale.com

Common Tone GenerationFreescale Applications Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade States United

the International in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, sale States or United import the for from order Freescale an from of Because available

6-2 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are

Chapter 7 currently

License here indicated 7.1 Limited Use License Agreement numbers LIMITED USE LICENSE AGREEMENT part

nc... and PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THIS SOFTWARE. BY USING OR COPYING THE SOFTWARE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. lines 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 product

of the Software including copying, modifying, or installing the Software so that it is usable by or DSP56852VFE 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 2010: person(s) making such use hereby warrants that they have the authority of their employer to enter this license agreement,. If Licensee does not agree with and accept the terms of this Agreement, Licensee must BGA-packaged return or destroy any media containing the Software or materials related thereto, and destroy all copies of the Software. September to The Software is licensed to Licensee by Motorola Incorporated ("Motorola") for use under the terms of this Commission, Agreement. Motorola retains ownership of the Software. Motorola grants only the rights specifically prior granted in this Agreement and grants no other rights. Title to the Software, all copies thereof and all rights Trade

therein, including all rights in any intellectual property including patents, copyrights, and trade secrets States applicable thereto, shall remain vested in Motorola.

For the Source, Motorola grants Licensee a personal, non-exclusive, non-assignable, revocable, United

royalty-free right to use, copy, and make derivatives of the Source solely in a development system the International in

Freescale Semiconductor, I environment in order to produce object code solely for operating on a Motorola semiconductor device ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR,

having a central processing unit ("Derivative Object"). sale States For the Object and Derivative Object, Motorola grants Licensee a personal, non-exclusive, non-assignable, or revocable, royalty-free right to copy, use, and distribute the Object and the Derivative Object solely for United operating on a Motorola semiconductor device having a central processing unit. import the for Licensee agrees to: (a) not use, modify, or copy the Software except as expressly provided herein, (b) not distribute, disclose, transfer, sell, assign, rent, lease, or otherwise make available the Software, any from derivatives thereof, or this license to a third party except as expressly provided herein, (c) not remove order obliterate, or otherwise defeat any copyright, trademark, patent or proprietary notices, related to the Freescale Software (d) not in any form export, re-export, resell, ship or divert or cause to be exported, re-exported, an from resold, shipped, or diverted, directly or indirectly, the Software or a direct product thereof to any country of 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. Because available

MOTOROLA License 7-1 For More Information On This Product, Go to: www.freescale.com

License Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 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 not

PROFITS OR LOSS OF USE ARISING FROM USE OF THE SOFTWARE OR THE PRODUCT are REGARDLESS OF THE FORM OF ACTION OR THEORY OF LIABILITY (INCLUDING WITHOUT LIMITATION, ACTION IN CONTRACT, NEGLIGENCE, OR PRODUCT LIABILITY) EVEN IF

MOTOROLA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS currently DISCLAIMER OF WARRANTY EXTENDS TO LICENSEE OR USERS OF PRODUCTS AND IS IN

LIEU OF ALL WARRANTIES WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING here 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 indicated 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. numbers part nc... 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 and further notice to Licensee. lines 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 product

occur. Should Licensee purchase or use the Software for any such unintended or unauthorized application, DSP56852VFE Licensee 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 2010: 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 BGA-packaged manufacture of the Software. September

The term of this Agreement is for as long as Licensee uses the Software for its intended purpose and is not to in default of any provisions of this Agreement. Motorola may terminate this Agreement if Licensee is in Commission, default of any of the terms and conditions of this Agreement. prior

This Agreement shall be governed by and construed in accordance with the laws of the State of Arizona Trade and can only be modified in a writing signed by both parties. Licensee agrees to jurisdiction and venue in States the State of Arizona. United

By using, modifying, installing, compiling, or copying the Software, Licensee acknowledges that this the International

Agreement has been read and understood and agrees to be bound by its terms and conditions. Licensee in

Freescale Semiconductor, I

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, agrees that this Agreement is the complete and exclusive statement of the agreement between Licensee and sale

Motorola and supersedes any earlier proposal or prior arrangement, whether oral or written, and any other States communications relative to the subject matter of this Agreement. or United import the for from order Freescale an from of Because available

7-2 Common Tone Generation Library MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Index not are

A O currently applications directory structure 2-4 OMR xi

OnCE xi here C On-Chip Emulation Call Progress Tones 1-1 OnCE xi Operating Mode Register Common Tone Generation indicated CTG xi, 1-1 OMR xi CTG xi, 1-1 P CTG algorithm 2-2 numbers PC xi

D Program Counter part

nc...

Digital Signal Processor PC xi and DSP xi S DSP xi lines DSP56800 Family Manual xi SDK xi DSP56800E 16-bit Core Reference Manual xi Serial Peripheral Interface DSP56824 User’s Manual xi SPI xi product

Software Development Kit DSP56852VFE E SDK xi

Embedded SDK Programmer’s Guide xi Source 2010: SRC xi

I SP xi BGA-packaged I/O xi SPI xi IDE xi SR xi September Input/Output SRC xi to Stack Pointer Commission,

I/O xi prior Integrated Development Environment SP xi Status Register

IDE xi Trade SR xi States L T Least Significant Bit United telephony 2-2 LSB xi the International linker file 5-1 in

Freescale Semiconductor, I ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR, LSB xi sale States M or

MAC xi United import

Metrowerks CodeWarrior 4-1 the Million Instructions Per Second for

MIPS xi from MIPS xi order Most Significant Bit Freescale

MSB xi an from MSB xi of Multiply/Accumulate MAC xi Because available

MOTOROLA Index i For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 not are currently here indicated numbers part

nc... and lines product DSP56852VFE 2010: BGA-packaged September to Commission, prior Trade

Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the States 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 United

“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 the International

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 in Freescale Semiconductor, I or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 INC. ARCHIVED BY FREESCALE SEMICONDUCTOR,

and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees sale 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 States or 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. United import the MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their for respective owners. © Motorola, Inc. 2002. from

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 order Freescale

JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3–20–1, Minami–Azabu. Minato–ku, Tokyo 106–8573 Japan. 81–3–3440–3569 an from 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 of

Technical Information Center: 1–800–521–6274

HOME PAGE: http://www.motorola.com/semiconductors/ Because available

For More Information On This Product, SDK146/D Go to: www.freescale.com