Author Topic: 5225x USB dual mode  (Read 10930 times)

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
5225x USB dual mode
« on: October 02, 2009, 03:11:23 PM »
Hi Mark,
  How does the dual mode of the USB operate? I use the USB to communicate with a pc , but also have an application where I would like to be a host to a  peripheral (not at the same time). The peripheral I need to communicate with does not use a class, straight serial at 500,000 baud rate, 8 data bits, no parity, 1 stop bit, no flow control, and  it returns bcdDevice=0.

Would the above be possible? If so would I simply have 2 types of USB connector, host and client?

Best Regards
Neil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: 5225x USB dual mode
« Reply #1 on: October 02, 2009, 03:34:33 PM »
Hi Neil

If you have equipment which sometimes works as host and sometimes as device (not at the same time) it seems typical to have two USB connectors connected to the USB interface at the processor.

eg. http://www.luminarymicro.com/products/lm3s3748_usb_h_d_evaluation_kits.html

In some cases OTG (On-The-Go) may be suitable but probably not in your case - OTG is over-viewed in the M52259 user's manual.

Note that Host mode is presently not available but will be added soon (initially for the Coldfire).


From what you write about the peripheral it sounds to be something like a USB/serial converter - I suppose that you have a driver for it at the PC side and that it enumerates (?). I don't known what bcdDevice = 0 means.
The best method that I have found to date is to look how they communicate (using a USB analyser) - if it is not communicating using a standard class it will be using a propriety driver but hopefully the may that it communicates is quite easy to understand; some details are obvious from the enumeration sequence and and propriety commands will probably control the HW control lines.

Regards

Mark

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Re: 5225x USB dual mode
« Reply #2 on: October 02, 2009, 03:50:41 PM »
Hi Mark,
  The customer says they dont use any class on their usb client side, just a simple serial transmission, using the mentioned setup.

When you say OTG may not be suitable, why would this be, do you recon I couldnt use as a host and a peripheral? 

When do you recon the Host part will be available?

I have a logic analyser, not specifically a USB analyser, I wonder if this would work?

Thanks
Neil
 

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: 5225x USB dual mode
« Reply #3 on: October 02, 2009, 07:52:11 PM »
Hi Neil

I don't understand about the serial transmission because USB doesn't have setting like a serial interface. Its speed is fixed (eg. 12Mb/s for full speed) although its bandwidth can be controlled to achieve certain throughput limits. It has no stop bit but data is sent in packets (tokens). I would get them to explain in more details what is meant.

It may be that they are talking about the PC side, where the USB peripheral can be 'seen' as a COM port with serial settings (?) but this would probably use CDC (Communication Device Class).

OTG has some different rules (different connectors/cables) and both ends of the connection should be OTG capable otherwise the OTG protocol can not be used - if the other side is purely a device then HOST is the mode to use and not OTG.

I am hoping to start on the host mode very soon but it is difficult to estimate how long it will take since the main goal is to support mass storage, although CDC host is probably the logical first step seeing ans CDC device exists - this would also help testing OTG since CDC class seems suitable for this.

USB uses differential signaling which is not very suitable for a logic analyser. Also it is difficult to interpret the data since it is based on a 1ms frame. I use an Ellisys USB explorer (cost about $3'500) but can also do high speed USB. There are cheaper and also much more expensive ones; also a SW USB sniffer will allow the data traffic to be monitored but not low level things such as enumeration (where I found the main difficulty to lie). I have found that I don't use it much (apart from when actually developing embedded USB drivers) but I am glad that I have it when it is needed. I don't know whether such an investment is suitable for all USB users though - in some projects I have received HW for a short time to measure and then all details could be solved with help of the Ellisys.

Regards

Mark

See some (USB device) development details here:
http://www.utasker.com/forum/index.php?topic=176.0
 

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Re: 5225x USB dual mode
« Reply #4 on: October 02, 2009, 09:59:24 PM »
Hi Mark,
  Thanks for the reply. I will get back to them to explain more. Is it possible to set it just to Host mode?

Thanks

Neil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: 5225x USB dual mode
« Reply #5 on: October 02, 2009, 10:02:24 PM »
Hi Neil

Yes, just host mode is possible.

Regards

Mark