I need to build a custom usb to usb bridge. At a high level it is like a one port hub with custom logic in the middle. So I need 2 usb ports, one host and one device, and a programable MCU. It needs to support Mass Storage Devices at USB 2.0 Hi-Speed (480 mbps). I am hoping to use vendor libraries for the Mass Storage Device specification. I have found plenty of MCU's that support USB host and device but only one at a time (one port with dedicated use as a host, or dedicated use as a device, or dynamically switching on one port as per USB On-The-Go). I have also found USB hub controllers that allow configuration but no programming. -Thanks
Need architecture for usb to usb bridge
Started by ●July 24, 2009
Reply by ●July 25, 20092009-07-25
On Jul 25, 4:23=A0am, "ubrida" <mjpar...@mail.com> wrote:> I need to build a custom usb to usb bridge. =A0At a high level it is like=a> one port hub with custom logic in the middle. =A0So I need 2 usb ports, o=ne> host and one device, and a programable MCU. =A0It needs to support Mass > Storage Devices at USB 2.0 Hi-Speed (480 mbps). =A0I am hoping to use ven=dor> libraries for the Mass Storage Device specification. > > I have found plenty of MCU's that support USB host and device but only on=e> at a time (one port with dedicated use as a host, or dedicated use as a > device, or dynamically switching on one port as per USB On-The-Go). =A0I =have> also found USB hub controllers that allow configuration but no > programming. > > -ThanksMeeting Hi-Speed would be difficult. But you can use a host MCU and bit-bang a device port, or use two MCUs. What are you going to do with the massive data? Buffering would be a problem, beyond simple search or replace operations.
Reply by ●July 25, 20092009-07-25
On Fri, 24 Jul 2009 15:23:03 -0500, ubrida wrote:> I need to build a custom usb to usb bridge. At a high level it is like > a one port hub with custom logic in the middle. So I need 2 usb ports, > one host and one device, and a programable MCU. It needs to support > Mass Storage Devices at USB 2.0 Hi-Speed (480 mbps). I am hoping to use > vendor libraries for the Mass Storage Device specification. > > I have found plenty of MCU's that support USB host and device but only > one at a time (one port with dedicated use as a host, or dedicated use > as a device, or dynamically switching on one port as per USB On-The-Go). > I have also found USB hub controllers that allow configuration but no > programming. > > -ThanksUse two processors and make them talk to each other. There's a bazzilion ways to do this. Four that I can suggest, in more or less rising order of speed, expense and difficulty, are: they can talk using asynchronous serial, synchronous serial, parallel port w/handshake, or dual-port memory. -- http://www.wescottdesign.com
Reply by ●July 25, 20092009-07-25
ubrida wrote:> I need to build a custom usb to usb bridge. At a high level it is like a > one port hub with custom logic in the middle. So I need 2 usb ports, one > host and one device, and a programable MCU. It needs to support Mass > Storage Devices at USB 2.0 Hi-Speed (480 mbps). I am hoping to use vendor > libraries for the Mass Storage Device specification. > > I have found plenty of MCU's that support USB host and device but only one > at a time (one port with dedicated use as a host, or dedicated use as a > device, or dynamically switching on one port as per USB On-The-Go).And if you look closely, I suspect you'll find that hardly any of those can handle a 480 Mbps link, much less 2 ports running at that kind of speed. A CPU needs to be mighty fast to do anything meaningful on 60 MBytes of data per second. You're looking at a job for a several-hundred-MHz bulldozer of a CPU.
Reply by ●July 25, 20092009-07-25
Hans-Bernhard Br�ker schreef:> ubrida wrote: >> I need to build a custom usb to usb bridge. At a high level it is like a >> one port hub with custom logic in the middle. So I need 2 usb ports, one >> host and one device, and a programable MCU. It needs to support Mass >> Storage Devices at USB 2.0 Hi-Speed (480 mbps). I am hoping to use >> vendor >> libraries for the Mass Storage Device specification. >> >> I have found plenty of MCU's that support USB host and device but only >> one >> at a time (one port with dedicated use as a host, or dedicated use as a >> device, or dynamically switching on one port as per USB On-The-Go). > > And if you look closely, I suspect you'll find that hardly any of those > can handle a 480 Mbps link, much less 2 ports running at that kind of > speed. A CPU needs to be mighty fast to do anything meaningful on 60 > MBytes of data per second. You're looking at a job for a > several-hundred-MHz bulldozer of a CPU.OTOH there are not that many USB peripherals that actually use the maximum available USB 2.0 bandwidth (which is effectively quite a bit lower than 60 MBytes per second due to the way USB works). That being said you do need fairly powerful hardware for this project to be able to do anything useful without slowing down things too much.
Reply by ●July 25, 20092009-07-25
Dombo wrote:> Hans-Bernhard Br�ker schreef: >> ubrida wrote: >>> host and one device, and a programable MCU. It needs to support Mass >>> Storage Devices at USB 2.0 Hi-Speed (480 mbps). I am hoping to use>> And if you look closely, I suspect you'll find that hardly any of >> those can handle a 480 Mbps link, much less 2 ports running at that >> kind of speed. A CPU needs to be mighty fast to do anything >> meaningful on 60 MBytes of data per second. You're looking at a job >> for a several-hundred-MHz bulldozer of a CPU.> OTOH there are not that many USB peripherals that actually use the > maximum available USB 2.0 bandwidthHe does have his sights set exactly on the one class of USB devices that rather routinely does, though: mass storage devices. USB memory sticks often don't reach that ceiling, granted. But external USB harddrives will.> (which is effectively quite a bit lower than 60 MBytes per second due > to the way USB works).Net average bandwith is indeed lower. But his device will have to cope with peak bandwidth, and still have to be able to manage the SW side of the USB protocol, too. What's gained by having a USB controller core taking care of much of the low-level stuff, will be compensated by the CPU having to deal with all the high-level protocol overhead of USB. In a nutshell: host-side USB is _hard_; and hi-speed twin USB considerably more so. You're expected to have a full-blown PC or something rather much like it for that kind of stunt.
Reply by ●July 25, 20092009-07-25
On Jul 24, 4:23 pm, "ubrida" <mjpar...@mail.com> wrote:> I need to build a custom usb to usb bridge. At a high level it is like a > one port hub with custom logic in the middle. So I need 2 usb ports, one > host and one device, and a programable MCU. It needs to support Mass > Storage Devices at USB 2.0 Hi-Speed (480 mbps). I am hoping to use vendor > libraries for the Mass Storage Device specification.I think you might be able to accomplish something with one of the TI OMAP chips having both host and device interfaces. As others have pointed out its going to be very hard to do much processing at full USB bandwidth, but you might find you could go fast enough for your application. I'm not sure if it's possible to use both USB ports at the same time on the Beagle Board OMAP evaluation board - they had some problems on some versions with one of the USB ports and I think in some cases they just removed it.
Reply by ●July 25, 20092009-07-25
In article <h4fd5u$3i4$02$1@news.t-online.com>, HBBroeker@t-online.de=20 says...> Dombo wrote: > > Hans-Bernhard Br=F6ker schreef: > >> ubrida wrote: > >>> host and one device, and a programable MCU. It needs to support Mass > >>> Storage Devices at USB 2.0 Hi-Speed (480 mbps). I am hoping to use==20 I cannot see why you would need a bridge device (host and slave/device)=20 for mass storage device. If the problem is file formats then write a driver for your file format=20 or even a special mass storage device driver that translates the data. =20> >> And if you look closely, I suspect you'll find that hardly any of=20 > >> those can handle a 480 Mbps link, much less 2 ports running at that=20 > >> kind of speed. A CPU needs to be mighty fast to do anything=20 > >> meaningful on 60 MBytes of data per second. You're looking at a job==20> >> for a several-hundred-MHz bulldozer of a CPU. >=20 > > OTOH there are not that many USB peripherals that actually use the=20 > > maximum available USB 2.0 bandwidth=20 >=20 > He does have his sights set exactly on the one class of USB devices that==20> rather routinely does, though: mass storage devices. USB memory sticks==20> often don't reach that ceiling, granted. But external USB harddrives wil=l.>=20 > > (which is effectively quite a bit lower than 60 MBytes per second due > > to the way USB works). >=20 > Net average bandwith is indeed lower. But his device will have to cope==20> with peak bandwidth, and still have to be able to manage the SW side of==20> the USB protocol, too. What's gained by having a USB controller core=20 > taking care of much of the low-level stuff, will be compensated by the=20 > CPU having to deal with all the high-level protocol overhead of USB. >=20 > In a nutshell: host-side USB is _hard_; and hi-speed twin USB=20 > considerably more so. You're expected to have a full-blown PC or=20 > something rather much like it for that kind of stunt.For his application that has been loosely described as a bridge=20 Storage ---> Bridge ---> host Why not plug the device straight into the host? That needs to be understood first. --=20 Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate
Reply by ●July 25, 20092009-07-25
On Jul 25, 1:47 pm, Paul Carpenter <p...@pcserviceselectronics.co.uk> wrote:> I cannot see why you would need a bridge device (host and slave/device) > for mass storage device.I'm betting he wants to do something like real time virus scanning, or whole disk encryption, and to do it in a bridge device because he doesn't trust or isn't allowed to modify the host PC operating system.
Reply by ●July 26, 20092009-07-26
Thanks for all the input. To clarify a few points discussed, I will provide some more detail. Logic The logic is very simple filtering. The minimum requirement is write blocking (making a device act as if it is read only). Beyond this, more fine grained filtering is desirable. Filtering accurately describes all of the current goals. However follow on projects could explore other functions. Why needed The previous post has it correct. The PC cannot be trusted. Speed Requirement As already mentioned, using mass storage means the bandwidth requirement is not a gross overstatement. The minimum requirement is to support high end USB flash drives. It is a goal to support external USB hard drives. I termed the requirement at hi-speed because USB full-speed is not adequate. I would say that 240 mbps meets the minimum requirement. However, my guess is that if I can reach that lofty speed on hi-speed rated hardware, then I can probably achieve a bandwidth close to the experienced rates on directly connected external USB hard drives.