Skip to main content
Visitor II
June 8, 2022
Question

PA10 (USB OTG ID) pulled high after init of USB transceiver, not wanted

  • June 8, 2022
  • 1 reply
  • 1267 views

Hi,

I'm using the Pin PA10 (OTG_FS_ID) as digital input pin. The USB port is used as peripheral mode only, the PC is the host, the STM32H743 the slave.

We steppend trough our and your HL/LL code and find the moment when the pullup is activated at this pin.

FW Version 1.8: stm32h7xx_ll_usb.c Line 114

USBx->GCCFG |= USB_OTG_GCCFG_PWRDWN;

The initialization of the inputs/outputs of our system is done before, so the activation pulls the pin high. The standard GPIO commands (in/out, pullup) are not called from the usb routine, so we expect that it is done in background somehow.

Can someone explain me how to configure the USB core that the USB OTG ID pin is not touched?

Thanks

Philipp

    This topic has been closed for replies.

    1 reply

    Super User
    June 8, 2022

    Please note that this is a primarily user driven forum with casual ST presence.

    The OTG+PHY documentation (both in RM and DS) is notoriously insufficient, to put it in nice and mild terms.

    It may quite well be that the ID pullup is not controlled by GPIO and is unconditionally switched on at the moment PWRDWN bit is set.

    I haven't experimented with ID and don't use 'H7, but for example, in 'F4 this is how the DP/DM pins behave - the GPIO AF setting is ignored/overriden by OTG. You can find it on the forum with some searching (unless it got lost at some of ocassions when forum was migrated to yet another catastrophically bad software). ST never bothered to comment/acknowledge this.

    Treat it as a fact.

    JW