2024-12-24 05:37 PM
Hello, ST experts
It seems that OTG_USB_DP pin had some problems when this pin is forced to be set to GPIO when connected to USB host. The resistance between this pin and GND is serveral mega Ohm before OTG_USB_DP is forced to be a GPIO. And then it might be show a low resistance of about 100Kilo Ohm. So I want to check the I/O structure of this pin.
Merry Christmas
Yang
Solved! Go to Solution.
2025-01-03 04:52 AM
The structure of generic GPIO pins is given in the datasheet. There is nothing more specific about PA11/PA12 although the only difference is a pullup somewhere within the AF functionality. Not sure this is helping you.
> But for some reason the GPIO status of PA12 need to be checked before going to USB work mode, because it may not be pluged into USB slot.
The correct way to handle USB on a device that is not bus-powered is to wait for VBUS to be present, which must be done on a different pin. Only then are you allowed to energize USP_DP/DM. You cannot monitor the data pins themselves as they will be floating.
2024-12-24 06:06 PM - edited 2024-12-24 06:07 PM
> It seems that OTG_USB_DP pin had some problems when this pin is forced to be set to GPIO when connected to USB host.
If it's connected to a USB host, doesn't this pin need to be used for USB, not GPIO?
To use them as GPIO, set the VDD11USBDIS bit:
Also set USV bit in PWR->SVMCR.
See here:
Solved: STM32U595 used PA12 and PA11 as INPUT gpios,can't ... - STMicroelectronics Community
2024-12-24 07:12 PM - edited 2024-12-24 07:40 PM
Hello
Yes,this pin need to be used for USB if it really connects to USB host. But for some reason the GPIO status of PA12 need to be checked before going to USB work mode, because it may not be pluged into USB slot. So PA12 need to be put to GPIO in the way of your reply. But it seems there will be some damages to PA12 pin of STM32U5 if it really connects to USB host at that time. So I want to check the I/O structure of this pin.
BR
Yang
2025-01-02 09:17 PM
Hi, ST experts
Is there any update on this thread?
BR
Yang
2025-01-03 04:52 AM
The structure of generic GPIO pins is given in the datasheet. There is nothing more specific about PA11/PA12 although the only difference is a pullup somewhere within the AF functionality. Not sure this is helping you.
> But for some reason the GPIO status of PA12 need to be checked before going to USB work mode, because it may not be pluged into USB slot.
The correct way to handle USB on a device that is not bus-powered is to wait for VBUS to be present, which must be done on a different pin. Only then are you allowed to energize USP_DP/DM. You cannot monitor the data pins themselves as they will be floating.