A Error of pointer

cancel
Showing results for 
Search instead for 
Did you mean: 

A Error of pointer

Jump to solution
924 Views
wackestar
Contributor I
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?
 
 
Labels (1)
Tags (1)
0 Kudos
1 Solution
83 Views
CrasyCat
Specialist III
Hello
 
I am not sure what you are trying to achieve here.
Are you looking for a way to run some code out of RAM?
 
If this is the case I would suggest you to look for FAQ-27682 on Freescale web site.
This FAQ covers exactly that topic.
 
I hope this helps.
 
CrasyCat

View solution in original post

0 Kudos
1 Reply
84 Views
CrasyCat
Specialist III
Hello
 
I am not sure what you are trying to achieve here.
Are you looking for a way to run some code out of RAM?
 
If this is the case I would suggest you to look for FAQ-27682 on Freescale web site.
This FAQ covers exactly that topic.
 
I hope this helps.
 
CrasyCat

View solution in original post

0 Kudos