AN2108 Freescale Semiconductor / Motorola, AN2108 Datasheet - Page 47

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
if ((fp_efcop_out = fopen("out\\efcop_24.cod", "wb")) == NULL)
{
}
#ifdef DSP_CORE
/* Set core ALU Saturation Mode and Rounding Mode */
#endif
/*------------------------*
while (fread(&coeffs_X[0], sizeof(_fract), M+1, fp_in) == M+1)
{
* Loop for each subframe *
*------------------------*/
printf ("Error -- Can’t open EFCOP output file \"out\\efcop_24.cod\"");
printf ("\nProgram Aborted.\n");
exit(1);
_asm("bset #20,SR");/* Saturation Enabled */
_asm("bset #21,SR");/* 2’s complement rounding */
subframe_count++;
/* Initialiase Filter Coefficients */
/*** Copy coeffs[] from X memory to Y memory ***/
for (i=0; i<M+1; i++)
{
}
/* Set up DMA Counter 0 for transfer of 25 * 2 items (counter mode B) */
* Set up DMA Channel 0 to feed 50 data samples to EFCOP
* (40 samples in subframe + 10 history samples)
*--------------------------------------------------------*/
#ifdef DSP_CORE
#endif
FCM_buffer[i] = coeffs_X[M-i];
/*--------------------------------------------------------*
coeffs_Y[i] = coeffs_X[i];
Programming the DSP56307/DSP56311 EFCOP in C
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
/* For EFCOP calculation (reversed) */
/* For core calculation */
Code Listing for Residu Example
*
*
47

Related parts for AN2108