There is an example project here that may be of help -
' Thanks, I'll look into it.
At first glance, the code is pretty much the same pattern, unless making local variables does something special for the code.
Also in Creator SP2 just released there is this update/fix -
Just installed SP2 today and tested on it. Even when running full speed without debugging, it fails.
I did not have problems with the em_eeprom component yet. Will you mind to post your complete project (or a reduced example) that shows the error? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file. So we all here can look at all of your settings.
We had that issue before, it is a compiler flaw, your eeprom is written correctly, but the assing of the eeprom-data to your ram data fails. The compiler "knows" that your variable "settings" is a constant and has kept the values in "mind". When you now issue a
ramSettings = settings; // copy into ram
the compiler takes the values and fills ramSettings with those.
Use a memcpy() to shuffle the informations from eeprom to ram as in my attached project.
thanks! I'll give that a try. It will take a day or two, other things are commanding attention at the moment.
this is a question for Bob Marlowe about his nice example PrototypeKit4.cywrk.Archive01.zip
Why do you use the instruction memset between these to Ram2EEProm and EEProm2Ram lines?
Thank you for your answer.
Welcome in the forum, Denis!
This was done just to verify when using the debugger that EEProm2Ram() filled the sram with new data.