AnsweredAssumed Answered

A Error of pointer

Question asked by wen hongkui on Aug 22, 2007
Latest reply on Aug 22, 2007 by CrasyCat
unsigned int FlashBuf[10];
 
#pragma CODE_SEG NON_BANKED
void FlashProg(void)
{
    FSTAT = 0x80;
    while(!FSTAT_CCIF);
}
 
void  FlashInit(void)
{
    unsigned char i;
   unsigned int * far  pSData = (unsigned int * far ) FlashProg;
    
    FCLKDIV = FBUS / 200000;
    pSData     for(i = 0 ; i < 10; i++)
    {
         FlashBuf[i] = *pSData++;
    }
}
I hope to copy FlashProg code in FlashBuf,But the pSData is error.  Why?
 
 

Outcomes