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

IAP Code ends up in HardFault_Handler

Dear Friends,

Hello,

I want to read/write flash memory of lpc1752. But it was not working
So i tried to read the part id.
But when i debug my code in keil uvision4 my code stuck in HardFault_Handler
here is my code :

typedef void (*IAP)(unsigned long [],unsigned long[]);
IAP iap_entry;
IAP iap_entry = (IAP) IAP_LOCATION;

unsigned long iap_read_part_id(void)
{
        unsigned long command[5];
        unsigned long result[5];

        command[0] = 54;

        iap_entry(command,result);

        printf("result = %X\r\n",result[1]);

        return result[1];
}

Please help me to find out why HardFault_Handler occurs and how to resolve this problem
Thank You ...

Parents
  • Well, it was just my guess/assumption that Keil only simulate the chip based on the hardware documentation available, and not based on secret firmware code written by the chip manufactuer.

    If your simulator doesn't have any NXP IAP firmware then no other Keil simulator has it either.

    What to do? Use a real chip. Only a real chip is guaranteed to perform 100% as a real chip...

Reply
  • Well, it was just my guess/assumption that Keil only simulate the chip based on the hardware documentation available, and not based on secret firmware code written by the chip manufactuer.

    If your simulator doesn't have any NXP IAP firmware then no other Keil simulator has it either.

    What to do? Use a real chip. Only a real chip is guaranteed to perform 100% as a real chip...

Children