AN2108 Freescale Semiconductor / Motorola, AN2108 Datasheet - Page 11

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
4
This union is then defined as follows, which allows direct register access from the C code:
Two different union accesses are possible:
The input data samples must be transferred from memory to the EFCOP data input register (FDIR).
Similarly, the output data samples must be transferred from the EFCOP data output register (FDOR) to
memory, as shown in Figure 6.
X/Y Memory
Signal
Transferring Data to and from the EFCOP
Input
x(0)
x(1)
x(2)
x(3)
x(4)
x(5)
...
...
Using the ‘I’ member of the union for word access. This method accesses the complete register and
generates a single MOVEP instruction (two program words):
Using the ‘B’ member of the union for bit field access. This method accesses individual bits and
generates BSET and BCLR instructions. This method is not as efficient as the first one since more
program words are used. However, it makes the code more readable and is useful while the code is
developed and debugged:
...
}facr_type;
#define FACR (*(facr_type _Y *)0xFFFFB5)
FACR.I = 0x000001;
FACR.B.FISL = 0x0; /* Filter Input Scale (applicable only in IIR mode).*/
FACR.B.FSA = 0x0;
FACR.B.FSM = 0x1;
FACR.B.FRM = 0x0;
FACR.B.FSCL = 0x0; /* Choose Filter Scaling = 1 (no scaling).*/
Transfer To
} B;
int I;
FDIBE
Programming the DSP56307/DSP56311 EFCOP in C
Freescale Semiconductor, Inc.
Figure 6. Transfer to and from the EFCOP Registers
For More Information On This Product,
FDIR
Go to: www.freescale.com
/* Do not enable Sixteen-bit Arithmetic Mode. */
/* Enable Filter Saturation. */
/* Choose rounding mode = convergent. */
FDM
EFCOP
FMAC
FCSR
/* Enable Filter Saturation */
FCM
FDOR
Transferring Data to and from the EFCOP
Transfer From
FDOBF
/* EFCOP ALU Control
Register*/
Filtered
X/Y Memory
Signal
y(0)
y(1)
y(2)
y(3)
...
...
...
...
11

Related parts for AN2108