Author Topic: Best Inexpensive USB Hi-Speed Solution  (Read 1898 times)

0 Members and 1 Guest are viewing this topic.

Offline ezalys

  • Regular Contributor
  • *
  • Posts: 143
  • Country: us
Best Inexpensive USB Hi-Speed Solution
« on: December 10, 2018, 01:32:18 pm »
Hey all,

I'm looking for a simple and cheap way to have a USB hi-speed interface that can sustain 10 MB/s or so to an FPGA. Crucially, I need to be able to control the endpoints so it comes up under a specific device class... so these FTDI FIFO USB and UART USB ICs are not appropriate. The closest I've seen are the cypress FX2 chips but they're surprisingly expensive. There's also the XMOS ICs with built-in USB... which are pricey but can potentially subsume the FPGA I'd be interfacing to. Finally, some of the microchip/atmel SAM devices have USB 2 with on chip PHY. They seem pretty appealing. I could of course just stick a PHY on the board and make my FPGA speak ULPI but that sounds pretty time consuming. Any alternative chips/ideas?

E
 

Offline xaxaxa

  • Regular Contributor
  • *
  • Posts: 247
  • Country: ca
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #1 on: December 10, 2018, 02:45:25 pm »
USB3343 PHY with this usb serial core: http://jorisvr.nl/article/usb-serial
Use this ULPI to UTMI bridge: http://vr5.narod.ru/fpga/usb/index.html

This is what I used in several of my projects; sustained throughput of 35MByte/s half duplex is possible.
 
The following users thanked this post: ebclr

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 13756
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #2 on: December 10, 2018, 03:32:55 pm »
Most of the MCUs I've seen, have Full Speed PHY onboard, but not High Speed.  The HS core is integrated and the ULPI interface has to be connected to an external PHY.  YMMV, there's probably both available.

The desired bitrate would be adequate through MCU interfaces, though (maybe not QSPI, but a parallel port + DMA would seem like more than enough).  Kind of an odd solution pairing that with an FPGA, but sometimes that's the way, I guess.  It will run at least a few bucks extra -- not the cheapest solution in quantity.

The better way would be putting the ULPI controller inside the FPGA, which I'm sure is available, but yeah, probably harder to use.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline ezalys

  • Regular Contributor
  • *
  • Posts: 143
  • Country: us
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #3 on: December 10, 2018, 04:09:45 pm »
From xaxaxa's links it doesn't look like speaking ULPI is super super hard. Thanks!
 

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 120
  • Country: nz
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #4 on: December 10, 2018, 06:50:10 pm »
The STM32F730 series of chips has an inbuilt USB HS phy etc, and are quite cheap. They start at about $3@1k qty.

Just not 100% sure the best way to get the data into the chip. Maybe either qspi or the FMC (ram) interface?
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2279
  • Country: 00
    • My random blog.
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #5 on: December 10, 2018, 08:34:37 pm »
cypress FX2 chips but they're surprisingly expensive.

define expensive, I see them <$5 in 100 volume CY7C68013A
not to mention you can buy $5 whole FX2 dev boards
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 
The following users thanked this post: NiHaoMike

Offline TimCambridge

  • Regular Contributor
  • *
  • Posts: 69
  • Country: gb
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #6 on: December 10, 2018, 09:24:48 pm »
Worth a look: FTDI FT93x, around $4.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 3216
  • Country: fr
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #7 on: December 11, 2018, 02:36:52 pm »
Define inexpensive.

But you can take a look at the ATSAM3U. (Eg. https://www.microchip.com/wwwproducts/en/ATSAM3U2C )
 

Online PCB.Wiz

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: au
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #8 on: December 19, 2018, 12:41:38 am »
The closest I've seen are the cypress FX2 chips but they're surprisingly expensive.

As mentioned above aliexpress shows CY7C68013A modules for $3.70 (yes, less than Cypress suggested chip selling price!) , and chips from $1.85


I'm looking for a simple and cheap way to have a USB hi-speed interface that can sustain 10 MB/s or so to an FPGA.

Cheapest ready to go HS-USB part I know of, is the FT4222H, but that comes in just below your 10MB/s target.
Nuvoton have MCUs with HS-USB, like NUC505, and M48x series have HS-USB
http://www.nuvoton.com/hq/products/microcontrollers/arm-cortex-m4-mcus/?__locale=en

or, there are FTDI FT601/FT600 that can do both HS-USB and  USB 3.0 (5G), designed for FPGA/ASIC interface
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 9895
  • Country: gb
    • Having fun doing more, with less
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #9 on: December 19, 2018, 08:46:18 am »
There's also the XMOS ICs with built-in USB... which are pricey but can potentially subsume the FPGA I'd be interfacing to.

Without knowing your application and constraints, I would have thought that was a significant advantage.

You can download their IDE and verify that it could satisfy the timing constraints on the FPGA side of your application. The I/O port timings can easily be understood from their application notes, and they are very simple to configure in software.

The more interesting part is usually the "loop time", i.e. how frequently the software can feed the I/O. The IDE will specify that for you code without having to measure running code. It will, of course, presume that any I/O channel (i.e. port or comms to another core) is ready for I/O to occur. If another core isn't ready, then unsurprisingly it will stall the loop.

The certainty in the timings defined by the IDE should be compared and contrasted with the effects of an FPGA's place and route algorithms.

Be aware that
  • you may need more cores than you initially guess (but they have up to 32 on one chip and can "daisy chain" chips)
  • you will have to structure your software design to make use of the XMOS hardwarem just as you have to do with an FPGA
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline TimCambridge

  • Regular Contributor
  • *
  • Posts: 69
  • Country: gb
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #10 on: December 19, 2018, 02:01:44 pm »

Cheapest ready to go HS-USB part I know of, is the FT4222H, but that comes in just below your 10MB/s target.


FT4222H is capable and low cost but it has zero availability everywhere.
 

Offline xaxaxa

  • Regular Contributor
  • *
  • Posts: 247
  • Country: ca
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #11 on: December 19, 2018, 03:16:35 pm »
Example instantiation of usb-serial and ulpi bridge:
https://github.com/xaxaxa-dev/vna/blob/master/vhdl/ulpi_serial.vhd

The module "ulpi_serial" connects to the ULPI phy signals and exposes a FIFO interface.

USB3343 is $1.3 on mouser at qty 1.
 

Offline xaxaxa

  • Regular Contributor
  • *
  • Posts: 247
  • Country: ca
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #12 on: December 19, 2018, 03:27:41 pm »
On the software side the device shows up as a USB CDC device, meaning no special drivers are needed on linux/mac. Windows however ties drivers to USB ID, so I have spoofed VID/PID as 04b4:0008 (Cypress Semiconductor) to use it with this signed driver: http://www.cypress.com/documentation/software-and-drivers/usb-serial-software-development-kit
 

Online blueskull

  • Supporter
  • ****
  • Posts: 12339
  • Country: cn
  • Power Electronics Guy
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #13 on: December 20, 2018, 04:47:07 am »
Do you need to crunch data? If you need a lot of multiplications and accumulations, consider Analog Devices ADSP-BF70x family.
Built-in DSP library in ROM, built-in large L2 RAM, built-in L1 and scratchpad, and built-in HS-USB.
The IDE & compiler will set you back $1000, and they offer free 30-day trial license. You can hack the license generation server to let it to spit a 3 year license.

They don't provide free USB libraries, unless you pay $8000 on uC-OSiii. They do provide a HAL level driver for USB without documentation for free with their IDE.
I was able to crack the uC-OSiii installer and extract the code, reverse engineer how it talks to the HAL driver, and document the ADI USB HAL driver.
based on the API document, I wrote a simple USB stack for BF70x with the help of forum member Alex, a few books, and USB spec.

If you decide to use the chip, I can post the code on GitHub.
 

Offline AlexY

  • Newbie
  • Posts: 1
  • Country: ru
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #14 on: January 29, 2019, 09:41:31 am »
Hi, blueskull
I've read about your difficulties with USB stack on BF-707 in this topic https://www.eevblog.com/forum/microcontrollers/blackfin-usb-driver/ as I faced this module by myself.
One of goals of my master's degree project is to transmit audio and video data through USB of this DSP.
So can I ask you to share your code?
Thanks in advance!
 

Offline NANDBlog

  • Super Contributor
  • ***
  • Posts: 4445
  • Country: nl
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #15 on: January 29, 2019, 10:59:02 am »
Most of the MCUs I've seen, have Full Speed PHY onboard, but not High Speed.  The HS core is integrated and the ULPI interface has to be connected to an external PHY.  YMMV, there's probably both available.

The desired bitrate would be adequate through MCU interfaces, though (maybe not QSPI, but a parallel port + DMA would seem like more than enough).  Kind of an odd solution pairing that with an FPGA, but sometimes that's the way, I guess.  It will run at least a few bucks extra -- not the cheapest solution in quantity.

The better way would be putting the ULPI controller inside the FPGA, which I'm sure is available, but yeah, probably harder to use.

Tim
Yes, HS requires much higher switching speeds than typical microcontollers. The signalling rate is 480MHz, while the internals of a MCU run much slower. The microcontrollers have different process nodes, that are optimized for power and not high speeds.

To be honest, I would rather use an FTDI or a Cypress chip, if you put ULPI or UTMI interface, then you either need to handle USB relevant things in your FPGA. There are blocks for that, but probably not free and for sure much more complicated. With an FTDI, you have a simple parallel bus.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3216
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #16 on: January 29, 2019, 11:47:03 am »
The Cypress CY7C68013 has a USB 2.0 High Speed interface with built-in high speed PHY. Ditto Microchip ATSAM3X8E as used in Arduino Due.

If you have an FPGA already, how much logic does it takes to implement ULPI in the logic fabric? It might be better to use ULPI IP core and an external PHY instead. Some PHY even has crystal clock output, allowing you to clock the FPGA from a cheaper crystal resonator.
 

Online blueskull

  • Supporter
  • ****
  • Posts: 12339
  • Country: cn
  • Power Electronics Guy
Re: Best Inexpensive USB Hi-Speed Solution
« Reply #17 on: January 29, 2019, 06:12:05 pm »
So can I ask you to share your code?
Thanks in advance!

I didn't pursue too much. To this point, I only have a simple code that enumerates.

You're welcome to further expand it.

Please PM me with your email address so I can send it to you.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf