GHIElectronics.NETMF.IO.dll 'System.Exception'

the Capacitors are only there to filter the large power consumption that some cards seem to cause - so this won’t negatively affect any other cards, and should only positively affect this one.

Unfortunately i didn’t have a 10uF capacitor so i added 47uF in paralle with C10. The result is slightly different from previous:

As you can see the program received a different exception and managed to read the root dir. If however i insert this card with any files on it, i get the same exception in PersistentStorage class ctr as before. I’m no hardware guy so any help would be appriciated

See this:
http://www.tinyclr.com/forum/1/2799/

Ok this would explain the exception when the SD card is empty. That exception as you wrote is harmless but it’s good to know why it occurs. I modified the code to avoid the exception:


            RemovableMedia.Insert += (s, e) =>
            {
                if (e.Volume.IsFormatted)
                {
                    Debug.Print(e.Volume.RootDirectory);

                    foreach (var dir in Directory.GetDirectories(e.Volume.RootDirectory))
                    {
                        Debug.Print(dir + "\\");
                    }

                    foreach (var file in Directory.GetFiles(e.Volume.RootDirectory))
                    {
                        Debug.Print(file);
                    }
                }
                else
                {
                    Debug.Print("SD card not formatted");
                }
            };

            Debug.Print("Please insert SD card...");

            while (!PersistentStorage.DetectSDCard())
                Thread.Sleep(1000);

            Debug.Print("SD card detected");

            using (var sd = new PersistentStorage("SD"))
            {
                sd.MountFileSystem();
                Thread.Sleep(Timeout.Infinite);   
            }

Unfortunately the first exception that is being thrown in PersistentStorage ctor still occurs. The SD card inserted needs to have at least one file on it however !!!

I have the same result when running this code on Cobra. If the card is empty i get the exception also but I assume this is because i didn’t add any extra capacitor as i did with Domino.