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.

MSP430 USB bandwidth limit

Using USB, I need to push 192kB/sec data from the device to the host. Full speed is fine. Error checking is not required.

According to Programmer's Guide: MSP430 USB API v4.10 (.pdf), page 49, "HID-Datapipe was created .... thus HID-Datapipe offers the best of both world (at the expense of throughput, limited at 64KB/sec)."

However, the MSP430 Descriptor Tool allows for the creation of multiple interfaces each with 64 bytes of data and a 1mS polling interval. (ie. 64kB/sec)  So, three interfaces would produce the needed 192kB/sec.

Is the 64kB/sec limit, per device, per interface, per endpoint?

  • If you need high speed USB transfer, use CDC / Bulk, not HID. With CDC PC side will be same as with standard serial COM port. Error checking is part of USB standard, so there is no need for extra one. MSP430 USB module using CDC can go up to 1 MByte/s and it is working in parallel with CPU. Here you can see my MSP430 USB Benchmarks...

    http://forum.43oh.com/topic/2775-msp430-usb-benchmark

  • While I'm aware of other alternatives, for several reasons I wish to use HID. The specific question was

    In HID, is the 64kB/sec limit, per device, per interface, per endpoint?

    After some more digging I found this in  MSP430™ USB HID Windows API Programmer's Guide SLAA453 – January 2011, Page 5, Section 2.5  "...helps overcome the bandwidth limitation of a single HID interface (64 kbps). As many as eight HID interfaces can be run in parallel on an MSP430, providing 512-kbps bandwidth."

    I'm concerned with the use of "kbps" which could mean bits not bytes. However, as mentioned in the original post, the Descriptor Tool allows multiple interfaces with 64 bytes per polling interval though it stops at 7 not 8 interfaces, so I'm hopeful.

    Still would like someone who KNOWS the answer to the original question to confirm what seems to be the case.

    1535 Gallatin Pike N, MadisonTN 37115-2158
  • If there is need for high speed UART transfer somebody can use 8 serial ports at 9600 bps. I think that is better way to use only one serial port at 115200 bps. But of course, somebody can have several reasons for using 8.

    You are going in wrong direction, but this is not my problem. There are plenty of USB experts on e2e, and for sure someone KNOWS the answer to the original question. ;)

  • zrno soli said:
    If there is need for high speed UART transfer somebody can use 8 serial ports at 9600 bps. I think that is better way to use only one serial port at 115200 bps. But of course, somebody can have several reasons for using 8.

    Sounds like infinite monkey theorem :) Especially knowing that HID is "Human Interface Device", not intended for data transfers. Sending high speed data in 64 byte chunks leads to huge overheads in both host and device (CPU's) not to mention USB interface itself. Completely agree that bulk is way to go

  • With all due respect the responses so far simply repeat information already present in numerous other threads and fail to respond to the original simple question.

    Put somewhat differently in the hopes that an actual answer will appear, numerous sources say the limit to data transmission within HID at full speed is 64 bytes every millisecond (64kBps). Is that limit per device, per configuration, per interface or per endpoint?

  • Dave Delage said:

    Put somewhat differently in the hopes that an actual answer will appear, numerous sources say the limit to data transmission within HID at full speed is 64 bytes every millisecond (64kBps). Is that limit per device, per configuration, per interface or per endpoint?

    A generic USB HID device uses control endpoint (EP0) for data exchange (or INT IN for recurring IN reports), thus speed limit is 64Kbit/s. If you decide to create a custom device, which uses bulk endpoints, you could achieve much higher speed, but would greatly depend on the protocol you gonna use over bulk EPs and your host driver.

  • I need to send 100 tons of sand from Canada to Mexico. But I don’t want to use a truck or train for this but pushcarts. Maybe pushcarts are meant and designed for short distances and small amounts, but since I can easily get a lot of them, I want to use them adn do not want to rent a truck. Any suggestions?

     Seriously, HID is meant for occasional (from processor view) transmission of very small amounts of data with low latency. In relation to the amount of data, it wastes a lot of resources and bandwidth. Using multiple HID connections instead of one bulk connection is simply insane.
    64 bytes per millisecond isn’t 64kBaud, because for sending these 64bit, a multiple of this is required on handshake and header information. Not to mention the overhead to split the data into multiple virtual HID devices, have multiple drivers installed on the host side, then join the data again.

    But to answer the question: bandwidth limitation for one HID endpoint (EP) is 64KB/s (= 512kbps). You may use up to 8 EPs. Which in theory gives 4Mbps (512KB/s). However, the effective throughput also depends on your code, and many people have discovered an effective transmission speed of only 30kB/s or less for a single EP (not necessarily on MSPs, as this is a general problem). Splitting the data into multiple HID EPs would in this case not increase the total throughput but rather lower it.

**Attention** This is a public forum