This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB host serial driver?

Hi,

Anyone have a working serial driver for USB host mode for AM335x that they're willing to share?

The release notes for 02.00.00.07 (the upcoming release?) indicate that there will be CDC host mode support.  I'm thinking the CDC driver can be used as a basis for a pure USB serial driver.  If there is a pre-release version available, I'd be happy to try it out.  (I have both the TI AM335x EVM and the Beaglebone.)

Thanks,

Orjan 

  • Hi Orjan,

                The Serial mode is supported in device mode only, and this is available in 02.00.00.06 release (examples\evmAM335x\usb_dev_serial). In the next release composite mode (more than one class) will be supported.

               I request you to check 06 release if that will help you to proceed.

    Regards

    Baskaran

  • Hi,

    What I want to do is connect a HighSpeed FTDI serial to USB device and read data from that, so the device mode driver doesn't help.

    Am I reading http://processors.wiki.ti.com/index.php/StarterWare_02.00.00.07_Release_Notes correctly in that there will be host mode support for CDC? That page lists

    • Composite CDC + CDC
    • Composite CDC + Mouse

    under Features, USB.

    Data may be coming in fast, so I'm going to need DMA support in the host mode driver. 

  • CDC-serial class is supported in device mode only. I am not sure which statement makes you to believe that host mode is supported for serial .

  • The release notes for 02.00.00.07 did.  The .06 release notes say

    • CDC Device Mode

    then the .07 release notes add

    • Composite CDC + CDC
    • Composite CDC + Mouse

    The way it is written is similar to the other entries in the same table, but with the explicit "host" and "device" parts left out.

    What kind of added support do those two entries imply?

  • I am sorry if the these statements confused you. Basically CDC is supported in device mode only.

    I will reword the following statements as

    • Composite CDC (serial device) + CDC (serial device)
    • Composite CDC (serial device) + Mouse

    Regards

    Baskaran

  • Orjan Friberg said:

    What I want to do is connect a HighSpeed FTDI serial to USB device and read data from that, so the device mode driver doesn't help.

    [...] 

    Data may be coming in fast, so I'm going to need DMA support in the host mode driver. 

    In case someone stumbles upon this thread: communication with the FTDI device was quite easy to accomplish by simply modifying the MSC driver and the MSC example application and emulating what I see on the USB analyzer through calls to USBHCDControlTransfer/USBHCDPipeRead/USBHCDPipeWrite.

  • Orjan,

    can you please elaborate a bit more one the modifcations you make to the USBHCDControlTransfer/USBHCDPipeRead/Write routines ?

    I find myself starting to focus in one those same areas in our AM335x based system.

  • What I did was comment out all file system related stuff from usb_host_msc.c to have a skeleton to work from, then I added calls to those functions that blindly copied what I saw on the USB analyzer when connected to my Linux host.

    The only change I did was in USBHCDPipeRead, to be able to read shorter packets than the buffer size.  There was a counter that underflowed, and there was no way to find out how many bytes were actually recevied.

    I did not manage to get more than one bulk IN transfer per frame though.