Main Site Documentation

Access SD card through USB



We have build an system in which we need to access the SD-card through the USB-port. This would be the USB-port we use to program the ChipworkX Dev. System. I this possible?

Kind Regards.


Yes, it is possible.

Look for USBC_MassStorage:



Thank you for you’re answer. But if I wanna use this, I need to change the debug interface. Can I change this to the ethernet connector? and how?


Look here:


Thank you Architect for helping Nick.
I would like to add that this is one of the exclusive features you get when using GHI (.NET FEZ) products.



I was not done yet. Thank you for you’re quick response! I still have a little problem. I have the following code:

public static void Main()
            //NI.EnableStaticIP("", "", "");

            if (Configuration.DebugInterface.GetCurrent() != Configuration.DebugInterface.Port.USB1)
                Configuration.DebugInterface.Set(Configuration.DebugInterface.Port.Sockets1, Configuration.DebugInterface.Port.USB1);

            USBC_MassStorage MS = USBClientController.StandardDevices.StartMassStorage();
            PersistentStorage PS = new PersistentStorage("SD");

            // Attach SD-Card to USB Mass Storage
            MS.AttachLun(0, PS, " ", " ");

            // Enable SD-Card for host PC

            // Mount the file system

            while (true)
                Debug.Print("Het werkt");


This code almost works. The compiler gives me an error when I want to mount the filesystem. Also when I reset my ChipworkX Dev. System it starts in Tinybooter mode, but I need the other mode.

Kind Regards.


You can’t have it mounted and enabled as mass storage at the same time.


OK… Thank you for the information


Are you getting an error or a run-time exception?

I suggest that you erase the flash and update the firmware.