SPI SD card show up as USB disk = possible? (teensy 3.1)

Status
Not open for further replies.

zachtos

Well-known member
Has anyone heard of a bootloader or program that would allow the user to show an SPI connected microSD card to show up as a USB disk in Windows on Teensy 3.1?

Goal would be to drag and drop files in file explorer so user could add/remove files from SD card without removing card from device... If so, would it use up a ton of flash space or would it need to be setup as a bootloader instead?

Note, I would still want to be able to run other controller code, but be able to switch to USB disk mode at startup or on special command as needed.
 
Last edited:
Not yet available on Teensy 3.1 quite as easy as it is on 2.0; one or more of the items that made it possible on Teensy 2.0 has not been ported for 3.1 yet (best of my knowledge at least).

For quick-ish reference: Open Arduino and select Teensy 2.0; check out items on 'USB type:' menu item after selecting Teensy 2.0 - 'Disk (SD Card) + Keyboard' is the one (nearest, I think,) you wish you could see for 3.1 right now.

http://www.fourwalledcubicle.com/LUFA.php doesn't look like it has made it onto ARM either - I could easily be wrong tho, I didn't try as hard as you might to find signs of it.


As an upside: When the requirements are written/ported, I expect it won't take up that much program/flash space at all.
 
That is good news that it would not take a lot of flash space. At this point in time we are willing to hire someone to design the interface software if possible, and share with Teensy of course.
 
Maybe look at the code that already exists for Teensy 2.0? It's approx 2000 lines, but quite a bit is just the normal USB stuff common to all the USB device implementations.

The Teensy 2.0 code implements MSC protocol. The huge problem with MSC protocol is difficulty sharing files between the PC and Teensy. MSC works at the block level, and there's considerable caching on the PC side. If you look through the code, you'll discover undocumented functions that were meant to manage whether the PC or Teensy has access to the media. I'm pretty sure they're technically the correct SCSI sense codes. It probably won't surprise anyone that they work well with Linux and Macintosh, but Windows has trouble following the standard (or simply has buggy drivers).

Later this year I'm planning to try MTP protocol on Teensy 3.1 and Teensy LC. But that's still only at the planning stage so far. If you do dig into this and decide to start from a clean slate, rather than the old Teensy 2.0 code, MTP is the future!
 
Status
Not open for further replies.
Back
Top