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

📄 dec643_sdram.c

📁 这是dsp sdram存取实验
💻 C
字号:
/************************************************************
  Copyright (C), 2007 by SEED Electronic Technology LTD.
  FileName: DEC643_SDRAM.c
  Author:  Ya.X      Version : V1.0         Date:2007-09-20
  Description:   SDRAM的读写操作  
*************************************************************/

#include <csl.h>
#include <stdio.h>

#include "DEC643.h"

void main()
{	
	Uint32 i;
	Uint32 TempData;
	Uint32 *Src_StartAdd = (Uint32 *)0x80000000;

	/* Initialize csl. */
	CSL_init();
	
	/* Initialize DEC643 board. */
	DEC643_init();
	  	
	/* Write data in the SOURCE address. */
	for(i=0; i<0x400000; i++)
	{
		*(Src_StartAdd++) = i;
	}

	printf("\nFinish writing Source data.");
	
	Src_StartAdd = (Uint32 *)0x80000000;
	
	/* Read data from Src_StartAdd. */
	for(i=0; i < 0x400000; i++)
	{
		TempData = *(Src_StartAdd++);
		if( TempData != i )
		{
			printf("\nTesting is failure");
			exit(0);
		}
	}
	
	printf("\nTesting is success!");

	for(;;);	
	
}

⌨️ 快捷键说明

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