cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H730 PA10 going high when turning on USB HS PHY

jri
Associate II

Hi all,


We are using an STM32H730IBK6Q.

PA10 is not configured and STM32CubeMx generates code that initializes the pin as "Analog" as expected.

Now if we enable USB (specifically, when setting `USBx->GCCFG |= USB_OTG_GCCFG_PWRDWN;`), that pin goes high, which is to me unexpected since AF10 (OTG_HS_ID) is not configured.

Is there any way to tell the USB PHY not to attach a pull-up to that pin? It seems like it gets hijacked even if not configured. In the block diagram in the reference manual, that pin is mentioned, but I was under the assumption that if it is not configured as OTG_HS_ID in CubeMX, it would not be touched:


jri_0-1712234914627.png

 



As a workaround, I have configured it as GPIO output and set it to RESET, and that works, the pin stays low and USB communication is operational. Do you see any drawbacks with that? We operate as a USB device (not host) at all times.

Thank you and best regards!

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

Hello @jri 

The behavior you're observing, where PA10 goes high after enabling USB, is due to the internal pull-up resistor being enabled on the ID line when the USB OTG HS is initialized.

Check the reference manual section 62.5.1 ID line detection for more details.

FBL_0-1712242620330.png

 

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

4 REPLIES 4
FBL
ST Employee

Hello @jri 

The behavior you're observing, where PA10 goes high after enabling USB, is due to the internal pull-up resistor being enabled on the ID line when the USB OTG HS is initialized.

Check the reference manual section 62.5.1 ID line detection for more details.

FBL_0-1712242620330.png

 

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.

jri
Associate II

Thank you @FBL! That is what we were thinking. Is there a way to disable this check on USB OTG HS initialization, or is it something in silicon that can never be turned off?

The fact that PA10 can be switched to AF10 (OTG_HS_ID) seems to indicate that this is optional, but it looks like it always happens.

FBL
ST Employee

Hi @jri 

Indeed, internal pull up cannot be omitted. It is necessary for the controller initialization check. By default, the controller's role is device. So, you can simply let OTG_HS_ID pin floating.

PA10 should be used only in dual role mode and OTG_HS_ID should be grounded in host role only.

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.

jri
Associate II

Hi @FBL, thank you, that clears things up. I still find it a bit unintuitive that the pin gets changed even though it is not configured in Cube, but knowing what is going on it is possible to work around it.