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

📄 bf533_ez-kit_ppi_config.asm

📁 ADI BLACKFIN BF533 的IIC驱动程序
💻 ASM
字号:
/******************************************************************************/
//
// Name: 	BF533 EZ-KIT video ITU-656 receive mode (8bit) for the Omnivision chip OV6630
//
/*****************************************************************************************

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

File Name:				BF533_EZ-KIT_PPI_Config.asm

Date Modified:			01/08/07		TL		Rev 2.0

Software:       		VisualDSP++4.5, Assembler 1.1.0.2, Linker 3.8.0.2

Hardware:				BF533 EZ-KIT Board (rev 1.2), Blackfin EZ-Extender (rev 1.2)

Chip:					ADSP-BF533 REV 0.2

Special Connections:  	None

Purpose:				PPI setup
				
				
Program Parameters:

********************************************************************************/
#include <defBF533.h>

/*****************************************************************************************/
// Global and extern subroutines
/*****************************************************************************************/
.global		BF533_EZ_KIT_PPI_Input_Config;

/*****************************************************************************************/
// Program Define Section
/*****************************************************************************************/
// PPI Setting control

#define EntireFieldSetting
// When receive entire field the following image viewer settings must been made
// Image start address = 1; Horizontal pixels = 566; Vertical pixels = 330;
// Bits per pixel = 8; Stride = 2; Image format = Gray scale

//#define ActiveFieldOnlySetting
// When receive active fields only the following image viewer settings must been made
// Image start address = 1; Horizontal pixels = 352; Vertical pixels = 288;
// Bits per pixel = 8; Stride = 2; Image format = Gray scale


#define entire_field  0x4  // PPI Transfer Type 
#define vertical_blanking  0x8  // PPI Transfer Type 
#define GP_Input_Mode 0xC
#define CFG_GP_Input_3Syncs 0x20
#define CFG_GP_Input_1framesync 0x30
#define DLEN_16 0x3800
#define Packing_En 0x80
#define Field1_2 0x40
#define Skip_EN 0x200
#define Skip_EO 0x400
#define POL_CLK 0x4000
#define POL_FS1_FS2 0x8000
#define POL_CLK_FS1_FS2 0xc000


/*****************************************************************************************/
// Program Variable Section
/*****************************************************************************************/
.section L1_code;

BF533_EZ_KIT_PPI_Input_Config:


	p0.h = hi(PPI_CONTROL);
	p0.l = lo(PPI_CONTROL);

	//The PPI is set to receive X lines per frame
	r0 = 288;
	w[p0+PPI_FRAME-PPI_CONTROL] = r0;

/*******************************************************************************/
#ifdef 	EntireFieldSetting
	//PPI enabled, input mode, receive field 1&2,
	//packing enabled, 8bit data bus, receice the entire field, nothing inverted
	r0 =  PORT_EN | Field1_2 | DMA32 | entire_field | Packing_En | DLEN_8 (z);	 
	w[p0+PPI_CONTROL-PPI_CONTROL] = r0;
	SSYNC;
#endif
/*******************************************************************************/

/*******************************************************************************/
#ifdef 	ActiveFieldOnlySetting
	//PPI enabled, input mode, receive field 1&2,
	//packing enabled, 8bit data bus, nothing inverted
	r0 =  PORT_EN | Field1_2 | DMA32 | Packing_En | DLEN_8 (z);	 
	w[p0+PPI_CONTROL-PPI_CONTROL] = r0;
	SSYNC;
#endif
/*******************************************************************************/


	
BF533_EZ_KIT_PPI_Input_Config.END:	
RTS;
/*******************************************************************************/

⌨️ 快捷键说明

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