资源简介
SEED-DEC6713例程,包括所有的试验程序的使用方法,都可以使用
代码片段和文件信息
/********************************************************************************\
\* DEC6713_FLASH.c V2.00 *\
\* Copyright 2004 by SEED Electronic Technology LTD. *\
\* All rights reserved. SEED Electronic Technology LTD. *\
\* Restricted rights to use duplicate or disclose this code are *\
\* granted through contract. *\
\* Designed by: Hongshuai.Li
\* Discription: Erase write and read the whole chip.
\* Date: Modified 05.10.2005 *\
\********************************************************************************/
#include
#include
#include
#include
#include
#include
#include “DEC6713_FLASH.h“
#include
#define FLASH_ADDR (0x90000000+(0x8000<<1))
#define FLASH_ADDR1 (0x90000000+(0x10000<<1))
#define FLASH_ADDR2 (0x90000000+(0x18000<<1))
/********************************************************************************/
Uint32 i;
Uint32 TempData;
Uint32 Src_StartAdd;
Uint32 Dst_StartAdd;
extern far void vectors();
/********************************************************************************/
/********************************************************************************/
void main()
{
Src_StartAdd = (0x90000000+(0x8000<<1));
/* Initialize CSL must when using. */
CSL_init();
/* Initialize DEC6713 board. */
DEC6713_init();
/* Configure interrupt. */
IRQ_setVecs(vectors);
IRQ_nmiEnable();
IRQ_globalEnable();
/* Erase flash memory. */
Flash_Erase(FLASH_ADDR0x50);
// printf(“\nErase flash ok.“);
/* Write flash memory. */
for(i=0;i<0x2000;i++)
{
Flash_Writes(FLASH_ADDR+2*ifmod(i0x10000));
}
/* for(i=0;i<0x4000;i++)
{
Flash_Writes(Src_StartAdd+2*ifmod(i0x10000));
}*/
printf(“\nWrite flash ok.“);
/* Read flash memory. */
for(i=0;i<0x2000;i++)
{
TempData = Flash_Reads(FLASH_ADDR+2*i);
if(TempData != fmod(i0x10000))
{
printf(“\n Testing is Failure!“);
printf(“\nAddress 0x%x is error!“i);
exit(0);
}
}
printf(“\nOpereation is success.“);
}
/********************************************************************************\
\* Flash function difine. *\
\********************************************************************************/
/********************************************************************************\
\* Flash erase function. *\
\********************************************************************************/
Uint32 Flash_Erase(Uint32 addrUint16 type)
{
Uint32 ij;
*FLASH_5555 = FLASH_UL1; //first
*FLASH_2AAA = FLASH_UL2; //second
*FLASH_5555 = FLASH_UL3; //third
*FLASH_5555 = FLASH_UL4;
*FLASH_2AAA = FLASH_UL5;
switch(type)
{
case 0x50: //blo
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 0 2009-04-07 12:46 01. SEED-DEC6713例程\6713-FLASH\BMEM
文件 613 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\cc_build_Debug.log
文件 109678 2002-12-05 07:59 01. SEED-DEC6713例程\6713-FLASH\csl6713.lib
文件 4770 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\Debug\DEC6713.obj
文件 17196 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\Debug\DEC6713_FLASH.map
文件 10202 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\Debug\DEC6713_FLASH.obj
文件 76756 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\Debug\DEC6713_FLASH.out
文件 2835 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\Debug\vectors.obj
目录 0 2009-04-01 17:04 01. SEED-DEC6713例程\6713-FLASH\Debug
文件 376 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\Debug.lkf
文件 376 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\Debug.lkv
文件 13287 2005-05-10 14:18 01. SEED-DEC6713例程\6713-FLASH\DEC6713.gel
文件 1051 2005-05-10 14:52 01. SEED-DEC6713例程\6713-FLASH\DEC6713_FLASH.cmd
文件 4501 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\DEC6713_FLASH.paf
文件 991 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\DEC6713_FLASH.pjt
文件 12113 2005-05-10 15:04 01. SEED-DEC6713例程\6713-FLASH\DEC6713_FLASH.wks
文件 1076 2005-01-24 10:39 01. SEED-DEC6713例程\6713-FLASH\include\DEC6713.h
文件 1305 2005-10-08 09:11 01. SEED-DEC6713例程\6713-FLASH\include\DEC6713_FLASH.h
目录 0 2009-04-01 17:04 01. SEED-DEC6713例程\6713-FLASH\include
文件 0 2009-04-07 12:46 01. SEED-DEC6713例程\6713-FLASH\PMEM
文件 343422 2003-01-08 09:42 01. SEED-DEC6713例程\6713-FLASH\rts6700.lib
文件 6871 2004-12-08 11:18 01. SEED-DEC6713例程\6713-FLASH\src\DEC6713.C
文件 5676 2005-10-08 10:12 01. SEED-DEC6713例程\6713-FLASH\src\DEC6713_FLASH.c
目录 0 2009-04-01 17:04 01. SEED-DEC6713例程\6713-FLASH\src
文件 3577 2005-05-10 14:36 01. SEED-DEC6713例程\6713-FLASH\vectors.asm
目录 0 2009-04-07 12:46 01. SEED-DEC6713例程\6713-FLASH
文件 1657 2004-11-30 08:58 01. SEED-DEC6713例程\DEC6713_BOOT\bl
文件 276 2004-11-29 14:36 01. SEED-DEC6713例程\DEC6713_BOOT\boot.cmd
文件 808295 2004-11-29 18:07 01. SEED-DEC6713例程\DEC6713_BOOT\BOOT.hex
文件 955 2004-11-29 18:07 01. SEED-DEC6713例程\DEC6713_BOOT\BOOT.map
............此处省略388个文件信息
评论
共有 条评论