Skip to main content
Visitor II
February 28, 2024
Question

STM32F4 USB host/device with USB-C connector

  • February 28, 2024
  • 1 reply
  • 1427 views

Hi, I want to use a USB with USB-C connector and STM32F427 mostly as a HOST for USB mass storage, but it has to be able to switch to device, works as serial port. A 5V can be applied to the USB by a power switch for a HOST mode, and can be detected with a resistor divider and STM's VBUS pin in both modes. What I am wondering is a power delivery. I do not want to use an additional PD controller. Is it possible to use simple pullups/pulldowns resistors on CC pins? Do I have to switch them eg. by a transistors, to connect PU in host mode and PD in device mode? Maybe someone did it already and can suggest simple solution.

Marcin

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    March 4, 2024

    Hello @mkuczma 

    You can use a MOSFET to switch the power delivery. Check the shield for dual role as an example. Schematic diagrams - (st.com)

    FBL_0-1709558902087.png