• AVR Freaks

Hot!EEPROM Saving Issue

Author
AMPS
Super Member
  • Total Posts : 595
  • Reward points : 0
  • Status: offline
2021/03/03 00:25:23 (permalink)
0

EEPROM Saving Issue

Dear all
I have product which is running over the years(PIC16F883 ). I havent changed the code and hardware. recently i am observing Internal EEPROM saving issue. 
These condition it happens.
1) In my project , I am trying to save program after several count. i am saving only once after my count reached .
2) When power off and power on if i checked, it will save default program written. in some of product it will save in On mode. once power off and power on it will be taking old program only.
 
 Here i would like to know i haven't changed the code and hardware since 3 year. I haven't received single product return saved eeprom issue.
 
what is possible reason to affect the saving of program. any hardware pin internally affect the EEPROM read and write?? 
we are procuring PIC device from genuine resource Microchip only.
We have ESD care taken while inserting IC . 
 
I would like to know possible reason for failure of EEPROM issue.

Amps
*.*.*.*.*.*.*.*.*.*.*.*.*
#1

7 Replies Related Threads

    ric
    Super Member
    • Total Posts : 30223
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: EEPROM Saving Issue 2021/03/03 01:51:11 (permalink)
    +1 (1)
    YOu are using some very awkward language.
    When you say "save program", do you mean saving some settings into the EEPROM?
    You cannot save "program code" in EEPROM.
     
    It's unclear what "When power off and power on if i checked, it will save default program written" actuallyt means.
    Can you describe how you test to see what has happened?
     
    "in some of product it will save in On mode. once power off and power on it will be taking old program only."
    Maybe I am being dense, but I cannot work out what you are trying to say here.
     
     
     
     
     
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    RISC
    Super Member
    • Total Posts : 6056
    • Reward points : 0
    • Status: offline
    Re: EEPROM Saving Issue 2021/03/03 03:09:54 (permalink)
    +3 (3)
    Hi,
    From my experience 99.9% of EEPROM issues (or bootloader issues) are due to software bugs or hardware ...I mean the PIC itself is not defective. I have seen software running well for several years and suddenly some failures
    As we don't know your operating conditions, let me give you some hints where to look :
     
    1/ Does your system monitor power supply (detect power failure ? how is it done ?)
     
    2/ if this case is possible in your system, does your system detect unforeseen power supply failure to stop writing EEPROM while power supply goes down ? 
     
    3/ Have you changed any component around the PIC ?
     
    4/ Do you have a software mechanism to garantee that your write operations are validated after being done (checksum, flags,...) ?
     
    5/ If you have some flag or some variable to indicate a change in EEPROM, how do you make sure that it is in line with  the changes if power fail just before updating this variable ? (like writing to double location a vairable, one time before starting the changes and one time after so that when you reboot both should be the same to ensure that the change was properly done...
     
    Regards 
     
     

    For support make sure to check first here : http://microchipdeveloper.com
    There are hundreds of PIC, AVR, SAM...which one do YOU use ?
    #3
    AMPS
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Status: offline
    Re: EEPROM Saving Issue 2021/03/04 01:09:37 (permalink)
    0
    From my experience 99.9% of EEPROM issues (or bootloader issues) are due to software bugs or hardware ...I mean the PIC itself is not defective. I have seen software running well for several years and suddenly some failures

     
    I haven't changed hardware and software from Years. only we are purchase PCB from different vendor.
     
    1/ Does your system monitor power supply (detect power failure ? how is it done ?
    No I am not monitoring Power supply condition.In my code When i start power it read data from EEPROM. 
    I write into EEPROM while my count = =setvalue. it going to done only once.
     
    3/ Have you changed any component around the PIC ?
    I haven't changed any component since last 2 year.
     
    4) 4/ Do you have a software mechanism to garantee that your write operations are validated after being done (checksum, flags,...) ?
    Yes I am validating and while EEPROM write operation.
     
    5/ If you have some flag or some variable to indicate a change in EEPROM, how do you make sure that it is in line with  the changes if power fail just before updating this variable ? (like writing to double location a vairable, one time before starting the changes and one time after so that when you reboot both should be the same to ensure that the change was properly done...
    In my code , i am writing only once. when power is on same program will be read each time.
     
    my question is ESD discharge can it cause EEPROM corrupt issue??
     
     
     

    Amps
    *.*.*.*.*.*.*.*.*.*.*.*.*
    #4
    ric
    Super Member
    • Total Posts : 30223
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: EEPROM Saving Issue 2021/03/04 01:49:06 (permalink)
    +2 (2)
    Make sure you do NOT try to read EEPROM within the first tens of milliseconds after power up. Low voltage Vdd can turn a read into write. You should also enable BOR.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #5
    RISC
    Super Member
    • Total Posts : 6056
    • Reward points : 0
    • Status: offline
    Re: EEPROM Saving Issue 2021/03/04 02:51:28 (permalink)
    +1 (1)
    Hi,
    As you say that you do not monitor power supply, is it possible in your application that you lose power while your PIC is writing EEPROM ?
    What do you mean by ESD discharge ??
    Regards
    post edited by RISC - 2021/03/04 02:56:41

    For support make sure to check first here : http://microchipdeveloper.com
    There are hundreds of PIC, AVR, SAM...which one do YOU use ?
    #6
    NKurzman
    A Guy on the Net
    • Total Posts : 19185
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: EEPROM Saving Issue 2021/03/04 11:09:39 (permalink)
    +1 (1)
    Internal EEPROM? or EXternal?
    Have you verified the Chip Part numbers?
    Is you new supplier using verified Genuine IC?
     
    #7
    AMPS
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Status: offline
    Re: EEPROM Saving Issue 2021/03/11 03:22:48 (permalink)
    0
    Its internal EEPROM. I am purchasing from Microchip direct . Yes nothing has changed
     
    ESD -> Electro Static Discharge. When people wore to avoid IC failure . If some grounding is not done proper.
    In this situation any chance of EERPOM failure??
    https://www.digikey.in/product-detail/en/scs/ECWS61M-1/SCP301-ND/1621640?cur=INR&lang=en&utm_adgroup=General&utm_source=google&utm_medium=cpc&utm_campaign=Smart%20Shopping_Product_Zombie%20SKUS&utm_term=&productid=1621640&gclid=EAIaIQobChMI9K_1lIKo7wIV1n4rCh3kMAYlEAQYAiABEgJha_D_BwE

    post edited by AMPS - 2021/03/11 03:24:29

    Amps
    *.*.*.*.*.*.*.*.*.*.*.*.*
    #8
    Jump to:
    © 2021 APG vNext Commercial Version 4.5