Content originally posted in LPCWare by hhuwjb on Fri Nov 07 20:06:08 MST 2014
Hi all
I use the IAP to read partID on LPC4357, but it hang on here everytime :
IAP_Init();
Can someone tell me where is wrong ,Thank you!
---------------------------------------------------------------------------
IAP.c:
typedef void (*IAP) (unsigned int [],unsigned int[]);
IAP iap_entry =(IAP)0x10400100;
unsigned long command[6] = {0,0,0,0,0,0};
unsigned long result[5]= {0,0,0,0,0};
unsigned long IAP_Init(void)
{
command[0]=IAP_CMD_Init;
iap_entry(command,result);
return result[0];
}
unsigned long IAP_ReadParID (unsigned long * PartID)
{
command[0] = IAP_CMD_ReadParID;
iap_entry(command, result);
*PartID = result[1];
return result[0];
}
--------------------------------------------------------------------------
APP.c:
__disable_irq();
IAP_Init();
__enable_irq();
....
__disable_irq();
IAP_ReadParID(&id[0]);
__enable_irq();
-----------------------------------------------------------------
Need your help,Thank you!