Corrupting Nand

     // Remove Previous File
     if (System.IO.File.Exists(messagesDir + FormatName + ".msg"))
           System.IO.File.Delete(messagesDir + FormatName + ".msg");
        catch { return false; };

     // Create the File
        StreamWriter tw = new StreamWriter(messagesDir + FormatName + ".msg"); // Nand is corrupted
        tw.WriteLine();    // Never executed
     catch { return false; }; // IOError is caught

     return true;


The Corruption manifests itself in a few different ways
Files in some of our data folders are missing
damage to Boot Sector of the NAND
occasionally we loose the entire FlashDisk

  • Does corruption happen when you are not running anything on M Core?

  • Could you create minimal but compilable program exhibiting this issue and share full src and binary?

if we do not load the .Elf for the M Core all seams good
We will create the minimal Program and test again

Hmm it’s interesting. Could you share (privately if you wish) your M4 source code?