AN2108 Freescale Semiconductor / Motorola, AN2108 Datasheet - Page 34

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
34
Code Listing for FIR Filtering Example
DDR0 = (int*)&FDIR;
/* DMA Offset Regsiter 0 */
DOR0 = 1; /* Offset = 1 */
/* DMA Ch0 Control Register */
DCR0.I = 0x14AA04;
/* ------------------------------------------------------------- *
/* DMA Counter 0: transfer of 81 items (counter mode A) */
DCO1 = (INPUT_LENGTH - FIR_LENGTH);
/* Source address = EFCOP’s FDOR */
DSR1 = (int*)&FDOR;
/* Destination address = start of output data buffer */
DDR1 = (int*)output; /* Offset = 1 */
/* DMA Ch1 Control Register */
DCR1.I = 0x0CB2C1;
*
* ------------------------------------------------------------- */
Set up DMA Channel 1 to transfer output data to EFCOP’s FDOR *
/* DE
/* DIE
/* DTM
/* DPR
/* DCON = 0
/* DRS
/* D3D
/* DAM
/* DDS
/* DSS
/* DE
/* DIE
/* DTM
= 0
= 0
= 010
= 10
= 10101
= 0
= 100000 (DMA Addressing Mode:
= 01
= 00
= 0
= 0
= 001
Programming the DSP56307/DSP56311 EFCOP in C
Freescale Semiconductor, Inc.
For More Information On This Product,
(DMA Ch0 disabled for now )
(No interrupt at end of transfer
(Line transfer (2D), Clear DE
(Priority = 2)
(Continuous mode not needed
(DMA Request is MDRQ11: EFCOP FDIBE) */
(Disable 3D mode)
(Destination (FDIR) is in Y memory)
(Source (input[]) is in X memory)
(DMA Ch1 disabled for now )
(No interrupt at end of transfer
(Word, Clear DE
/* Note: DCO = (No. items) - 1 */
Source = 000 (2D, DOR0 offset)
Dest
Go to: www.freescale.com
= 100 (No update)
) */
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/

Related parts for AN2108