AN2108 Freescale Semiconductor / Motorola, AN2108 Datasheet - Page 50

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
50
Code Listing for Residu Example
/*** Initialize data history to zero ***/
/* ------------------------------------- *
if (fread(&input[M], sizeof(_fract), L_SUBFR, fp_in) != L_SUBFR)
{
}
/* -------------------------------------------------------- *
#ifdef DSP_CORE
FDCH.I = 0x000000;
FCNT = M;
FDBA = FDM_buffer;
FCBA = FCM_buffer;
FKIR = 0x000000;/* Clear Filter Constant Input Register.
for (i=0; i<M; i++)
{
}
*
* ------------------------------------- */
*
* -------------------------------------------------------- */
FCSR.B.FEN = 0x1;/* Enable EFCOP
/*** Perform Residu calculation on EFCOP ***/
printf ("Error reading input data");
printf ("\nProgram Aborted.\n");
exit(1);
input[i] = 0; /* Core history buffer.
Read input data from file
Enable EFCOP
/*
/* Filter length = M+1.
Programming the DSP56307/DSP56311 EFCOP in C
/* FSM
/* FRM
/* FSCL = 01 (Scaling of output data: Scale << 3) */
/* No decimation; One channel.
/* EFCOP Data Buffer Base Address.
/* EFCOP Coefficient Buffer Base Address.
Freescale Semiconductor, Inc.
to match C code implementation
For More Information On This Product,
= 1 (Saturation on Overflow)
= 01 (Use
*
Go to: www.freescale.com
2’s comp Rounding)
*
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/

Related parts for AN2108