Zero and µSD act as mass storage device for computer


With the new IDE 1.6.6 release, there is the new PluggableUSB modules. I was wondering if there is already any works around a mass storage module that will let a Zero connected with a SD card act as a USB Stick plugged to a computer. So that user can drag and drop file on the Storage device, that will be then available through the Arduino program via the SD library.

Do you guys have any info?

Did you find an answer to your questions on this subject?

Yes I did manage to do this using the Atmel Software Framework and Atmel Studio. I haven't seen anything about the PluggableUSB module from the Arduino software team... Look at the Atmel AT07694 application note.

Cool, do you have any suggestions for someone that is trying to replicate what you've done? Were there existing libraries for the Atmel software or did you have to write everything from scratch?

Here is a quick explanation of the process :

  1. Download and install Atmel Studio
  2. Create a new project for SAM21G
  3. Add this source code : (skip the SAMD11 directory, you should already have one with the SAMD21
  4. Add SPI and sd_mmc component from ASF
  5. Configure SPI pins and SD card connection in conf_spi.h and conf_sd_mmc.h
  6. Use the EDBG port to load the program.

I'll try to post the Atmel Studio project here soon.

Great thanks!


Just noticed this post. I’m trying to do the same thing, but with the Arduino MkrZero. I was hoping that you might have some pointers or an example project/sketch of how you managed it? I’ve tried installing Atmel studio and adding the mass storage and SPI modules from the ASF wizard and as the MkrZero doesn’t have an inbuilt EBDG chip attempting to program the MkrZero using BOSSA. However, this doesn’t appear to work as the device doesn’t appear as mass storage device in my file explorer. Do you know of any Arduino libraries that would provide this functionality?

Unfortunately I haven't found a solution for devices without the EBDG chip. I've been stuck using the serial output from the M0 component which has proved to be pretty slow for data transmission.