Skip to main content
Visitor II
December 25, 2024
Solved

What is I/O structure of OTG_USB_DP&OTG_USB_DM pins for STM32U595VJT6?

  • December 25, 2024
  • 1 reply
  • 883 views

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

    This topic has been closed for replies.
    Best answer by TDK

    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.

    1 reply

    Super User
    December 25, 2024

    > 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:

    TDK_0-1735092280363.png

    Also set USV bit in PWR->SVMCR.

     

    See here:

    Solved: STM32U595 used PA12 and PA11 as INPUT gpios,can't ... - STMicroelectronics Community

    Yang YangAuthor
    Visitor II
    December 25, 2024

    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