AnsweredAssumed Answered

How can I copy paged flash data into RAM?

Question asked by 兜里揣caca on Jul 26, 2017
Latest reply on Jul 27, 2017 by 兜里揣caca

Hi:

My data is stored in the paged flash area, If I want to copy the data to RAM, What shall I do?

I tried that:

RAM           = READ_WRITE  DATA_NEAR            0x2000  TO   0x3FFF ;

///////////////////////////////////////////////////////////////

PAGE_E0       = READ_ONLY   DATA_FAR IBCC_FAR  0xE08000 TO 0xE0BFFF;

///////////////////////////////////////////////////////////////////////

void CopyToRam(void){
char i;  
char *Ps, *Pd;
 Ps = (void *)0xe08000;  /or 0x780000;
 Pd = (void *)0x2000;
  for(i=0;i<100;i++)
      *Pd++ = *Ps++;
    }
}

But I failed,

What should I do?

Outcomes