Beruflich Dokumente
Kultur Dokumente
IMPORTANT NOTICE
Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or
to discontinue any product or service without notice, and advise customers to obtain the latest
version of relevant information to verify, before placing orders, that information being relied on is
current and complete. All products are sold subject to the terms and conditions of sale supplied at
the time of order acknowledgement, including those pertaining to warranty, patent infringement,
and limitation of liability.
TI warrants performance of its semiconductor products to the specifications applicable at the time
of sale in accordance with TIs standard warranty. Testing and other quality control techniques
are utilized to the extent TI deems necessary to support this warranty. Specific testing of all
parameters of each device is not necessarily performed, except those mandated by government
requirements.
Customers are responsible for their applications using TI components.
In order to minimize risks associated with the customers applications, adequate design and
operating safeguards must be provided by the customer to minimize inherent or procedural
hazards.
TI assumes no liability for applications assistance or customer product design. TI does not
warrant or represent that any license, either express or implied, is granted under any patent right,
copyright, mask work right, or other intellectual property right of TI covering or relating to any
combination, machine, or process in which such products or services might be or are used. TIs
publication of information regarding any third partys products or services does not constitute TIs
approval, license, warranty or endorsement thereof.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is
without alteration and is accompanied by all associated warranties, conditions, limitations and
notices. Representation or reproduction of this information with alteration voids all warranties
provided for an associated TI product or service, is an unfair and deceptive business practice,
and TI is not responsible or liable for any such use.
Resale of TIs products or services with statements different from or beyond the parameters
stated by TI for that products or service voids all express and any implied warranties for the
associated TI product or service, is an unfair and deceptive business practice, and TI is not
responsible nor liable for any such use.
Also see: Standard Terms and Conditions of Sale for Semiconductor Products.
www.ti.com/sc/docs/stdterms.htm
Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265
Trademarks
TMS320 is the trademark of Texas Instruments Incorporated.
All other trademark mentioned herein are property of their respective companies
Acronyms
xDAIS : eXpress DSP Algorithm Interface Standard
IALG : Algorithm interface defines a framework independent interface for the creation of
algorithm instance objects
STB
: Software Test Bench
QMATH: Fixed Point Mathematical computation
CcA
: C-Callable Assembly
FIR
: Finite Impulse Response Filter
IIR
: Infinite Im pulse Response Filter
FFT
: Fast Fourier Transform
Contents
1.
2.
3.
4.
5.
6.
1.
Module Name
FFT128C
FFT128R
FFT256C
FFT256R
FFT512C
FFT512R
Module Name
FFT128C
FFT128R
FFT256C
FFT256R
FFT512C
FFT512R
Target Controller
Emulator
XDS510PP Plus
Desktop Area
Interrupts
Peripheral Used
AUDIO
FREQUENCY
GENERATOR
E
V
ADC04U_DRV
DATA_LOG
FFTCACQ
or
FFTRACQ
ipcb
mag
GRAPH
WINDOW
In-place FFT
Computation
FFT
Magnitude square
computation
GRAPH
WINDOW
c_int0
TMR_INT
Initialize Software
Modules
YES
NO
* Enable Timer 2 UF
and core INT3 Interrupt
fstflag==1?
* Reset fstflag
LOOP
acqflag=1?
YES
LOOP
Update DATA_LOG
Module
NO
* Compute the FFT
* Set fstflag to 1
* Set acqflag of
acquisition module to 1
LOOP
TMR_INT
Return
2.
C:\TIDCS\C24
stb_lib
rtmon
dsp_tbox
alib
astb
<STB Name>
filter
math
sgen
build
include
src
cstb
<STB Name>
build
include
src
clib
build
include
lib
obj
src
lst
doc
CcA format
FFT Modules
Document
The FFT modules are available in ASM only and CcA interface, they are located under
alib and clib respectively. All the C callable assembly modules are assembled and
grouped together as an object library using archiver. Executing the batch file available in
the build directory creates the object library. To use the CcA module in the project, add
the object library to the project and include the header file (for FFT modules) that defines
the module interface.
built directory has the work space files, make files for STB and also contains the
map file and output file generated by the compiler.
src directory contains the main system file (*.asm or *.C) and the compiler generated
object file..
astb
cstb
<STB Name>
<STB Name>
build
*.mak
*.wks
*.map
*.out
include
*.h
src
*.asm
*.obj
build
*.mak
*.wks
*.map
*.out
include
*.h
src
*.asm
*.obj
Modify the statement #define TARGET F2407 to #define TARGET F243 if you need
to execute on the F243 target
Here are the few lines of code relevant to this context extracted from the cdemo.h
header file.
#warn Assumed CLKIN 7.5 MHz for TMS320F240x, 5MHz for TMS320F24x
#warn Modify if not SYSTEM_INI_PERIOD,PWMDAC_PERIOD,SCSR1_REG_VALUE
#if (TARGET==F243)
/* ISR_EXE_PERIOD * CPU_CLK_FREQ=(1/20kz)*20Mhz=1000
#define SYSTEM_INT_PERIOD 1000
*/
#endif /* TARGET==F243 */
#if (TARGET==F2407)
/* ISR_EXE_PERIOD * CPU_CLK_FREQ=(1/20kz)*30Mhz=1500
#define SYSTEM_INT_PERIOD 1500
*/
*/
#define SCSR1_REG_VALUE
005
#endif /* TARGET==F2407 */
To rectify the problems mentioned earlier, modify the value of the following symbolic
constants to commensurate with the CPU clock frequency
1. SCSR1_REG_VALUE
2. SYSTEM_INT_PERIOD
Two warning messages are deliberately placed in the cdemo.h header file to alert
the user to modify the symbolic constants
Three warning messages will be generated when you compile the C framework
.if
x2407
; ISR_EXE_PERIOD * CPU_CLK_FREQ=(1/20kz)*30Mhz=1500
SYSTEM_INT_PERIOD .set
1500
; PLL MF=4, Enable EVA, Clear illegal address detect bit
SCSR1_REG_VALUE
.set
005
.endif
10
Hardware Setup
5. Hardware Setup
5.1. F2407 Evaluation Module (EVM)
F2407 EVM
RTDX
CCS
AUDIO
FREQUENCY
GENERATOR
ADC04U_DRV
ADCIN0
DATALOG
P2(23)
The range of input to the F2407 ADC: 0 to 3.3v (Represented as 1 to +1 within the DSP)
(Jumper JP8 should be in position 1-2)
Connect the input to Pin 23 of the expansion Analog connector (P2)
Apply sinusoidal signal that swings from 0 to 3.3v
RTDX
CCS
AUDIO
FREQUENCY
GENERATOR
ADC04U_DRV
ADCIN0
DATALOG
P2(5)
The range of input to the F243 ADC: 0 to 5.0v (Represented as 1 to +1 within the DSP)
(Jumper JP2 should be in position 1-2)
A Connect the input to Pin 5 of the expansion Analog connector (P2)
Apply sinusoidal signal that swings from 0 to 5v
11
To quickly execute demo using the pre-configured work environment, load the
workspace file from the build directory
Loading the workspace file will automatically open up the project file (*.mak) for the
corresponding project and show all the files relevant to the project in the FILEVIEW
tab.
From the Option menu choose Program Load and enable the Load Program
After Build option. This allows the automatic loading of the program to the target
DSP once the program is compiled
From the Project menu choose Rebuild All or the Rebuild All shortcut on the
toolbar to compile the program and load it to the target.
Once this is done, the expanded project view, as part of the CC environment will be
as shown in figure 5, if you have loaded fft128cd.wks to demonstrate the FFT128C
(128 point complex FFT) module in C framework. Graph window on the TOP is
configured to plot the input signal and the Graph window on the BOTTOM is
configured to plot the Magnitude Square of the spectral bins. Upon power up these
memory location will have garbage data and hence the plot on the graph window.
After selecting Real Time Mode, run the software by choosing Run from the Debug
menu or using the tool bar shortcut.
Right Click on the TOP Graph Window and choose continuous refresh, graph
window should be displaying the sinusoidal input signal at this time. Similarly choose
continuous refresh for the BOTTOM graph window, the graph window should be
displaying the Magnitude Square of the spectral bins. Figure 6 shows the project view
when the C demo is executed by applying 1250Hz sin signal input to the ADC.
Refer section 1.6 of FFT module document, for details on interpreting the
magnitude square results.
Figure 7 & 8 captures the CCS view, when fft128rd.wks file is loaded/executed to
demonstrate the FFT128R (128 point Real FFT) module in C framework. Observe that
Real FFT does not compute/display the conjugate component to save memory space.
12
13
14