EEPROM Reading 0s with noisy power-on

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

EEPROM Reading 0s with noisy power-on

492 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by GregDavies on Mon Aug 31 11:50:52 MST 2015
I have an application running on an LPC4357 that uses EEPROM to store configuration. Sometimes when I turn on the device, it will read all 0s from the EEPROM (not xFF as in uninitialized state). I'm using the 2.04 version of LPCOpen, but I don't see any changes related to EEPROM in the new version. The code calls Chip_EEPROM_Init() then starts reading configuration data, and works fine on most of the units most of the time.

I've been making the problem show up more often by making the power bounce a lot as it's turning on (wiggling the AC cable as I plug it in). I realize that's not a good characterization, but it's a good indication it may be power related. I've never seen this issue come up when I use the reset line instead.

I've tried calling Chip_EEPROM_DeInit() before the init call, or in various combinations before and/or after reading 0s, but it seems to have no effect.

One thing that I did notice is that as soon as I do a Chip_EEPROM_EraseProgramPage(), the EEPROM reads normally again. I've worked around the issue for now by doing an erase/program without writing any data after initializing the EEPROM, and it works every time, but I still don't understand what the problem actually is, to know if I've solved it for good.

We've seen this behaviour on one other unit (seeing it in about 1 out of 50-200 units). I figure at this rate someone else must have seen and fixed this same problem. Any insights?
Labels (1)
0 Kudos
5 Replies

440 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by GregDavies on Fri Oct 16 10:39:28 MST 2015
I just wanted to add my workaround in case anyone else is using the EEPROM.

I added a magic value to the EEPROM. Every time I boot up, I check if the number is there. If it isn't, I write it. It's only there to give me something to write, otherwise Chip_EEPROM_EraseProgramPage() has no effect, and the EEPROM stays latched up.

I still have no idea what the root cause is, but I haven't seen it come up after hundreds of power cycles.
0 Kudos

440 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by GregDavies on Mon Aug 31 12:41:23 MST 2015
We still need to write the wait state values, which is done by Chip_EEPROM_Init(). There are default values in these registers that are overwritten. The defaults in the registers have always been correct, but the user manual stated incorrect values.
0 Kudos

440 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mysepp on Mon Aug 31 12:36:21 MST 2015
I thought there was some (delay) register, which has the wrong value during startup and must be corrected?

"Work-around:
No work-around needed. Program the required values into the registers before using the EEPROM."

First sentence is a bit to discuss, but second says something must be done?
Or do I understand it wrong?
0 Kudos

440 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by GregDavies on Mon Aug 31 12:26:50 MST 2015
I checked the errata, but it was a mistake in the user manual, not the chip, and there was nothing to work around.
0 Kudos

440 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mysepp on Mon Aug 31 11:55:21 MST 2015
Have you seen (and added) the errata for EEPROM and LPC4357?
0 Kudos