EEPROM read/write errors on dsPIC
You have looked at a lot of possible hardware issues.  That's fine, but this is most likely a firmware bug.

Unfortunately, your source code is poorly documented and is formatted to be difficult to follow visually.  Your first file contains declaration of external routines at the top:


void readEEByte(unsigned int, unsigned int, void*);
void eraseEEWord(unsigned int, unsigned int);
void writeEEWord(unsigned int, unsigned int, void*);


Not only is it a bad idea to put declarations like this private in client modules, there is not a single comment in sight!  We can only guess what you intend these routines to do from their name, and the call arguments are completely undocumented.  Further in that file you have various lines starting with "//" and a whole line of equal signs.  These add visual clutter making it too much trouble to try to follow the code.

You may say that none of this matters for the operation of the code.  However, bad programming practises like this do matter, a lot.  They cause code to be written poorly and make it hard to spot bugs or even what the code is supposed to do.  All this results in lurking hard to find problems, as you are discovering.  You even said yourself you have occasionally seen glitches from this code since 2007.  That should have been a strong clue of a bug, possibly even of bad overall design.

Fix the mess, properly document all interfaces, and put common declarations into include files that you write once, then reference when needed.  Also your statement of I have no build warnings that seem relevant is a huge red flag.  Again, fix the mess.  When debugging, always go after the easily reproducable and fixable problems first.  Sometimes those are actually the cause of the tough problems, or sometimes in fixing them you discover the cause of other problems.  The compiler is warning you of sloppiness on a silver platter.  What more do you want?  You shouldn't have unused variables because they cause confusion to anyone trying to make sense of your code, and there is no excuse at all for missing new lines.  Again, fix them obvious mess, especially before asking anyone else to look at your code.

Neatness and attention to detail matter.  A lot.

&nbsp;