EEPROM feature/hal branch

Hello,

I was just testing out the feature/hal branch with EEPROM writing/reading but it seems there is something wrong there… I always get the last written value back when I try to read out a specific address from the EEPROM. I tested my code on the master branch and it works perfectly… Any ideas?

#include "application.h"

SYSTEM_MODE(AUTOMATIC);

void setup()
{
    uint8_t val1 = 45;
    uint8_t val2 = 40;

    // Initiate serial communication
    Serial.begin(9600);

    while(!Serial.available())  // Wait here until the user presses ENTER
        SPARK_WLAN_Loop();        // in the Serial Terminal. Call the BG Tasks

    Serial.println("SETUP");
    Serial.println("EEPROM.read: ");
    Serial.println(EEPROM.read(0));
    Serial.println(EEPROM.read(10));

    Serial.println("EEPROM.write: ");

    EEPROM.write(0, val1);
    EEPROM.write(10, val2);
}

void loop()
{
    Serial.println("LOOP");
    Serial.println("EEPROM.read: ");
    Serial.println(EEPROM.read(0));
    Serial.println(EEPROM.read(10));
    delay(5000);
}

Hi @geert

Have you tried this on the develop branch? That is the where the latest untested code is being put together. @mdma is away right now on a well-deserved holiday, but I think that the feature/hal branch was a bridge to get from the old code to the new code and is no longer being developed against.

Nope didn’t try on develop branch since it’s not yet supported for core right? But I think I found a solution now since it looks like the flashee-eeprom library does work on feature/hal branch so I’ll use that to store my variables then…