📄 memory_test.c
字号:
/*********************************************************************************************
* File: memory.c
* Author: wuhan R&D center, embest
* Desc: memory test file
* History:
*********************************************************************************************/
/*------------------------------------------------------------------------------------------*/
/* include files */
/*------------------------------------------------------------------------------------------*/
#include "2410lib.h"
/*********************************************************************************************
* name: memory_test
* func: memory test
* para: none
* ret: none
* modify:
* comment:
*********************************************************************************************/
void memory_test(void)
{
int i;
UINT32T data;
int memError=0;
UINT32T *pt;
//
// memory test
//
uart_printf("\nMemory Test(%xh-%xh):WR\n",_RAM_STARTADDRESS+0x0e000000,(_ISR_STARTADDRESS&0xf0ff0000));
//memory write
pt=(UINT32T *)(_RAM_STARTADDRESS+0x0e000000);
while((UINT32T)pt<(_ISR_STARTADDRESS&0xf0ff0000))
{
*pt=(UINT32T)pt;
pt++;
}
//MEMORY READ
uart_printf("\nMemory Test(%xh-%xh):RD\n",_RAM_STARTADDRESS+0x0e000000,(_ISR_STARTADDRESS&0xf0ff0000));
//uart_printf("\b\bRD");
pt=(UINT32T *)(_RAM_STARTADDRESS+0x0e000000);
while((UINT32T)pt<(_ISR_STARTADDRESS&0xf0ff0000))
{
data=*pt;
if(data!=(UINT32T)pt)
{
memError=1;
uart_printf("\n\b\bFAIL:0x%x=0x%x\n",i,data);
break;
}
pt++;
}
if(memError==0)
uart_printf("\n\b\bO.K.\n");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -