This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2138--IAP--debug wrong--Prefetch Abort

Hi,
Now, I'm doing the IAP function in LPC2138 using the keil 3.05. Rebuild is ok. But when I debug it, it will have a PreFetch Abort. The wrong message is "Prefetch Abort: Thumb Instruction at 80000000H".This happens at every function about IAP ,such as ReadParID,BootCodeID and so on.

I have browsed many material from the internet without a result.

Did anybody encounter this matter?

Parents
  • this is iap.c

    #define IAP_ENTER_ADR  0x7ffffff1
    #define iap_entry(a,b) ((void(*)())(IAP_ENTER_ADR))(a,b)
    #define IAP_FCCLK       48000
    
    uint32 ReadParID(void)
    {
            paramin[0] = IAP_READPARTID;
    
            iap_entry(paramin,paramout);
    
            return (paramout[0]);
    
    }
    this is main.c
    int main (void)
    {
             uint8 err;
             VICIntEnClr=0xffffffff;
            MAMCR = 0;
            PLLCON = 0;
            PLLFEED = 0xaa;
             PLLFEED = 0x55;
    
             err =ReadParID();
    //.............................
    
    }
    

    .
    When I debug to ReadRarID(),it will prefetch abort.

Reply
  • this is iap.c

    #define IAP_ENTER_ADR  0x7ffffff1
    #define iap_entry(a,b) ((void(*)())(IAP_ENTER_ADR))(a,b)
    #define IAP_FCCLK       48000
    
    uint32 ReadParID(void)
    {
            paramin[0] = IAP_READPARTID;
    
            iap_entry(paramin,paramout);
    
            return (paramout[0]);
    
    }
    this is main.c
    int main (void)
    {
             uint8 err;
             VICIntEnClr=0xffffffff;
            MAMCR = 0;
            PLLCON = 0;
            PLLFEED = 0xaa;
             PLLFEED = 0x55;
    
             err =ReadParID();
    //.............................
    
    }
    

    .
    When I debug to ReadRarID(),it will prefetch abort.

Children