Expose the NAND memory as a mass storage device in Windows


I’ve done it in the past, but I have totally forgotten how.
I want to see the nand drive of the chipworkx as a drive in windows explorer,
so that I can copy new files more quickly while testing, now I keep switching the SD card.

Always check here Support – GHI Electronics

Or more precisely (from the beginner e-book, which I suggest you have with you in printed form all the time :))

[quote]28.7 Mass Storage
One of the great GHI unique features of USB client is supporting Mass Storage Class (MSC). This feature allows access to the connected media right
from USB. Let me explain this through some example. A data logger application needs to save data to an SD card or USB memory. When the user is
done collecting data, they can plug the USB data logger to the PC and now the PC can detect the device as a mass storage device. The user can then
transfer the files using standard operating system. Think of the device as a memory card reader. We can even enhance our logger where the USB client
interface can be CDC to configure the device and later dynamically switch to MSC to transfer files.
Once very common question on GHI support is ?Why can’t I access the media while the media is also accessed externally (from windows)??. I will try to
explain this better. A media is accessed though a class called PersistentStorage. The PersistentStorage object can then be accessed by the internal file
system or externally through the USB MSC. Okay, but why not both? It can’t be both because files systems cash a lot of info about the media to speed
up file access time. Accessing the media simultaneously will definitely cause corruption to the media and therefor, simultaneous access is not allowed.
Note that you can easily switch back and forth between internal file system and USB MSC.
This example code assumes an SD card is always plugged in. It enables MSC showing the device (I am using FEZ Domino) as a card reader.[/quote]

using System;
using System.IO;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.USBClient;
using GHIElectronics.NETMF.IO;
using GHIElectronics.NETMF.Hardware;
namespace USBClient_Example
public class Program
public static void Main()
// Check debug interface
if (Configuration.DebugInterface.GetCurrent() ==
throw new InvalidOperationException("Current debug interface is
USB. It must be changed to something else before proceeding.
Refer to your platform user manual to change the debug
// Start MS
USBC_MassStorage ms =
// Assume SD card is connected
PersistentStorage sd;
sd = new PersistentStorage("SD");
throw new Exception("SD card not detected");
ms.AttachLun(0, sd, " ", " ");
// enable host access

Lol… I know… I know…
And yes I have read that, but I’m doing so many complex things,
I forget about the simple things sometimes…

This was indeed more of a quick question for the chat… but there is hardly anyone on there at any given time… so I quickly fired away the question here :slight_smile:

I was like… “ok let me quickly ask on the forum and continue with other stuff while I wait”… my mistake :stuck_out_tongue:

I’m almost always there buddy…but you are right, would also love to see more people there.