Author Topic: uTasker and USB host Implementation  (Read 14093 times)

Offline pedro

  • Newbie
  • *
  • Posts: 1
    • View Profile
uTasker and USB host Implementation
« on: July 30, 2007, 06:26:20 PM »
Does anybody succeed implementing an USB Host software in uTasker for MCF5223x?
Thanks.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: uTasker and USB host Implementation
« Reply #1 on: July 30, 2007, 11:13:24 PM »
Hi Fabio

The MCF5222X family includes USB (not the M5223X). A uTasker USB stack implementation is planned for Autumn 2007 for this chip - a USB analyser is just being ordered so that the development can commence efficiently.

Freescale does have a USB stack (a Beta version when I looked at it) which is available somewhere on their web site. It is a little unfortunate that the M5222X family doesn't have Ethernet but the "On-the-go" capabilities should be useful in some applications.

Regards

Mark

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Re: uTasker and USB host Implementation
« Reply #2 on: July 31, 2007, 12:08:18 PM »
Hi,
   Has anyone used USB to UART chip?  There are various chips out there that does it, but I am not sure how good they are. Any feedback would be excellent,as we hope to include USB later this year.

Here is a link to one on the farnell web page. Its the development board, but they also do the chips. I havent looked yet too much into this, so cant really give an opinion yet.

http://uk.farnell.com/jsp/Semiconductors/Development+Tools+&+Programming/displayProduct.jsp?sku=1146036&_requestid=294758

Neil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: uTasker and USB host Implementation
« Reply #3 on: August 07, 2007, 12:25:44 PM »
Hi Neil

I took a look at the FTDI USB-UART kit.

From what I understand it allows a DIP format module to be located on your board with RS232 (I think at logic level) to be connected to the local processor, where the modul is either supplied locally or powered from the USB bus (when connected).

The processor communicates using normal UART to a host (PC with virtual COM) as if the UART were connected directly to a standard COM port. Possibly the baud rate can also be set a bit higher than a normal COM port as well.

The main advantage that I see of using such a module is that it allows PCs with no COM port to be connected via USB to use typical serial protocols. Of course if the processor can not do USB itself (or the software development investment is too high) it is a practical solution.

I too have a project where I have a serial protocol communicating with a PC program which was developed some time ago. The processor has recently migrated to a SAM7X with integrated USB. This is used to program the boot software (which is practical since it is very fast, a nice 'modern' solution, is in fact cheaper than RS232 since the USB socket on the board costs less that the otherwise necessary RS232 level converter and needs no further components since the USB PHY is also integrated in the chip). Also using USB for communication with the PC program is something which is being talked about.
1. because a lot of new PCs just don't have COM ports any more
2. because it is nice for marketing to write it on their feature list

As I mentioned, I am preparing to integrate a USB stack (initially on the M5222X) into the uTasker project (I have read several books and have several development boards ready and am in the process of ordering a USB analyser) but I don't intend to use it just yet for the PC communication in the SAM7X project. There are 2 main reasons.
1. The cards are in a fairly large machine and have two RS232 interfaces. I will hide a RS232-USB converter (one with a 1m cable and true RS232 which are very cheap in every PC shop) in the machine with a USB socket in the housing. This will allow users with no COM to connect using a straight USB cable (the user could also connect the RS232-USB converter to the RS232 interface if he/she wants) but from a marketing point of view he/she should usually believe that the straight cabel is enough...
2. I use RS232-USB adapters (the cheap ones from the local PC shop) and have found them quite good, but not perfect. Sometimes it is necessary to unplug them and plug them again - one that I have can hang in XOFF mode and then that is the only solution to get it going again. Basically I don't trust USB due to experience with unreliability, whereas the old fashioned COM ports have never given problems.

I believe that the FTDI USB-UART kit can be considered to be equivalent to my USB-RS232 cable (but smaller and located on the board without RS232 converter). I don't know about reliability. Once I understand the details better I hope to have the chance to analyse some of the USB problems that I have encountered to get an idea about where their cause is and whether they are due to bugs in the devices themselves, the host or basic flaws in USB itself.

Regards

Mark

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Re: uTasker and USB host Implementation
« Reply #4 on: August 08, 2007, 04:33:06 PM »
Hi Mark,
  Its a  pitty that the 52235 doesnt have an on board USB, as I will have to communicate with some USB devices. I have a few samples of a
'USB Peripheral/Host Controller with SPI Interface' device from maxim.  http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3639

I am designing a prototype board, and inserting this onto the spi bus. I will only be using it to connect to devices and communicating. I am new to USB, so will have a learning curve first to tackle :'(

Neil