2
\$\begingroup\$

I would like to have an answer about the implementation of a USB Type C device. Comparing with the USB 2.0, where the pull-up resistor is needed on D+ to select the communication speed, I did not find the specification for the Type C. My question: is the pull-up resistor on D+ (DP1 and DP2) needed, or it can be set as the image bellow? enter image description here

Here in this ST Application Note for USB Hardware (https://www.st.com/resource/en/application_note/dm00296349-usb-hardware-and-pcb-guidelines-using-stm32-mcus-stmicroelectronics.pdf), it is possible to read that VBUS is MANDATORY for Self-Powered devices on pin PA9 (that is my case):

enter image description here

In addition to this, in the same doc, it says the chip already has pull-up resistors:

enter image description here

In the Image bellow, it is shown that it is needed a VBUS eference to the STM32F405, to flag when the USB cable is connected.

enter image description here

Finally, on the datasheet (https://www.st.com/resource/en/reference_manual/dm00031020-stm32f405-415-stm32f407-417-stm32f427-437-and-stm32f429-439-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf), I've found that, indeed, it is needed to connect the VBUS to the chip to flag the cable connection:

enter image description here enter image description here

In summary, it is NOT needed for the STM32F405 the pull-up resistor on D+, and plus it is needed a VBUS resistive divider to notify the STM32 chip the USB cable to host was plugged in. Correct me if I am wrong!


[EDIT: FINAL VERSION WITH NO USB CONTROLLER] Some points, thanks to those who tried to help:

  1. This design's goal is to communicate via USB-C as a device-only peripheral and plus to use the host's VBUS to power the whole system, with different VBUS voltages, so consider VBUS can go from 0v to 20v, which will be implemented later with a USB controller chip. The system has it's own power supply, called VM on my schematic, so the VBUS could power the system or not, depending on the users will.
  2. Added Z1 zener diode (plus R48 and R49) to avoid the VBUS gets higher than 3.3v, assuming VBUS can vary from 4v to 20v (I am planning to implement a USB-C controller, so that it works just fine for the possibly variation of VBUS voltage).
  3. T1 is a 20v Vrwm TVS diode to avoid transient. Same to T2 and T3, both 3.6v Vrwm TVS diodes.
  4. Z2 and Z3 are simply zener diodes to avoid problems with illegal usb cables that have wrong values for Rp. Assuming CC line can reach up to 10.4v in worst case, but it has a max limit of 6v, both Z2 and Z3 protect the CC line.
  5. VBUS label goes to the PA9 pin of STM32F405 chip, to sense the VBUS voltage presence (the pin will realize a 0 to 3.3 voltage, even if VBUS goes from 0v to 20v).

enter image description here


[EDIT: FINAL VERSION WITH USB CONTROLLER]

Here I post a full version to work as a device-only self-powered system, where the VM is the system's power, which can be supplied by either VBUS OR it's Battery. The FUSB302B datasheet shows a typical application circuit, and the AN6102 shows it's complementation, where a 5v1 zener diode is added to limit the CC line voltage to avoid voltage rising above 6v - when illegal cables are used.

enter image description here

\$\endgroup\$
  • 2
    \$\begingroup\$ The host does need to see an appropriate pullup resistor, but that will generally be supplied internally by the USB chip in the device. \$\endgroup\$ – td127 Aug 22 at 19:20
  • 2
    \$\begingroup\$ Yes, I know. But presumably USB+/USB- do eventually connect to an IC do they not? It is that IC that may or may not supply an internal pullup. If unsure, best to put the resistor in the schematic - you can always not populate it. \$\endgroup\$ – td127 Aug 23 at 3:58
  • 1
    \$\begingroup\$ Good job! While USB-C is capable of generating VBUS over 5V it won’t do that without a negotiated power delivery contract. With a passive connection like yours you’ll only see 5V max on VBUS and CC lines. ESD protection is wise but 5V zeners shouldn’t be necessary. A host will provide up to 1.5A or 3A for VBUS if it sees those 5.1K pulldowns on CC1/CC2. Otherwise it may revert to wimpy USB2 current levels. Ideally, the 5.1K are switched out of the circuit when your self-power is off, otherwise host will sense a device but not be able to talk to it – that’s a USB-IF compliance fail. Good luck! \$\endgroup\$ – td127 Aug 29 at 1:21
  • 1
    \$\begingroup\$ I meant that R48 could be replaced with a short. The zener is guaranteeing a safe voltage so R48 doesn't buy you any further benefit. At any rate, good luck with this - it's a significant undertaking! \$\endgroup\$ – td127 Aug 31 at 2:34
  • 1
    \$\begingroup\$ It looks like it will work, although not with a large margin. VBUS_SENSE will end up 2.5V, which is a little above the min requirement of 3.3V * 0.7 = 2.3V. But you can't make it much higher than 2.5V because then Vgs becomes less than 2.5V which approaches the grey area for the FET threshold. So I think you've picked optimal values for this approach. \$\endgroup\$ – td127 Aug 31 at 6:42
2
\$\begingroup\$

USB2 speed-defining pull-up is a function of a device itself (which should be on the right-side of your schematics). Type-C by itself does not care about USB communication, it is an independent connector specification. The two 5.1k pull-downs on your schematics do define the device function, it is sufficient.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I am confused, so, to communicate with the host, my schematic is fine? By this schematic, the host is capable of defining the max communication speed? \$\endgroup\$ – Emanuel M Aug 23 at 0:15
  • 1
    \$\begingroup\$ @EmanuelM, "shcematics is fine" for what function? You probably need to define more of what you are making. So far your schematics looks like a Type-C connector to a USB device. If you plug something into your Type-C connector, the host side (if it is a host) will identify the connection as "to device", and turns VBUS on. After that it is up to device end to signal whatever pull, and the host will identify the speed of connection. \$\endgroup\$ – Ale..chenski Aug 23 at 17:26
  • \$\begingroup\$ It is a type c connector to a device, not a host. The host will be plugged on this conector to communicate with the stm32f405 chip. I've read yesterday that this chip has internal pull-ups. The doubt now is: do I need to connect the vbus to the PA9 to make the chip realize the host divice was connected? \$\endgroup\$ – Emanuel M Aug 24 at 15:24
  • 1
    \$\begingroup\$ @EmanuelM, yes, I suspected that this is a device. I don't want to know what the PA9 is, but yes, as soon as CC pins provide proper connect detection, the vbus will be asserted. Then your (not shown on the riht) device will power up if it is bus powered, and assert DP as USB connect event. If it is self powered, then VBUS should serve as logic input that will controll assertion of DP. \$\endgroup\$ – Ale..chenski Aug 25 at 4:09
  • 1
    \$\begingroup\$ @EmanuelM, read this electronics.stackexchange.com/a/455854/117785 and this electronics.stackexchange.com/a/323551/117785 \$\endgroup\$ – Ale..chenski Aug 26 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.