Topic : ST7FLITE29 Variables in EEPROM don't seem to write.

Forum : ST7/STM8

Original Post
Post Information Post
June 24, 2015 - 11:18am
Derek Hutchison

My application works fine until I put the variable in EEprom, they then stop being adjustable.

E.G

unsigned char eeprom delivery =2;
unsigned char eeprom onhour =1;
unsigned char pumpstate,j,switches,hour,pumpon,TEMPDR,TEMPBDR,temp;

Delivery and onhour become fixed at their initial values. The command  ++delivery;

has no effect.

It all works fine if the variables are not placed in eeprom. 

This software works ok when compiled linked etc in Cosmic. I've looked at the old cosmic map file and found this:-

c_eewrc 0000e25f defined in (C:\COSMIC\CXST7\Lib\eeflite2.lib)eeprom.o section .text
used in main.o
c_eewrw 0000e241 defined in (C:\COSMIC\CXST7\Lib\eeflite2.lib)eeprom.o section .text

Does Raisonance have the equivalent routines?

(We stopped using Cosmic when they wouldn't support us moving the software to a new PC... they virtually accused us of pirating their software!!! We'd paid to upgrade from the demo version several years before.)

Any ideas?

Replies
Post Information Post
+1
0
-1
June 29, 2015 - 5:22pm
Etienne Cassin

Hello,

We managed to reproduce your issue.

Using the EEPROM requires a basic access protocol, the Data EEPROM memory read/write access
modes are controlled by the E2LAT bit of the EEPROM Control/Status register (EECSR). Thes steps have to be done manualy or using the ST microelectronic libraries which support the read and write on the EEPROM. These libraries are compatible for Cosmic or Raisonance compiler.

You can find them at http://www.st.com/web/catalog/mmc/FM141/SC1714/LN1290/PF77593?s_searchtype=partnumber#

Best regards

+1
0
-1
June 30, 2015 - 4:05pm
Derek Hutchison

Hi, thanks.I'll look at that.

I've tried a work around, but it doesn't seem reliable...

A simple woking example of how to implement a simple read and write from C would be helpful.

Ah, I think I have it working. Being a grumpy old man doesn't help!

Derek

+1
0
-1
July 2, 2015 - 2:35pm
Etienne Cassin

Dear Derek,

Examples are already provided in c:\Raisonance\Ride\example in the Reva part (test all). these examples are not for your device but can help to understand the way to read and write on the eeprom.

Did you read the ST7FLITE29 data sheet?

Best regards,