Read direct from a Memory address

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Read direct from a Memory address

907 次查看
PEGE
Contributor I

Hello i am using a MCF5282,

 

and i want to buid a loop in C which reads the memorycontent from on adress to another adresse. for example from 0x4000 to 0x8000. in the mcf i have the option to read directly from the sram with RAMBAR_ADDRESS[var] (from 0x20000000).

 

I am interesetd if someone knew an opportunity to read direct from the whole space of memory for example from 0x0 till 0x7FFFFFFF.

 

regards Peter

标签 (1)
0 项奖励
回复
1 回复

733 次查看
angelo_d
Senior Contributor I

Hi PEGE,

 

i would say this is a simpel C exercise (untested)

 

/* setup your src and dest */

unsigned long volatile * src=(unsigned long volatile *)(RAMBAR+0x4000);

unsigned long volatile * dst =(unsigned long volatile *)(RAMBAR+ ....) ;

 

for ( ; src<0x8000 ; )

      *dst++ = *src++;

 

regards,

angelo

0 项奖励
回复