Read direct from a Memory address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Read direct from a Memory address

914 Views
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

Labels (1)
0 Kudos
Reply
1 Reply

740 Views
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 Kudos
Reply