Dear Sir;
I am doing an automotive project using LPC2368. Here I want to store some critical data in 512k FLASH memory of LPC2368.Hence I am using IAP programming for the same.
I reffered the code from C:\Keil\ARM\Flash\LPC_IAP2_512 and here I am having some doubts; In functions like init(),EraseSector() and ProgramPage() after executing the code :
IAP_Execute (&IAP);
I am checking IAP status as
if (IAP.stat) return (1);
If it is successfull it is returning "IAP.stat" as Zero but if it is failure it is returning One.But in the calling function I am not doing anything if it is failure(That is ,if it is returnig as ONE).
Will You please tell me ,What can I do in case if it returns one (Failure)to calling function.
Can I call the same function (init() or EraseSector() or ProgramPage() )again if it is failure, is it a good method of Error handling or is there is any other methode .
sincerely shamsudheen OP