"EEPROM" on f103cb/c8 rogers core, how to?

Post here all questions related to LibMaple core if you can't find a relevant section!
Marian
Posts: 4
Joined: Tue Jan 04, 2022 4:10 pm

Re: "EEPROM" on f103cb/c8 rogers core, how to?

Post by Marian »

Hello
I read it here first...
https://randomnerdtutorials.com/arduino ... led-state/
I wrote like that... #include <EEPROM.h>

int a = 0;
int value;

void setup() {
}
void loop() {
value = EEPROM.read(a); //citire eeprom
Serial.print(a);
Serial.print("\t");
Serial.print(value);
Serial.println();
a = a + 1;
if (a == 200)//512
a = 0;
delay(500);
}

================================================
and read 65535 in each location...

After that I tried to write in eeprom ... with the code .. #include <EEPROM.h>

int a = 0;//locatie start citire eeprom
int value;
void setup() {
}

void loop() {
EEPROM.write(0, 0);
EEPROM.write(1, 1);

value = EEPROM.read(a); //citire eeprom
Serial.print(a);
Serial.print("\t");
Serial.print(value);
Serial.println();
a = a + 1;
if (a == 10)//512
a = 0;
delay(500);

}
===================================================
Result..
0 0
1 1

After that I changed the GPS code and everything is OK ...
Thank you again..
Marian
Posts: 4
Joined: Tue Jan 04, 2022 4:10 pm

Re: "EEPROM" on f103cb/c8 rogers core, how to?

Post by Marian »

Hello.
After a long time I come back with a problem.
I noticed that after several saves in the same or different location, no more data can be saved, when I read the eeprom all the addresses are... 65535. I can no longer save until ... Full chip erase.. . in the STM32Cube programmer, after that you can save data again... Something can be done so that I don't have to keep deleting it!!!
Post Reply

Return to “General discussion”