📄 nandflash_main.c
字号:
/***************************************优龙科技责任有限公司*********************************************
**--------------文件信息--------------------------------------------------------------------------------
**文 件 名: Uart_Main
**创 建 人: cgf
**最后修改日期: 2005-11-28
**描 述: 串口实验代码
**
********************************************************************************************************/
#include <stdio.h>
#include <string.h>
#include "systypes.h"
#include "utils.h"
#include "globals.h"
#include "xsuart.h"
//定义相关寄存器参数
#define GPLR0 *(volatile UINT *)0x40E00000
#define GPLR2 *(volatile UINT *)0x40E00008
#define GPSR0 *(volatile UINT *)0x40E00018
#define GPCR0 *(volatile UINT *)0x40E00024
#define GAFR3_U *(volatile UINT *)0x40E00070
#define MDCNFG *(volatile UINT *)0x48000000
#define MDREFR *(volatile UINT *)0x48000004
#define MSC0 *(volatile UINT *)0x48000008
#define MSC1 *(volatile UINT *)0x4800000C
#define MSC2 *(volatile UINT *)0x48000010
UINT downloadAddress, downloadFileSize;
#define ESC_KEY 0x1b
#define ENTER_KEY 0x0d
#define BACK_KEY 0x08
/*****************************************************************************
** 函数名称: PlatformMain
** 功能描述: PXA270平台主函数
** 输 入: 无
** 输 出 : 无
** 全局变量: 无
** 调用模块: 无
*****************************************************************************/
extern void TestNand(void);
void PlatformMain(void * memTop)
{
show_led(1, 1); //D4 light
show_led(2, 1); //D5 light
SerialConsoleInit(115200); //
SerialConsleSel(0); //0->FFUART, 1->BTUART
//配置存储器控制寄存器,主要是为配置BANK的相关参数
MSC0 = (MSC0&0xffff)|0x94690000;
MSC1 = 0xB8C9B8DC;
MSC2 = 0xFFF99134; //lan91c111
while(1)
{
TestNand();
}
}
/*****************************************************************************
****空函数
******************************************************************************/
VOID DumpProcessorRegisters(UINT exception, void *regsP)
{
}
/*****************************End of File*************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -