Skip to main content
Visitor II
June 4, 2020
Question

how can I improve hs usb speed?

  • June 4, 2020
  • 3 replies
  • 1144 views

Hi

Actually I,m using stm32f407igh on my board.

and I'm using hs usb protocal to send data to PC.

but when I measured the usb speed in pc, it is just 10Mbps.

I used cubsMX software to set hs usb.

In datasheet, it could be maximum 480Mbit/s.

why my device is slow then datasheet? and How could I improve HS usb speed?

Thank you for the reading and please give me details.

Thanks.

    This topic has been closed for replies.

    3 replies

    Mseo.1Author
    Visitor II
    June 4, 2020

    Actually I'm using usb3300 for ext phy.

    Super User
    June 4, 2020

    480 Mbit/s is the clock rate. Since USB has quite a bit of overhead, you're not going to achieve that as a transfer speed.

    You don't give any details about how you're using the USB, or what device. In general, large transfers are going to be faster than small transfers. Make sure the PC is responsive to data coming in over USB. DMA transfers are going to be faster unless your CPU is free.

    Instrument your code to figure out where it's taking so long, and improve that.

    I can get 50+ Mbps reliably with STM32F405 and USB3300. Sometimes 100+ Mbps, but it varies.

    Mseo.1Author
    Visitor II
    June 5, 2020

    Thank you for the reply.

    I'm using device mode for hs usb. I have 2 questioins.

    1. I read the datasheet for usb3300. and there is a register to set mode.

    so, do I have to set HS mode to USB3300? or stm32 usb init code do that?

    2. Actually, I'm using other communication interface such as uart, ethernet, fsmc.

    Could you give me some tips for DMA or examples?

    I already read the rm datasheet dma part, but there wasn't mapping for usb.

    How could I set dma for usb?

    Thanks