Subtle problem with storing menu parameters in dsPIC EEPROM

Discuss about beta versions of mikroPascal compiler.
Post Reply
Author
Message
OT
Posts: 581
Joined: 19 May 2005 05:08
Location: Fairbanks, Alaska

Subtle problem with storing menu parameters in dsPIC EEPROM

#1 Post by OT » 06 Mar 2007 07:11

When I store and retrieve all parameters from the EEPROM with calls close to the root level of the code, everything works fine. However when I tried to store changes in the deeper loops of the program menus or with a procedure call from those loops, the EEPROM write appears to become unreliable. It was quite subtle, first time menu parameters are changed after programming or induced menu reset, everything might work, however on the next power-ups with new changes to the menu parameters, changes to certain parameters may be stored incorrectly or not stored at all.

I solved the problem by moving the call to EEPROM write out of the deeper loops by just setting a flag for changes, and later write all parameters, not just the one changed.

This problem is present in both version 4.03 and 5.00, dsPIC version with 30F4013, easydsPIC2 or hardwired prototype.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: Subtle problem with storing menu parameters in dsPIC EEP

#2 Post by zristic » 06 Mar 2007 08:56

It would be great if we could see the problematic code. The problem might be connected to the chip. We got some reports from users that 30F2010 has eeprom problems, but still it is not confirmed.

OT
Posts: 581
Joined: 19 May 2005 05:08
Location: Fairbanks, Alaska

#3 Post by OT » 06 Mar 2007 10:11

I sent you two folders with project files. Too large to post. This is continuance of the project you have seen some version of before.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#4 Post by zristic » 06 Mar 2007 10:45

Thanks. Will let you know of the results.

Post Reply

Return to “mikroPascal Beta testing”