1 Reply Latest reply on Jun 9, 2020 2:10 AM by MoTa_728816

    Saving and printing out data with eeprom


      hi everyone, I have a problem, after another discussion here I tried EM_EEPROM. If I'm supposed to press A, he's supposed to give me the saved  temperature values in eeprom, but it doesn't and I don't know why. Can any of you find my problem?


      sorry thats the real Discussion, cause i Forget the data.



        • 1. Re: Saving and printing out data with eeprom



          I found a few problems with your program.


          (1) In save_str_to_eeprom() was not checking the address range

          (2) In my previous sample, I always added 0 (NULL) at the end of the string  and write data with length of str + 1

               But this time null may not have been added.

          (3) In get_str_from_eeprom() the length of reading str was not checked,

               so it could be (and probably) over write out side of str[] buffer.

          (4) I set STR_BUF_LEN as 64, for reading and writing by human, but with format may be 64 was not enough,

               so I changed STR_BUF_LEN to 128


          Below is the TeraTerm log, and while I was typing this 5LP was reporting Extra Heating Turn off, which I don't know about ;-)