AN2108 Freescale Semiconductor / Motorola, AN2108 Datasheet - Page 40

no-image

AN2108

Manufacturer Part Number
AN2108
Description
AN2108 Programming the DSP56307/DSP56311 EFCOP in C Using Taskings Tool Suite
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
40
Code Listing for FIR LMS Example
FCSR.I = 0x000884;
/* ------------------------------------------------------------ *
for (i=0; i<FIR_LENGTH; i++)
{
}
/* ----------------------------------------------- *
/* Open "reference signal" file */
if ((fp1 = fopen("tvecs\\x.txt", "r")) == NULL)
{
}
/* Read "reference signal" data */
for (i=0; i<INPUT_LENGTH; i++)
{
*
* ------------------------------------------------------------ */
*
* ----------------------------------------------- */
FDM_buffer[i]=0;
FCM_buffer[i]=0;
printf ("Error -- Can’t open \"tvecs\\x.txt\"\n");
exit(1);
if (fscanf(fp1, "%x", &x[i]) != 1)
{
Initialize of input data memory and filter coefficients
Read "reference signal" from file
printf ("Error reading input data\n");
/* FDOIE = 1
/* FDIIE = 0
/* FSCO
/* FPRC
/* FMLC
/* FOM
/* FUPD
/* FADP
/* FLT
/* FEN
Programming the DSP56307/DSP56311 EFCOP in C
= 0
= 1
= 0
= 00 (Real FIR Filtering Mode)
= 0
= 1
= 0
= 0
Freescale Semiconductor, Inc.
(Enable Filter Data Out Interrupt) */
(No Filter Data Input Interrupt)
(No shared coefficients)
(No State Initialization)
(Single Channel Mode)
(No Filter Coefficient Update)
(Adaptive Mode)
(Filter Type = FIR)
(Keep EFCOP Disabled for now)
For More Information On This Product,
Go to: www.freescale.com
*
*/
*/
*/
*/
*/
*/
*/
*/
*/
*

Related parts for AN2108