IAP Read part ID returns 0
2004-09-03 by araft0
Hi,
I am trying to use the IAP commands using lpc2114.
The result[0] is allways 0.
when the C compiler does not have -interwok option, the uC hangs.
Is there anything I forgot? is there any other configuration to the
compiler any command to execute?
the code is:
#define IAP_LOCATION 0x7ffffff1
unsigned int command[5];
unsigned int result[2];
int main(void)
{
typedef void (*IAP)(unsigned int [],unsigned int[]);
IAP iap_entry;
disableIRQ();
iap_entry=(IAP) IAP_LOCATION;
// get part ID
command[0]=54;
result[0]=0;
iap_entry(command, result); // I do this just for a laugh
enableIRQ();
}
thank.