AN2108 Freescale Semiconductor / Motorola, AN2108 Datasheet - Page 13

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.2 Direct Memory Access (DMA)
.
.
Although polling is the simplest method of transferring data to and from the EFCOP, it suffers from the
disadvantage that the DSP56300 core waits in a “do-nothing” loop for the status bit to change. The
DSP56300 core is therefore unavailable for performing other tasks. Polling is useful for testing the EFCOP
configuration and verifying the proper functionality of an application. However, for greater efficiency,
other methods of data transfer that involve the DSP56300 core as little as possible are preferred.
DMA transfers input data samples from memory to the FDIR or output data samples from the FDOR to
memory without requiring intervention from the DSP56300 core. The DSP56307 has six DMA channels,
any of which can be used. A DMA transfer using DMA Channel n involves the registers shown in Table 3.
In addition to these general DMA registers, the appropriate DMA offset registers must be used.
For DMA transfers from memory to the FDIR, set up the DMA channel to be triggered by FDIBE; for
DMA transfers from FDOR to memory, set up the DMA channel to be triggered by FDOBF. Issue DMA
requests via internal peripheral DMA requests MDRQ11 and MDRQ12, respectively, as shown in Table 4.
Register (n=0 .. 5 )
FDIBE=1
FDOBF=1
Request Condition
DCRn
DDRn
DCOn
DSRn
} /* Repeat for next iteration */
} /* End of main() */
/**********************************************/
/*** EFCOP is now calculating output sample ***/
/**********************************************/
/*** Poll FDOBF until set ***/
while (FCSR.B.FDOBF == 0)
{}
output[n] = FDOR; /* Get output data sample from EFCOP */
DMA Control Register
DMA Source address Register
DMA Destination address Register
DMA Counter Register
Programming the DSP56307/DSP56311 EFCOP in C
Freescale Semiconductor, Inc.
For More Information On This Product,
Peripheral Request Number
/* Wait for FDOBF to become 1 */
Table 4. DMA Request Sources.
Name
Go to: www.freescale.com
Table 3. DMA Registers
MDRQ11
MDRQ12
Contains address of source data for DMA transfer.
Sets the DMA modes required.
Contains address of destination for DMA transfer.
Contains number of items to be transferred.
Transferring Data to and from the EFCOP
DCR Bits 15-11 (DSR [4–0])
Purpose
10101
10110
13

Related parts for AN2108