GR-Kaede EEPROM read write issue

is anyone tried to write or read from Gr-Kaede EEPROM, i am facing some problem in that, please suggest..

I am writing single byte and reading back, code work fine just after dump, now if i disconnect and connect board code is not working as intended,

it stucked somewhere in EEPROM.write() routine. Please find the code and output log below -


Sketch/Code :

#include <Arduino.h>
#include "HardwareSerial.h"
#include "EEPROM.h"

void setup()
{
         unsigned char WriteByte=25,ReadByte=0;

         pinMode(PIN_LED0,OUTPUT);
         
         Serial.begin(9600);
        delay(1000);

         Serial.println("Writing...");
         EEPROM.write(0,WriteByte);
         delay(500);

         Serial.print("you wrote : ");
         Serial.println(WriteByte);

         Serial.println("Reading...");
         ReadByte = EEPROM.read(0);
         delay(500);

         Serial.print("you read :");
         Serial.println(ReadByte);

        digitalWrite(PIN_LED0, 1);
}

void loop()
{
    //do nothing
}

Output/Log :

a.)Just after code dump in the board -

Writing...
you wrote : 25
Reading...
you read :25

b.) After disconnect and reconnect board (Power off-on) :

Writing...

  • waiting for reply.... !!!

  • In reply to Pratyush:

    I'm so sorry. The issue also occur on our side. I will investigate by this week.

  • In reply to Okamiya Yuuki:

    Hi, sorry to reply delay.

    You can avoid this issue by adding interrupts() after EEPROM.write as below. I don't understand the cause. I'm investing now..

    #include <Arduino.h>

    #include "EEPROM.h"

    void setup()

    {

       unsigned char WriteByte = 25, ReadByte = 0;

       pinMode(PIN_LED0, OUTPUT);

       Serial.begin(9600);

       delay(1000);

       Serial.println("Writing...");

       EEPROM.write(0, WriteByte);

       interrupts();// added

       delay(500);

       Serial.print("you wrote : ");

       Serial.println(WriteByte);

       Serial.println("Reading...");

       ReadByte = EEPROM.read(0);

       delay(500);

       Serial.print("you read :");

       Serial.println(ReadByte);

       digitalWrite(PIN_LED0, 1);

    }

    void loop()

    {

       //do nothing

    }

  • In reply to Okamiya Yuuki:

    hello Okamiya Yuuki, thanks for your reply.

    I tried with above solution but still facing the same problem.

  • In reply to Pratyush:

    I'm sorry delay, still under investigation.

    I found where the error occur in library, but did not find why so.

  • In reply to Okamiya Yuuki:

    I have solved it, sorry to delay.

    I will update library version to V1.16 by tomorrow.

  • Thanks for your support.