cancel
Showing results for 
Search instead for 
Did you mean: 

stm32cubeprogrammer USB gadget u-boot doesn't work

MWoło.2
Senior II

Hello,

I have a problem with programming EMMC through USB. Everything seems to be ok but when in U-Boot USB change from DFU to Gadget on Linux side everything stack (lsusb - stack). Of course, programming processes interrupt as well. I'm not sure where I should look for a malfunction. After the system boot-up USB gadget works normally I'm able to login to the board through USB. So from a hardware point of view, it seems to be correct or maybe not. When kernel boot-up and the system starts there is no switching activity on USB just load the Gadget driver and start USB and it works. I'm not sure how the switching process on USB in U-Boot works.

 

Part of my schematic is very simple

0693W00000NpMIfQAN.pngSo USB-C-ID is connected to PA13, with no connection to VBUS on the processor site. Maybe this VBUS is a problem or maybe the problem is in dts.

 

Please suggest to me something where I should start.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi @Michał Wołowik​ ,

Maybe look at:

You need to clearly mention in the Device Tree that you ignore VBUS and ID.

please check you have used u-boot,force-b-session-valid;

Btw, when using USB Type-C there is no ID pin.

To identify correctly as a device to the host side, the two CC1/CC2 lines must show each a 5.1K pull-down.

(there is also a typo on your schematics, B5 pin should be named CC2)

Regards.

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.

View solution in original post

2 REPLIES 2
PatrickF
ST Employee

Hi @Michał Wołowik​ ,

Maybe look at:

You need to clearly mention in the Device Tree that you ignore VBUS and ID.

please check you have used u-boot,force-b-session-valid;

Btw, when using USB Type-C there is no ID pin.

To identify correctly as a device to the host side, the two CC1/CC2 lines must show each a 5.1K pull-down.

(there is also a typo on your schematics, B5 pin should be named CC2)

Regards.

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.
MWoło.2
Senior II

Hi Patrick,

perfect answer, the missing word 'u-boot', so previously I have a

force-b-session-valid;

and now I just add

u-boot,force-b-session-valid;

and working.

Thanks for the schematic correction

Many thanks

Best Regards

Michal