Skip to main content
Pavel A.
June 24, 2018
Solved

USB device mode, low speed

  • June 24, 2018
  • 2 replies
  • 2650 views
Posted on June 24, 2018 at 14:07

Can the USB controller of STM32F072 work in LOW speed mode?

A. Is it possible to enforce low speed mode against a host capable of FS and HS?

B. If a host is low speed only, will the USB controller work with it? 

I've tried B., it does not seem to work. 

Thanks,

-- pa

    This topic has been closed for replies.
    Best answer by Ben K
    Posted on June 24, 2018 at 14:29

    As far as I know neither USB or OTG_FS/HS peripherals are capable of low-speed operation in device mode. Unlike a high-speed device which starts as a full-speed one and switches to high-speed only on a host request, low-speed and full-speed operation are mutually exclusive, and are determined at the time of device attachment (if DP is pulled high -> FS, if DM is high -> LS).

    However, the difference between LS and FS is only that the former is 8 times slower, and consequently the packet max data size is 8 instead of 64. If you are really determined to create a low-speed STM32 device, you could reduce the USB clock to 48 / 8 = 6 MHz, set the packet sizes (including EP0) to a maximum of 8 and put the pullup resistor to DM. It is likely that the StartOfFrame will not be properly detected, and therefore the suspend event will be raised incorrectly. All of this is just speculation though, I won't take responsibility to any damages.

    2 replies

    Ben K
    Ben KBest answer
    Senior III
    June 24, 2018
    Posted on June 24, 2018 at 14:29

    As far as I know neither USB or OTG_FS/HS peripherals are capable of low-speed operation in device mode. Unlike a high-speed device which starts as a full-speed one and switches to high-speed only on a host request, low-speed and full-speed operation are mutually exclusive, and are determined at the time of device attachment (if DP is pulled high -> FS, if DM is high -> LS).

    However, the difference between LS and FS is only that the former is 8 times slower, and consequently the packet max data size is 8 instead of 64. If you are really determined to create a low-speed STM32 device, you could reduce the USB clock to 48 / 8 = 6 MHz, set the packet sizes (including EP0) to a maximum of 8 and put the pullup resistor to DM. It is likely that the StartOfFrame will not be properly detected, and therefore the suspend event will be raised incorrectly. All of this is just speculation though, I won't take responsibility to any damages.

    Khouloud GARSI
    ST Employee
    June 25, 2018
    Posted on June 25, 2018 at 12:51

    Dear

    pavel_a

    ‌,

    Unfortunately, low speed transfers are not supported in device mode:

    0690X0000060BrPQAU.png

    Khouloud.