⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dma_config.c

📁 ADSP 底层驱动
💻 C
字号:
/******************************************************************************/
//
// Name: 	BF533 EZ-KIT DMA Setup
//
/******************************************************************************

(C) Copyright 2006 - Analog Devices, Inc.  All rights reserved.

File Name:	DMA_Config.c

Date Modified:	10/25/04		Rev 0.2

Software:       VisualDSP++4.5

Hardware:		ADSP-BF533 EZ-KIT Board

Special Connections:  None

Purpose:		The file sets up the DMA transfer
				
				

*********************************************************************************/


#include <cdefBF533.h>
#define Line_Length 720
#define Frame_Length 525



void Init_DMA(void)
{

	//Target address of the DMA
	*pDMA0_START_ADDR = 0x0;	

	//Line_Length 16bit transfers will be executed
	*pDMA0_X_COUNT = Line_Length;

	//The modifier is set to 2 because of the 16bit transfers
	*pDMA0_X_MODIFY = 0x2;	
														
	//Frame_Length 16bit transfers will be executed
	*pDMA0_Y_COUNT = Frame_Length;

	//The modifier is set to 2 because of the 16bit transfers
	*pDMA0_Y_MODIFY = 0x2;	

	//PPI Peripheral is used
	*pDMA0_PERIPHERAL_MAP = 0x0;	
	
	//DMA Config: Enable DMA | Memory write DMA | 2-D DMA | Discard DMA FIFO before start | enable assertation of interrupt | NDSIZE for stop mode | Enable STOP DMA
	*pDMA0_CONFIG = DMAEN | DI_EN | WNR | WDSIZE_16| DMA2D | RESTART | DI_EN;	
	

}//end Init_DMA


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -