Forum Discussion

MMinu3's avatar
MMinu3
Icon for New Contributor rankNew Contributor
5 years ago

Problem erasing EPCQ flash memory on INTEL Cyclone evaluation board with Generic Serial Flash Interface Intel running on NIOS II

As mentioned above, I'm not able to erase Flash Memory (neither sectors, sub-sectors, or bulk) using the Generic Serial Flash Interface Intel running on NIOS II: only with "Quartus programmer" I can.

In the attached image you can see the waveforms on memory pins (clock, data in and CS): nothing changes if the first interval of "Status read" is stretched up to several milliseconds.

Sometimes, the memory locations seems to be "partially erased" (meaning that the content changes, but not to 0xFF), sometime the content doesn't change...

What do you suggest me?

Thanks in advance for your support.

Maurizio

29 Replies

  • MMinu3's avatar
    MMinu3
    Icon for New Contributor rankNew Contributor

    Hi,

    the only way I know to unprotect the whole memory is clear the flags "TP", "BP2", "BP1", "BP0" into the status register and I do that as soon the program starts: are there others way to unprotect the whole memory space?

    BTW: I've already tested your last suggestion and, unfortunately, both "sector" and "bulk" operations fails,

    Thanks again, Regards

    Maurizio

  • MMinu3's avatar
    MMinu3
    Icon for New Contributor rankNew Contributor

    Hi,

    I already read the status register before "erase" operation to be sure that "WEL" bit is settled to "1", so I'm sure that all others flag are cleared.

    Do I check something different?

    MM

  • JohnT_Altera's avatar
    JohnT_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi,

    What are you observing when you performed read status register? May I know if you have another board to test it out?

  • MMinu3's avatar
    MMinu3
    Icon for New Contributor rankNew Contributor

    Hi, if you take a look to the attached images, you can see that the erase operation take about 160ms and the Status values is always 0x03, except the last one whose value is "0"... as expected.

    MM

  • JohnT_Altera's avatar
    JohnT_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi MM,

    From my understanding, after 160ms, you are observing the Status values is 0x0. So if you performed a read, what will happen? It should be 0xff right?

  • MMinu3's avatar
    MMinu3
    Icon for New Contributor rankNew Contributor

    Hi John,

    unfortunately when I read data after "sector Erase" completes, I don't find 0xFF, but the values I've stored before (0x7D).

    So, now, I have a new question: If I want erase the sector starting at address "0x1F0000" in the memory array organization (as explained in "EPCQ-A Serial Configuration Device Datasheet") which address do I need specify in "erase sector" command? Is "0x1F0000" correct?

    Moreover, if you look in to the attached picture (related to an "Erase Bulk" operation, you can see that that flag WIP is cleared at the first Status read (so the operation is considered completed at the first check).

    I hope this can help you to better understand where I'm wrong.

    Thank you

    Maurizio

  • MMinu3's avatar
    MMinu3
    Icon for New Contributor rankNew Contributor

    Hi,

    I tried on 2 different boards but nothing change

    Maurizio