Author Topic: PIC EEPROM Memory Retention  (Read 1373 times)

0 Members and 1 Guest are viewing this topic.

Offline tarun172Topic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: us
PIC EEPROM Memory Retention
« on: October 12, 2017, 09:14:01 pm »
All,
    I noticed some unusual behavior PIC processor EEPROM. In my program, once user completes steps 1-10 (for example), the values get stores in EEPROM and the flag/status bit is set to high indicating that step 1 -10 write to EEPROM is complete. If user makes a mistake he obviously would have to hit "reset" before trying again. Problem I am facing is, I notice is EEPROM write to a particular memory location has very small finite write cycles. After erasing say 20-25 times, the EEPROM memory location is unable hold a value. I read a zero value at the memory location as soon as write operation is complete and status flag is set high. If I change memory location, it seems to work fine.
    Above behavior has got me baffled. I looked through the datasheet and nothing seems to stand out for this behavior. Can somebody assist?

- tarun172
Thanks & Regards,
Tarun S
 

Online wraper

  • Supporter
  • ****
  • Posts: 16856
  • Country: lv
Re: PIC EEPROM Memory Retention
« Reply #1 on: October 12, 2017, 09:17:54 pm »
Sounds like a bug in the code. Worst EEPROMs survive 10s of thousands write cycles. Average ones survive 100s of thousands.
 

Offline tarun172Topic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: us
Re: PIC EEPROM Memory Retention
« Reply #2 on: October 12, 2017, 09:25:40 pm »
If this is indeed the case, I should see this problem right away every time and not after 20-25 write cycles. Changing to new memory location seems to temporarily fix this issue. If I use just a variable and restrict the access to it, then I do not see this problem.
Thanks & Regards,
Tarun S
 

Online wraper

  • Supporter
  • ****
  • Posts: 16856
  • Country: lv
Re: PIC EEPROM Memory Retention
« Reply #3 on: October 12, 2017, 09:32:52 pm »
Does this problem persist on the cell if you reprogram the MCU? If it does. the only thing I can imagine is that you bombard single cell with thousands of writes because of some bug in the code. Or MCU works on too low voltage which is out of spec for EEPROM operations. I don't know about PIC, and you did not say particular model, but for some AVR MCUs EEPROM is not functional at lowest voltages on which MCU can operate.
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4099
  • Country: us
Re: PIC EEPROM Memory Retention
« Reply #4 on: October 12, 2017, 09:34:37 pm »
Perhaps at some point in code dev, u unwittingly ran a program that wrote to that location repeatedly without any break/wait for user input. And used up your 100K cycles.
 
The following users thanked this post: tarun172

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: PIC EEPROM Memory Retention
« Reply #5 on: October 12, 2017, 09:59:22 pm »
You should get many thousands of cycles.

You MUST check the errata for the chip you are using and if using a compiler also check the bug list for that... EEPROM errors are not unknown but normally work around-able.
 
The following users thanked this post: kg4arn, tarun172


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf