Question about PB_10 configuration on STM32F405RG probably related to USB_OTG_HS

Post here first, or if you can't find a relevant section!
Post Reply
mrguen
Posts: 24
Joined: Tue Mar 03, 2020 1:21 pm
Answers: 2

Question about PB_10 configuration on STM32F405RG probably related to USB_OTG_HS

Post by mrguen »

Hello,

I am using a custom board implementing the STM32F405RG.
Arduino Core STM32: 1.9.0
Arduino IDE 1.8.13

I can't have the LED attached to PB_10 work with the blink sketch. Another pin like PA_14 works.

I can see that PinNamesVar.h assigns PB_10 as USB_OTG_HS_ULPI_D3.

Code: Select all

#ifdef USBCON
  USB_OTG_FS_SOF = PA_8,
  USB_OTG_FS_VBUS = PA_9,
  USB_OTG_FS_ID = PA_10,
  USB_OTG_FS_DM = PA_11,
  USB_OTG_FS_DP = PA_12,
  USB_OTG_HS_ULPI_D0 = PA_3,
  USB_OTG_HS_SOF = PA_4,
  USB_OTG_HS_ULPI_CK = PA_5,
  USB_OTG_HS_ULPI_D1 = PB_0,
  USB_OTG_HS_ULPI_D2 = PB_1,
  USB_OTG_HS_ULPI_D7 = PB_5,
  USB_OTG_HS_ULPI_D3 = PB_10,
  USB_OTG_HS_ULPI_D4 = PB_11,
  USB_OTG_HS_ID = PB_12,
  USB_OTG_HS_ULPI_D5 = PB_12,
  USB_OTG_HS_ULPI_D6 = PB_13,
  USB_OTG_HS_VBUS = PB_13,
  USB_OTG_HS_DM = PB_14,
  USB_OTG_HS_DP = PB_15,
  USB_OTG_HS_ULPI_STP = PC_0,
  USB_OTG_HS_ULPI_DIR = PC_2,
  USB_OTG_HS_ULPI_NXT = PC_3,
#endif
Probably this pin is in internal pullup since it is constantly very dimly lit.

So, I suppose the USB_OTG_HS is configuring all these pins. How can I setup the board so it works as a usual USB device (like on the generic STM32F401 that is working prefectly on the same board)?

This issue [https://github.com/stm32duino/Arduino_C ... /pull/1196[/https://github.com/stm32duino/Arduino_C ... /pull/1196] shows some parameters to enable/disable HCP/PCD in , but can't find any reference about them (-DHAL_HCD_MODULE_ENABLED -DUSBHOST -DHAL_PCD_MODULE_ENABLED)
by fpiSTM » Mon May 10, 2021 3:12 pm
@mrguen
It seems you solved your issue. In that case mark your first post as Solved please.


mrguen deleted the post by mrguen on Mon May 10, 2021 11:29 am for the following reason: solved
Go to full post
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Question about PB_10 configuration on STM32F405RG probably related to USB_OTG_HS

Post by fpiSTM »

If you don't use USB there is no config of USB pins.
The USB pins config is done when you enable the USB thanks the menu.
PB10 is for High Speed USB so it used only when you select USB High speed in the USB speed menu.

About HCD currently this is not available (Host) and the "issue" you mentioned is a PR which is not merged as it request review.
mrguen
Posts: 24
Joined: Tue Mar 03, 2020 1:21 pm
Answers: 2

Re: Question about PB_10 configuration on STM32F405RG probably related to USB_OTG_HS

Post by mrguen »

Hello

What do you mean by
the "issue" you mentioned is a PR which is not merged as it request review.


How can I have this pin work normally?
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Question about PB_10 configuration on STM32F405RG probably related to USB_OTG_HS

Post by fpiSTM »

mrguen wrote: Mon May 10, 2021 9:02 am Hello

What do you mean by

the "issue" you mentioned is a PR which is not merged as it request review.
https://docs.github.com/en/github/colla ... l-requests

mrguen wrote: Mon May 10, 2021 9:02 am How can I have this pin work normally?
I've already answered. If you do not select USB or if USB is selected and not High speed, the pin is not configured so it is free to use it for another purpose...
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Question about PB_10 configuration on STM32F405RG probably related to USB_OTG_HS

Post by fpiSTM »

@mrguen
It seems you solved your issue. In that case mark your first post as Solved please.


mrguen deleted the post by mrguen on Mon May 10, 2021 11:29 am for the following reason: solved
Post Reply

Return to “General discussion”