cancel
Showing results for 
Search instead for 
Did you mean: 

How to make USB_FS work ???

MBell.5
Associate III

hi, i'm trying to make USB_FS work on my custom board.

my desired configuration is peripheral (otg can be ok, i have jumper on id: PA_10)

i already have 2 USB HS so i can use only USB_FS mapped on PA_11 and PA_12 as OTG.

i follow the st wiki at the point 3.3.1 witn dr_mode = "peripheral";

my result is:

i can see 49000000.usb-otg under /sys/class/udc/

i can create one gadget device in /sys/kernel/config/usb_gadget/g1 (i created serial over usb)

as i assign 49000000.usb-otg > /sys/kernel/config/usb_gadget/g1/UDC, usb does not turn on, i always have 0V on PA_11 and PA_12

if i follow the st wiki at the point 3.3.2 witn dr_mode = "peripheral";

all works great and i can create my usb gadget

more info:

my micro is STM32MP157F

i'm using linux 5.10.10

i have NO hardware pull_up or pull_down on any line

i have VDD3V3_USBFS shorted with VDD3V3_USBHS (both connected to 3.3v)

my otg port is B_TYPE and i have one jumper to select OTG mode (i need only peripheral)

can anyone help me?

18 REPLIES 18
ZUl A.1
Associate II

Yes, please, I can test it and let you know too.

Here it is the patch.

let me know !!!

Have these patches solved the SOFT reset issue for you or not?

i abandoned dunfell.

as i switched to kirkstone i have the problem without the SOFT reset.

the usb just does not work. seems that one clock was missing.

with this patch all work on my side (kirkstone)

ZUl A.1
Associate II

so the USB is working in peripheral mode without any problem with these patches or does these patches only solved the SOFT reset problem for you?

all work good on my side. i create an USB device and it work good.

my device is "serial over usb".

and i'm able to send message from PC to ST and from ST to PC.

Hello @MBell.5​ ,

Thanks for sharing the patches with the community.

As explained previously, these patches are temporary and a final version of them will be included in a next official release.

These patches add the support for the utmi clock and allow to be sure that the utmi-clock is enabled when the OTG FS need it. This is needed on stm32mp15, when using the integrated full-speed PHY.

This prevent to have the timeout :

dwc2 49000000.usb-otg: dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL_CSFTRST

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank you so much for these patches; they have worked. They have probably saved me a week of research.

you're welcome !!! :penguin: