Bit corruption on Flash memory on ATSAME70

Discussion in 'Embedded Systems and Microcontrollers' started by Toru Fujinami, Sep 26, 2016.

  1. Toru Fujinami

    Thread Starter New Member

    Sep 26, 2016
    I am using ATSAME70 evaluation board to test the flash memory.

    The program I am testing with is attached on this thread. Please review the program.
    For testing, I am trying to write a few 32bit integers to flash memory.
    I update the memory address every time, so the values are written one after another without space between them.

    A problem is some bits become corrupted after couple writes.
    The value even changes from 0 to 1 which should not happen on Flash memory.

    Has anyone had same/similar issue before?

    This is what I know so far...
    1) I confirmed with Atmel that the flash memory on ATSAME70 is NOR flash.
    2) This is not because of fast clock frequency I am using (150MHz).
    I reduce the system frequency to 60MHz external clock, but same bit corruption happened.
    I even tried 12MHz internal RC clock, results are the same.
    3) I tried with two more evaluation boards, the error is happening consistently. (same bits are getting corrupted).
    So it should not be issue with hardware... (or all three broken exactly the same way...)
    4) When I write 128bits together as datasheet suggested, I don't see bit corruption.
    I can continue using flash this way. But since I will store important information, I don't want to risk losing data...
    I might just being lucky with 128bits... Also, since it is NOR flash, I should not be limited like this, right?

    Thank you very much for your help!!