This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

51 will be reset when using a for-loop way to access Xdata (32K RAM) by Keil monitor tool.

Hi,
When I try to do memory test by 8051, writing 1 byte of data (0xff or 0x0) to Xdata (32K RAM) by a for-loop way, 8051 will reset after runing the porgram by Keil monitor tool.

If the length of data put in Xdata is less than about 0x300, everything seems OK.

Can you give any idea about this situation, pls?

Thanks.

J.D.

//====================================================
// XRAM testing
BYTE xdata t_dat[32750];
BYTE test_xram_data(){
WORD addr_y = 0;
BYTE Wrng_Flg = 0;

for( addr_y = 0x0; addr_y < 0x7fee; ++addr_y)
{

t_dat[addr_y] = 0xff;

if(t_dat[addr_y] != 0xFF)

Wrng_Flg = 1;

t_dat[addr_y] = 0;

if(t_dat[addr_y] != 0)

Wrng_Flg = 1;

}
return Wrng_Flg;
} //====================================================