AnsweredAssumed Answered

Storing Variable at runtime in Flash for KL05

Question asked by Amit Kumar on Jun 27, 2014
Latest reply on Jun 27, 2014 by Bob Paddock


I Want to store a variable at runtime in Flash memory of KL05Z32VLF4, The example code given in codewarrior is not working. I am using codewarrior 10.5 I have attached the code present in the codewarrior example code which is not working . I tried copying some part of code and on debugging I found that the code hangs itself when we do erase or write operation , on erase operation  the error value returned by the Erase function is 0x89, which in PE_Error.h states invalid address. i.e #define ERR_PARAM_ADDRESS               0x89U /*!< Invalid address. */  

The above uc has 32 Kb Flash and I have selected 0x7C00 as the address location and for testing I am writing to 1byte only. The Read function is working fine for the 1st time . I am following the steps as 1. READ, 2. ERASE, 3. WRITE. and my program is getting hanged in Erase. Please look into the matter and provide some example codes regarding this. Thanks


Kind Regards

Amit Kumar

Original Attachment has been moved to: