Go Down

Topic: Due SPIFLASH - only one time writing on SPIFlash chip (Read 189 times) previous topic - next topic

empe

Hello,

I have a Due with 5" CTE 800x480 display with an flash chip on. Im using spiflash lib.
I can read bytes from a single page of storage chip - no problem. I can write bytes to a single page.  But this i can do only one time then it will not write any more without any message.

Any idea what is wrong?

the code for reading:

void DecodingPage()
  {
  byte line1;
  byte line2;
  myFlash.readPage(0x001); // Page 1
  myFlash.waitForReady();
  line1 = myFlash.buffer[0];
  line2 = myFlash.buffer[1];
......




for writing
......

  myFlash.buffer[0] = line1;
  myFlash.buffer[1] = line2;
  myFlash.writePage(0x001); // Page 1
  myFlash.waitForReady();

Go Up