AN2108 Freescale Semiconductor / Motorola, AN2108 Datasheet - Page 19

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
void _long_interrupt(52) input_isr(void);
{
}
void _long_interrupt(53) output_isr(void);
{
}
5
FPRC=0
Initialization mode
FPRC=1
No Initialization
In TASKING C, a function is declared as an interrupt service routine using the special type qualifiers
_long_interrupt and _fast_interrupt. If a function declared as a fast interrupt cannot be implemented in two
words or fewer, the compiler automatically changes the function to a long interrupt service routine. In this
application note, interrupts require more than two words of code, so only long interrupts are used.
following code segments illustrate the use of the _long_interrupt type qualifier for two interrupt service
routines: one triggered by the EFCOP FDIBE condition, the other by the EFCOP FDOBF condition.
If the interrupt service routines must perform further tasks, such as error calculation for adaptive
algorithms, these tasks must be programmed within the routines.
The EFCOP has two different filter initialization modes that are controlled by the Filter Processing
Initialization Mode (FPRC) bit of the FCSR. These modes “inform” the EFCOP of its processing starting
point, as follows (see Table 8):
5. The use of the _fast_interrupt and _long_interrupt type qualifiers is described in [7].
EFCOP Initialization Mode
/* Note: Interrupt number is $68 / 2 = $34 = 52 */
FDIR = *x_ptr++;
/* Note: Interrupt number is $6A / 2 = $35 = 53 */
*y_ptr++ = FDOR;
FPRC
Initialized data mode. The EFCOP starts processing once the FDM buffer is full.
Non-Initialized data mode. The EFCOP starts processing as soon as the FDIR receives the first
sample.
The EFCOP starts processing once the FDM is full. For an N tap filter, the first output is
generated after the Nth input is loaded into the FDIR.
The EFCOP starts processing as soon as the first input sample is loaded into the FDIR.
The values already in FDM are used to calculate FDOR, so be careful to ensure that the
FDM has been initialized manually before loading the first input data into the FDIR.
Programming the DSP56307/DSP56311 EFCOP in C
Freescale Semiconductor, Inc.
For More Information On This Product,
Table 8. EFCOP Initialization Modes
Example 5. Interrupt for FDOR
Example 4. Interrupt for FDIR
Go to: www.freescale.com
/* Load FDIR with next value */
/* Get value from FDOR */
EFCOP Operation
EFCOP Initialization Mode
5
The
19

Related parts for AN2108