> This is the iap function:
>
> void iap (unsigned *cmd,unsigned *rslt,unsigned entry)
> {
> asm("mov r15,r2");
> }
You're overwriting the PC (program counter) which is one of the
scariest things u can do. Usually this results in prefetch aborts.
You can to branch to the IAP bootloader address location by using a
function pointer.
The code below is some example code taken from the User Manual for
the lpc you are using.
#define IAP_LOCATION 0x7ffffff1 //address of IAP BL
unsigned long command[5];
unsigned long result[2];
typedef void (*IAP)(unsigned int [],unsigned int[]); //function ptr
IAP iap_entry;
iap_entry=(IAP) IAP_LOCATION; // function pointer declared and set
to address location
iap_entry (command, result); //doneMessage
Re: Flash problem
2005-02-09 by Leighton Rowe
Attachments
- No local attachments were found for this message.