Other USB_CONNECT pin on STM32F4xx

If you made your own board, post here, unless you built a Maple or Maple mini clone etc
Post Reply
mrguen
Posts: 24
Joined: Tue Mar 03, 2020 1:21 pm
Answers: 2

Other USB_CONNECT pin on STM32F4xx

Post by mrguen »

Could someone tell me if it would be possible to modify the pin used for USB_CONNECT. The pin used on the STM32F401RC board I am using is PD2 but I would be using this pin that is also SDIO_CMD to communicate with an SD CARD. So I would like to change it.
stas2z
Posts: 131
Joined: Mon Feb 24, 2020 8:17 pm
Answers: 8

Re: Other USB_CONNECT pin on STM32F4xx

Post by stas2z »

Usb device mode doesn't require any "usb_connect" pins, only dm/dp (pa11/12) and gnd, so u can use pd2 without any problems
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Other USB_CONNECT pin on STM32F4xx

Post by fpiSTM »

I guess you use the STM32 core...

USB_CONNECT is not part of the code, I guess you want change the USB_DISC_PIN defined here:
https://github.com/stm32duino/Arduino_C ... ant.h#L129

If your board is not the CoreBoard_F401RC then it is not defined per default. So you can use the generic F401RC variant and defined the one you want thanks build_opt.h or hal_confextra.h.

Else this is normal it is defined as the schematics said and so no way to redefine it as it is wired for USB.
CoreBoardF401_USB_CONNECT.png
CoreBoardF401_USB_CONNECT.png (2.41 KiB) Viewed 6026 times
Anyway if you don't use USB I guess you can use it for other thing without any issue.
mrguen
Posts: 24
Joined: Tue Mar 03, 2020 1:21 pm
Answers: 2

Re: Other USB_CONNECT pin on STM32F4xx

Post by mrguen »

Thanks. I will try with another pin.
donna1205
Posts: 1
Joined: Fri Jun 23, 2023 1:28 am

Re: Other USB_CONNECT pin on STM32F4xx

Post by donna1205 »

It is part of the USB interface circuitry on the microcontroller. By properly configuring this pin, you can enable USB communication and data transfer between the microcontroller and a connected USB device, such as a computer.
horaortiz
Posts: 1
Joined: Tue Sep 12, 2023 4:21 am

Re: Other USB_CONNECT pin on STM32F4xx

Post by horaortiz »

With pd2, you can utilize USB device mode without worrying about the extra "usb_connect" pins; all you need are dm/dp (pa11/12) and gnd.
Post Reply

Return to “Custom design boards”