cancel
Showing results for 
Search instead for 
Did you mean: 

In M24512 EEPROM When Writing some of bytes value, we get it Corrupted

AYeva.1
Associate

Hello,

We are using M24512 EEPROM in our water meter pulse counting device.

Our device is battery operated pulse counter from a mechanical meter using a reed switch.

Pulse Count Saving mechanism:When reed switch trigger by mechanical meter, our ultra low power MCU wake's up due to interrupt, and check debouncing. After successful debouncing, it increments pulse counter variable and store in EEPROM using Page write method. and Then device reads EEPROM stored data, against Pulse counter Variable and verify it. if stored data and pulse counter variable data didn't match, we set a "EEPROM_ERROR" flag in our data.

But, in 3 out of 60 devices, We get "EEPROM_ERROR", this error means EEPROM is working , we can read and write to it, but when writing, some of bytes value, get changed(corrupted). There are no chances of power fluctuation in device as it is battery operated and at the time of issue "EEPROM_ERROR", battery is full.

Our device works on 3.3V. We use 4.7K Pullup(3.3v) on SDA, SCL and write protect pin, and use 2* Dry cell(1.6V) in Series so we get 3.2V. At the time of test all devices have same environment condition and full battery, and device is tested with 25000 pulses.  

Our application needs to save highly critical data, pulse counter, frequently, and data corruption is highly critical issue for us.

We require your support to solve the issue, that, no data get corrupted, and as soon as possible.

Thank You

2 REPLIES 2
Pierre P.
Senior III

Hello,

M24512 is a robust eeprom , qualified for 4millions cycles endurance per word of 4 bytes.

25000 pulses is a very low number that could explain the "EEPROM_ERROR" message.

Please check the memory content versus expected and determine if it's a read error ( content inside eeprom is correct but the read command failed) or if it's really a bad content inside the memory.

BR

Pierre P.

S.Ma
Principal

Check supply voltage rail during programming. When you increment the eeprom value, do you use the mcu ram reference variable or do you reload from eeprom every increment?

Is your I2C ptotocol clean? How do you detect the end of eeprom write period?