Ok, I give up trying to figure out why this is inconsistent, now I’m just not sure. Anyone see / hear of this mess before?
Volume Count: 1
A first chance exception of type 'System.NotSupportedException' occurred in Microsoft.SPOT.IO.dll
A first chance exception of type 'System.NotSupportedException' occurred in System.IO.dll
An unhandled exception of type 'System.NotSupportedException' occurred in System.IO.dll
public class Program
public static void Main()
VolumeInfo info = VolumeInfo.GetVolumes();
Debug.Print("Volume Count: " + info.Length);
for (int i = 0; i < info.Length; i++)
string files = Directory.GetFiles(info.RootDirectory);
foreach (string str in files)
byte data = File.ReadAllBytes(@ "\SD\readme.txt");
it took me while to find this information, since standard MF info is included as part of a Gadgeteer tutorial. Might be worthwhile to include pointer to this document in standard MF tutorial listings. Dat?
Thank you, but I’m not entirely sure how this helps me. I’ve read that page thoroughly.
I am using the Cerb40 OSHW board and do not have access to the premium libraries, also I don’t understand what I am doing differently than that example in the context of OSHW. Additionally I am not using (and would greatly prefer not to use) the Gadgeteer libraries.
Any information debugging help here would be useful. I’ve read all the threads about adding capacitors to the card, lowering clock rate, trying different brand / low capacity cards, so on… I have no idea how to continue debugging this
Apologies, I did also try putting a Sleep immediately after the MountSD command, before using GetVolumes. This did not help.
Gadgeteer methods also fail as “Failed to mount, is this FAT32?” hoohah
Err I guess I should’ve left a bit more detail on the hardware configuration.
I have 2 GHI Cerb40 II’s.
I also have 2 SanDisk microSD to SD Adapters
I soldered wires to each of the adapters, one with
One Cerb40 has .1" header pins
I attached the adapter using equal ~3" long wires and crimps with power coming directly from the 3.3V pin.
This one works and mounts correctly maybe 70% of the time.
The other Cerb40 is soldered directly to an adapter using 2" long data leads (D0-3, CLK, CMD) and ~7" total length for 3.3V and GND (was routing power through a distrib board so left them long for organizational purposes later).
This configuration never mounts. I’ve taken a volt meter to it, nothing seems off. I tested the adapter with an SD reader prior to soldering to it and it works fine, all contacts are good.
I’m baffled as to why A) the first configuration works most of the time and B) the second doesn’t work at all.
I think that it is important to use very short cables.
I remember that I had Problems with a large SD-Card Module. After I soldered a 6.8 uF Tantal capacitor between GND and VCC directly on the SD-Card module it worked reliable.
I’m not sure what you mean with your ambiguous comments. Are you going to make a fool out of me? If you think that my observations or comments are not reasonable, please tell me in a unmistakable way.
@ Dat @ taylorza @ Brett @ MitchT @ Gus
Hi, thank you all for clearing this up. It seems that I became a victim of my own paranoia and my incompetence in the nuances of the english language. :-[ For me it’s always better to ask than to remain in doubt.