Hello,
I have an application using MK22FX512AVLQ.
I've been using it for more than two years, but recently it started showing a weird behavior. So i checked it's memory.
The EEPROM sector where I save some parameters had some invalid values. Almost all, if not all of them had 0xFF.
I thought that maybe my device was getting powered off while erasing/writing into the EEPROM.
Unfortunately i can't share my code since it's from work, so here are some relevant info.
- We save three different things in the EEPROM.
One sector (4KB) starting at 0x43000 with parameters
Four sectors starting at 0x44000 with user logs
Forty-nine sectors starting at 0x49000 with device logs
- Only the sector with parameters gets erased/corrupted
- I've looked at the code each time EEPROM gets re-written and every thing seems ok.
- It happened three times between March and July of this year, but never happened before.
The problem showed first, on each time, after being powered off and then on next day. - In one case all sector starting at 0x43000 got erased except for addresses from x043044 to 0x43047
- In another case the addresses 0x43000 through 0x4304F, was left intact and the rest erased.
We are using some components that we bought 2021/2022 from a broker, when we couldn't find it anywhere else and it came in a pretty bad package (not sealed, no desiccant packs) only with an ESD plastic bag.
Since i have some data saved between beginning and ending of the sector on the first case, I'm not sure that the cause was powering of while erasing/writing new data to EEPROM.
Anyone has any idea of what could be doing this?
Thank you in advance