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.

EK-TM4C123GXL: USB transmission rate too low

Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: TUSB1210, TM4C123GH6PM

Hi all,

we developed an osciloscope for students of our university to work with. The first version is running and students are able to measure signals with a sample rate of up to 500kHz. The osciloscope is communicating via USB with a host application running on their PCs/Laptops. All the measured data is sent over a Bulk Endpoint to the Host application.

The next upgrade should deliver a better samplerate of the osciloscope, which means to increase the speed of the USB-transmission. Right now we are reaching a transmission rate of 0,5 MByte/s (as we are only using the leading 8 bits of the ADC peripheral with a sample rate of 500kHz). We achieve to use the full speed of the ADC module, which is at a max. sample rate of 1MHz.

So far we tested the transmission rate of the USB-Bulk-Example. The transmission rate reached with the USB-Bulk-Example is at about 0,8 MByte/s. The tranmission rates reached with the osciloscope and w/in the example code are far away from the USB 2.0 rate (60MByte/s) and also the USB 1.0 rate (1.5 MByte/s).  

Referring to the datasheet of the TM4C MCU it should be able to fulfill USB 2.0 standard, isn't that true?

In this thread I read about double-packet buffering (USB-Speed Thread) and followed Tsuneo Chinzeis advice/code snippet. Unfortunately it did not help to increase the transmission rate.

I've also tested the different usblib functions USBBufferWrite and USBBufferDataWritten. As expected the USBBufferDataWritten function was way faster, than the USBBufferWrite function. The next step would be to implement a USB-DMA-channel and test how this is increasing the USB-speed. But as we are so far below the possible max. transmission rate I am afraid, that this would not help as much as expected.

We'd like to achieve a transmission rate as high as possible, but at least at about 1 MByte/s.

Does anyone have an idea on how to increase the USB-speed?

Many thanks in advance,

Felix

  • Hi Felix,
    Not an expert here so welcome others in the community to chime in. If you have used double buffer scheme and max packet size (64 bytes for full speed) in bulk transfer and if you still can't improve the throughput then I'm not sure if there are other venues to try. Your suggestion of using DMA is worth trying to see how much it will improve. 1.5Mbytes/s is the theoretical max transfer rate. Normally, the host may reserve up to 20% of bandwidth for control transfers. There is additional overhead in the driver that can impact the throughput.
    Will you consider going high speed with the external PHY?
  • Hi Charles,
    thanks for your reply! From your answer I understand that the max. transmission rate with the TM4C LaunchPad without any additional hardware is 1.5 MByte/s and achieving higher rates is only possible with external PHYs like e.g. the TUSB1210? I am asking because in the datasheet is mentioned the Controller is compatible with the USB2.0 standard which would be 480MBit/s.
    Firstly we wanted to see if there are ways of improving the speed through software.
    Best regards,
    Felix

    EDIT: I think I mixed something up. As stated in the datasheet the MCU fulfills the USB2.0 standard for FS and LS which would be a max. of 1.5MByte/s. The 480Mbit/s would be HS. Sorry for the confusion. I will try to get the DMA solution run and will give feedback on that.

  • Hi Charles,
    for transferring data into the EPs FIFO I am using a uDMA-Channel and reached a transfer rate of ~1MByte/s. So DMA increases the speed about 25% which isn't too bad.
    For our needs 1MByte/s (reached with an modified USB_Bulk_Example) might not be enough, but let's see how far we can improve also within other points (communication overhead, etc.).

    Thanks again for your help and best regards,
    Felix

    PS: As we use the TM4C123GH6PM we can not use an external PHY

  • Hi refe,
    Glad you that you can improve the throughput to 1Mbyte/s. Last time I searched the forum and I have not come across with users who are able to reach 1Mbyte/s. Your result will be a good reference data point.
    Also my bad that I recommended using external PHY when the TM4C123 does not have the ULPI interface to the external PHY. That is available only in TM4C129.