Group buy: SMSC USB3318 ULPI PHY

Non-technical related questions should go here.
kster59
XCore Addict
Posts: 162
Joined: Thu Dec 31, 2009 8:51 am

Re: Group buy: SMSC USB3318 ULPI PHY

Postby kster59 » Thu Jun 24, 2010 6:13 am

I've been monitoring this USB solution for a while but I admit i don't know that much about the USB3318.

My primary requirement for USB is to move data from a PC to the MCU.

The code isn't available on the XMOS side unless you ask for it (I haven't yet) according to this page:
http://www.xmos.com/applications/comms/ ... level-ulpi

I assume it has two channels that you can write into the device and read from the device.

Ok the XMOS device can talk to the USB chip but how about the PC talking to the USB chip?

Say I have a C++ program on my PC, how do I open the USB stream and write an array to it? Looking at SMSC product page: http://www.smsc.com/index.php?tid=143&pid=29&cid=&tab=5

There don't seem to be any drivers for the operating system and there's DLL file to take of things like open the device/write to the device/etc.

Other manufacturers that I am familiar with (FTDI/Silabs) produce drivers and a simplified interface like D2xx or USBXpress that makes life easy. You basically call the openDevice() then call writeDevice(myArray), readDevice(myArray), closeDevice().

Under other processors like many ARM processors, the company supplies some examples that use something like WinUSB (Microsoft's library). However, these drivers are not as good. For example, the USB bulk example on the TI Stellaris did not support Windows x64 a month or so ago (not sure if this has changed).

Otherwise you are left to implement all the different USB configurations. I'm sure XMOS has a working example of USB audio: http://www.xmos.com/applications/comms/ ... y-audio-20

but how about HID device, USB bulk, VCP, etc.

Doesn't the XTAG2 have a SMSC USB3318? Does the UART VCP work now? I asked this question a long time ago (Dec 2009): http://www.xmoslinkers.org/forum/viewto ... ?f=3&t=688

Correct me if I'm wrong but I still can't connect to the XMOS device over VCP UART.

So back to the main question, what would I need to do to write an array of integers over the USB channel from my Windows C++ program and have it store it in an array on the XMOS side using the USB3318?
sjalloq
Active Member
Posts: 55
Joined: Tue Jan 12, 2010 1:49 pm

Postby sjalloq » Thu Jun 24, 2010 8:06 am

You'll need to write your own drivers.

XMOS supply the PHY library which supposedly allows you to perform any function you want. They supply the relevant channels for all the endpoints and it's up to you to write the functions that implement those endpoints.

The USB reference design is the only example code I know about but I haven't looked recently. That is nicely modularised but when I tried to implement a HID device, on a previous build, it didn't seem possible with the current library. It didn't seem to support returning a NAK for unsupported feature requests from the host.

Perhaps XMOS have plans to release sample code for other USB devices. It would certainly be useful.
kster59
XCore Addict
Posts: 162
Joined: Thu Dec 31, 2009 8:51 am

Postby kster59 » Thu Jun 24, 2010 8:48 am

That's what I thought...

Basically the USB3318 is useless as a USB device that you want to use today unless you are making USB Audio. Even then I think it is non trivial.

That's why I stick with FTDI and Silabs :)
Light
Member++
Posts: 21
Joined: Thu Jun 03, 2010 9:39 am

Postby Light » Thu Jun 24, 2010 10:00 pm

Hi, I am interested. Just don't know why we can not directly buy it from digikey or mouser?
sjalloq
Active Member
Posts: 55
Joined: Tue Jan 12, 2010 1:49 pm

Postby sjalloq » Thu Jun 24, 2010 10:17 pm

Of course you can buy it yourself. The idea of a group buy is to save money by pooling buyers to get over the price break quantities. If you want to buy 50 units or don't care about the price then that is also fine.

Laters.
User avatar
paul
XCore Addict
Posts: 169
Joined: Fri Jan 08, 2010 12:13 am

Postby paul » Fri Jun 25, 2010 7:10 pm

kster59 wrote:That's what I thought...

Basically the USB3318 is useless as a USB device that you want to use today unless you are making USB Audio. Even then I think it is non trivial.

That's why I stick with FTDI and Silabs :)
A bit OT - But FTDI's products are entirely different. They have some intelligence in them and thus require drivers produced by them to work with them. The 3318 is just a PHY with a standard interface for connecting to other devices such as the L1 device. A PHY has little intelligence as it only does USB lines <-> [ULPI or UTMI etc].

If you want a good starting point for custom USB drivers then consider the cross platform LibUsb driver http://www.libusb.org/
Paul

On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
kster59
XCore Addict
Posts: 162
Joined: Thu Dec 31, 2009 8:51 am

Postby kster59 » Fri Jun 25, 2010 7:37 pm

My point was to clarify for people that were confused about USB.

If you go into the review projects, several people had designs around the 3318 which again is useless without drivers. Hoping for drivers seems like a poor strategy for commercial designs.

XMOS has not provided data transfers even for their own XTAG2 which uses 3318 so it's certainly nothing I want to dive into.

I asked about a VCP driver for the UART on the XK1 6 months ago and it is still "coming soon".

Unless you have a very specialty application in making USB devices it seems alternatives are a smarter way to go.
sjalloq
Active Member
Posts: 55
Joined: Tue Jan 12, 2010 1:49 pm

Postby sjalloq » Sat Jun 26, 2010 10:47 am

Perhaps you're confused here? What do you mean by drivers?

If you design a product to support one of the many USB profiles that exist in the spec then you don't have to write any host drivers. The OS will already support it out of the box.

You have to write your device software anyway for an XMOS device anyway so not sure what your point is.

If you want a USB-UART use an FTDI part. If you want to be able to design a high throughput USB product then use an XMOS+PHY combo.

And the XTAG2 is debug hardware - designed for a purpose other than proving the max throughput of a PHY they just happened to use.
kster59
XCore Addict
Posts: 162
Joined: Thu Dec 31, 2009 8:51 am

Postby kster59 » Sat Jun 26, 2010 7:58 pm

Yes I am confused.

PC Side:
What built in OS device drivers support high speed transport out of the box?

HID is limited to 64kB/sec.

Where can you find built in USB bulk drivers that you don't need to write yourself like FTDI D2xx or USBXpress that guarantees data arrives in order and handles CRC and retransmission?

XMOS Side:
Not only do you need to write the read/write from the device but you also need to implement all the low level protocols.

Where can you find HID example with XMOS? It is non trivial to implement.

You need to write a) USB handshaking b) USB identification c) USB retransmission/retry d) USB packet parsing e) USB buffering for each device etc. I don't think USB packets are not guaranteed to arrive in order or at specific times.

FTDI:
FTDI is not limited to UART. I use high speed parallel 8 bit bus+4 control line protocol.

FT2232H supports 480mbps with real transfer rate of around 5megabytes/sec sustained.

FT245r supports around 1megabyte/sec in my tests.

Both are trivial to implement and include handshaking/auto resend/wait etc.

Silabs:
Has examples for USB HID and mass storage among others as well as easy to use USBXpress.

The final two statements:
What examples do you see working with XMOS and usb3318 besides the non-free implementation of USB audio 2?

Anyway I'm just trying to help. USB isn't like RS232 communication or even SPI. There's a lot going on there and that's why companies make special chips and sell drivers for lots of money.
sjalloq
Active Member
Posts: 55
Joined: Tue Jan 12, 2010 1:49 pm

Postby sjalloq » Sun Jun 27, 2010 1:11 am

Mass storage driver?

XMOS provide a low level interface to the USB3318. It is called XUD and comes with the USB Audio reference design. I'm pretty sure, from the wording of the documentation, that they intend to use this library for other reference designs and I'm assuming they will release it for general use. At least I hope they do.

With this library all you have to implement are the endpoints. So you need a Control endpoint with the relevant header associated with the class you are implementing, as well as the code to reply to the control requests. You then need to implement the data endpoints that you need. This is all handled using channels. All the low level USB protocol is handled by the library. Once they correct the broken link, I think the information should appear here: http://www.xmos.com/published/xud

You can't get much simpler without having someone write your solution for free.

A good book on USB is "USB Complete Fourth Edition" by Jan Axelson. One of the best technical books I've bought recently and I'd recommend it.

Good luck.

Who is online

Users browsing this forum: No registered users and 1 guest