3

Is it possible to connect the nine pins from a USB 3.0 memory drive to the corresponding GPIO pins of the arduino (intel Galileo is what I am using, but it is very similar) and access the drive's memory through the implementation of the USB's protocol? I have searched around and have not been able to get a clear idea on how to do this or if it is even possible.

justkash
  • 131
  • 1
  • 3

1 Answers1

1

Since this is going to be a long post, I'll post the summary above the fold to save some of you the effort of scrolling...

tl;dr: No, it's not possible to do so with GPIO pins. There is another way to do this, but IDK if the rest of the Galileo will be a bottleneck (and it's pretty pricey). The stereotypical AVR Arduino is simply too underpowered (both from a MCU and amperage standpoint) to host USB 3.0. You need a shield to host USB 2.0, and even with that, I doubt that you can use 2.0 at it's full potential.


Basic corrections/things to note (before I begin):

  • Note: I'm no expert on the Galileo, I'm just doing this all from what I remember from what I've read in the past. If you spot an error, feel free to post a comment with a little explanation and I'll fix my post. However, I doubt that there will be any major errors, and the overall content (i.e. the tl;dr) should be fine.
  • These figures are maximum that I'm posting:

    • Speed: if speed is near maximums, or even 10%, what's the point of 3.0?
    • Power: you never know with this one, so account for it being near limits, unless externally powered. Still, don't risk it.
  • If it's a USB thumb drive, you're going to either get a breakout board for 3.0 and/or break open your device and solder wires onto it. Note that there doesn't seem to be a USB 3.0 breakout board (from a very quick search on Google). I'm also concerned that the wires you would use might not be high enough grade for extreme data transmission.

  • Only 7 of the 9 lines are used for data. The other two are 5V and GND.
  • On a Galileo, you'll have to use the 5V selection for the IO pins.
  • On a Galileo, there's a Mini-PCIe port (although I can't seem to find it in the photos myself). You could add a Mini PCIe to USB 3.0 card. However, that will cost you almost $50 to do so, and by that time it might be better just to seek out another solution.

    Photo of it:

    • Ask yourself do I really need the speed?
      • No: don't waste the money and the headache.
      • Yes: consider either another platform or buying this product.
    • Keep in mind that, although it fits, it probably won't be able to get enough power for true USB 3.0 that your disk needs and drivers will be rare. You for sure will want to research this more before shelling out the cash to buy this card.
      • Galileo doesn't run a full OS, so I'm highly doubtful that there's drivers.
  • Like I mentioned before, I'm not quite sure about the Galileo supplying enough power... again you need to check into this and maybe add an external voltage regulator (if all the other issues are resolved). USB 3.0 can provide up to 2x the power per port of 2.0, so when I say almost an amp, it's technically almost two amps (although I think at this point you'll just have to remember not to use the second port and call it one amp).

Technical problems:

I stated this before in the post:

The stereotypical AVR Arduino is simply too underpowered to host USB 3.0. You need a shield to host USB 2.0, and even with that, I doubt that you can use 2.0 at it's full potential.

The Galileo has native 2.0 support, so I'd recommend just getting a fast USB drive and using that.

Anyway, think about it: the Galileo can handle roughly 400,000 instructions per second. USB 3.0 can send up to 5,000,000 bits in the same amount of time! Like mentioned before, it is the maximums, but still. AFAIK on the AVR boards it it takes multiple instructions to read one GPIO pin (for some reason I want to say 3, but that seems too low). I'd imagine that it'd be the same situation on the Galileo. I'm not quite sure about the instructions it takes to read a pin, correct me if I'm wrong anyone. Anyway, assume it takes four instructions per pin, and your device only sends 1 Gbps. That's still 1,000,000 times that a pin needs to be read when you can only read 100,000 in that time. Even so, you can't even use the data, nor can you implement a loop or other code that combines bytes to read the data in the first place! Plus, you wouldn't have enough RAM!

I'm not a USB expert, but IIRC it only asks the device for data as needed, but still, that'd be pointless to create your code for this and spend the extra money for 3.0 cables and devices. This paragraph is all from memory, I don't really know; don't cite this paragraph.

Also, you'd have to implement your own code for sending data to/from the device. No such code exists without hardware for 2.0, let alone 3.0.


Conclusion:

It's near impossible to do so, and you'd need a lot of extra parts and have to read up on the USB 3.0 specs. I think it would take a great engineer 50+ years to accomplish this without developing an IC (which would cost money). Do you really need the speed? If not, you can buy USB 2.0 host shields and communicate via SPI. That isn't very fast, but still, it's possible.


Sources:

Info and photos are scattered on the following sources:

Anonymous Penguin
  • 6,365
  • 10
  • 34
  • 62