I am using the below code to mount an SD card on startup.
Code Language: C#
while (!PersistentStorage.DetectSDCard()) System.Threading.Thread.Sleep(50);
ps = new PersistentStorage(“SD”);
The issue I have is that, the line ps.MountFileSystem() will hang until i pause and then resume the visual studio debugger. once i do this the SD card mounts and works fine.
My sequence of events:
run debug from visual studio.
open up a terminal program and connect to the serial port (through usbcdc with debugger)
when no response comes from the FEZ, i swap back to the debugger and press pause
This pauses the solution on ps.MountFileSystem();
If i then click resume
the sd card mounts, and program execution proceeds
the serial port command previously written runs as expected.
There is no breakpoints set until after this point.
What am I doing wrong?