Skip to content

Question about PB_10 configuration on STM32F405RG probably related to USB_OTG_HS #1389

Closed
@mrguen

Description

@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.

#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)?

Issue #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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions