ST AN5225, STM32 Application note

AN5225

Application note

USB Type-C Power Delivery using STM32 MCUs and MPUs

Introduction

This application note is a guideline for using USB Type-C® Power delivery with STM32 MCUs and STM32 MPUs, also referring

to the TCPP01-M12 protection circuit. The document introduces some basics of the two new USB Type-C® and USB Power Delivery standards.

The USB Type-C® technology offers a single platform connector carrying all the necessary data. This new reversible connector makes plug insertion more user friendly. Using the Power Delivery protocol, it allows negotiation of up to 100 W power delivery to supply or charge equipment connected to a USB port. The objective is to save cables and connectors, as well as universal chargers.

The USB Type-C® connector provides native support of up to 15 W (up to 3 A at 5 V), extendable to 100 W (up to 5 A at 20 V) with the optional USB Power Delivery feature.

AN5225 - Rev 3 - September 2020

www.st.com

For further information contact your local STMicroelectronics sales office.

 

 

 

AN5225

General information

1General information

 

This document applies to STM32 MCUs and MPUs, based on Arm® Cortex®-M processor.

Note:

Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.

1.1Acronyms and abbreviations

AMS

Atomic message sequence

APDO

Augmented power delivery object

BMC

Bi-phase mark coding

BSP

Board support package

CAD

Cable detection module

DFP

Downstream facing port

DPM

Device policy manager

DRP

Dual-role power

DRS

Data role swap

GP

General purpose

GUI

Graphical user interface

HAL

Hardware abstraction layer

HW

Hardware

LL

Low layer

MSC

Message sequence chart

OVP

Over-voltage protection

PDO

Power delivery object

PE

Policy engine

PRL

Physical protocol layer

PRS

Power role swap

SNK

Power sink

SRC

Power source

UCPD

USB Type-C power delivery

UFP

Upstream facing port

VDM

Vendor defined messages

FWUP

Firmware update

PPS

Programmable power supply

TCPM

Type-C port manager

TCPC

Type-C port controller

TVS

Transient voltage suppression

AN5225 - Rev 3

page 2/64

 

 

AN5225

Reference documents

1.2Reference documents

STMicroelectronics ecosystem documents

[1]Managing USB power delivery systems with STM32 microcontrollers, UM2552

[2]STM32CubeMonitor-UCPD software tool for USB Type-C Power Delivery port management, UM2468

[3]TCPP01-M12 USB Type-C port protection, DS12900

[4]USB Type-C protection and filtering, AN4871

[5]STM32CubeMonitor-UCPD software tool for USB Type-C Power Delivery port management, DB3747

[6]USB Type-C and Power Delivery DisplayPort Alternate Mode, TA0356

[7]Overview of USB Type-C and Power Delivery technologies, TA0357

[8]STM32MP151/153/157 MPU lines and STPMIC1B integration on a battery powered application, AN5260

USB specification documents

[9]USB2.0 Universal Serial Bus Revision 2.0 Specification

[10]USB3.1 Universal Serial Bus Revision 3.2 Specification

[11]USB BC Battery Charging Specification Revision 1.2

[12]USB BB USB Device Class Definition for Billboard Devices

[13]Universal Serial Bus Power Delivery Specification, Revision 2.0, Version 1.3, January 12, 2017

[14]Universal Serial Bus Power Delivery Specification, Revision 3.0, Version 2.0, August 29 2019

[15]Universal Serial Bus Type-C Cable and Connector Specification 2.0, August 2019

[16]USB Billboard Device Class Specification, Revision 1.0, August 11, 2014, http://www.usb.org/developers/docs

AN5225 - Rev 3

page 3/64

 

 

AN5225

USB Type-C in a nutshell

2USB Type-C in a nutshell

The USB Implementers Forum (USB-IF) introduces two complementary specifications:

The USB Type-C® cable and connector specification release 1.3 details a reversible, slim connector system based on high-speed USB2.0 signals and two super-speed lanes at up to 10 Gbit/s, which can also be used to support alternate modes.

The USB Power Delivery (PD) specification revisions 2.0 and 3.0 detail how a link can be transformed from a 4.5 W power source (900 mA at 5 V on VBUS), to a 100 W power or consumer source (up to 5 A at 20 V).

The new 24-pin USB Type-C® plug is designed to be non-polarized and fully reversible, no matter which way it is inserted.

It supports all the advanced features proposed by Power Delivery:

negotiating power roles

negotiating power sourcing and consumption levels

performing active cable identification

exchanging vendor-specific sideband messaging

performing alternate mode negotiation, allowing third-party communication protocols to be routed onto the reconfigurable pins of the USB Type-C® cable

Figure 1. USB connectors

Mini AB

Micro AB

Unique

 

 

 

 

 

 

reversible

2.0

2.0

3.0

connector for all

specifications

 

 

 

Multiple connectors to support all kind of USB data

The following points should also be noted:

USB Type-C® cables use the same plug on both ends.

USB Type-C® supports all prior protocols from USB2.0 onward, including the driver stack and power capability.

The new connector is quite small (it is 8.4 mm wide and 2.6 mm high).

AN5225 - Rev 3

page 4/64

 

 

AN5225

USB Type-C® vocabulary

As shown in Figure 1. USB connectors, the new USB Type-C® plug covers all features provided by previous plugs, which ensure flexibility and siplifies application.

A USB Type-C® port can act as host only, device only, or have dual function. Both data and power roles can independently and dynamically be swapped using USB Power Delivery commands.

2.1USB Type-C® vocabulary

The terminology commonly used for USB Type-C® system is:

Source: A port power role. Port exposing Rp (pull-up resistor, see Figure 3. Pull up/down CC detection) on

CCpins (command control pins, see Section 4 CC pins), and providing power over VBUS (5 V to 20 V and up to 5 A), most commonly a Host or Hub downstream-facing port (such as legacy Type-A port).

Sink: A port power role. Port exposing Rd (Pull down resistor. See Figure 3. Pull up/down CC detection) on

CCpins and consuming power from VBUS (5 V to 20 V and up to 5 A), most commonly a device (such as a legacy Type-B port)

Dual-role power (DRP) port: A port that can play source or sink power roles, reversible dynamically.

Downstream-facing port (DFP): A port data role. A USB port at higher level of USB tree, such as a USB host or a hub expansion.

Upstream-facing port (UFP): A port data role. A USB port at lower level of USB tree, such as a USB device or a hub master port.

2.2Minimum mandatory feature set

It is not mandatory to implement and support all of the advanced features that are defined within Type-C and Power Delivery specifications.

The mandatory functions to support are:

cable attach and detach detection

plug orientation/cable twist detection

USB2.0 connection

AN5225 - Rev 3

page 5/64

 

 

AN5225

Connector pin mapping

3Connector pin mapping

The 24-pin USB Type-C® connector includes:

symmetric connections:

USB2.0 differential pairs (D+/D-)

power pins: VBUS/GND

asymmetric connections

two sets of TX/RX signal paths which support USB3.1 data speed

configuration channels (CC lines) which handle discovery, configuration and management of USB Type-C® power delivery features

two side-band use signals (SBU lines) for analog audio modes or alternate mode

Figure 2. Receptacle pinout

A12

 

A11

 

A10

 

A9

 

A8

 

A7

 

A6

 

A5

 

A4

 

A3

 

A2

 

A1

GND RX2+ RX2- VBUS SBU1 D-

 

D+

 

CC1

 

VBUS

 

TX1-

 

TX1+

 

GND

GND

 

TX2+

 

TX2-

 

VBUS

 

CC2

 

D+

 

D-

 

SBU2

 

VBUS

 

RX1-

 

RX1+

 

GND

 

 

 

 

 

 

 

 

 

 

 

B1

 

B2

 

B3

 

B4

 

B5

 

B6

 

B7

 

B8

 

B9

 

B10

 

B11

 

B12

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Table 1. USB Type-C receptacle pin descriptions

Pin

Name

Description

Comment

A1

GND

Ground return

up to 5 A split into 4 pins

 

 

 

 

A2

TX1+

USB3.0 datalines or alternate

10 Gbit/s TX differential pair in USB3.1

 

 

A3

TX1-

 

 

 

 

 

 

A4

VBUS

Bus power

100 W max power split into 4 pins

 

 

 

 

A5

CC1 or VCONN

Configuration channel or power for

In VCONN configuration, min power is

active or electronically marked cable

1 W

 

 

 

 

 

 

A6

D+

USB2.0 data lines

-

 

 

A7

D-

 

 

 

 

 

 

A8

SBU1

Side band use

Alternate mode only

 

 

 

 

A9

VBUS

Bus power

100 W max power split into 4 pins

 

 

 

 

A10

RX2-

USB3.0 datalines or alternate

10 Gbit/s RX differential pair USB3.1

 

 

A11

RX2+

 

 

 

 

 

 

A12

GND

Ground return

up to 5 A split into 4 pins

 

 

 

 

B1

GND

Ground return

up to 5 A split into 4 pins

 

 

 

 

B2

TX2+

USB3.0 datalines or alternate

10 Gbit/s TX differential pair in USB3.1

 

 

B3

TX2-

 

 

 

 

 

 

AN5225 - Rev 3

page 6/64

 

 

 

 

 

 

AN5225

 

 

 

 

VBUS power options

 

 

 

 

 

 

 

 

 

 

 

Pin

Name

Description

Comment

 

B4

VBUS

Bus power

100 W max power split into 4 pins

 

 

 

 

 

 

B5

CC2 or VCONN

Configuration channel or power for

In VCONN configuration, min power is

 

active or electronically marked cable

1 W

 

 

 

 

 

 

 

 

 

B6

D+

USB2.0 datalines

-

 

 

 

 

 

B7

D-

-

 

 

 

 

 

 

 

 

B8

SBU2

Side band use

Alternate mode only

 

 

 

 

 

 

B9

VBUS

Bus power

100 W ma power split into 4 pins

 

 

 

 

 

 

B10

RX1-

USB3.0 datalines or alternate

10 Gbit/s RX differential pair in USB3.1

 

 

 

 

B11

RX1+

 

 

 

 

 

 

 

 

 

B12

GND

Ground return

Up to 5 A split into 4 pins

 

 

 

 

 

3.1VBUS power options

VBUS provides a path to deliver power between a host and a device, and between a charger and a host or device.

Power options available from the perspective of a device with a USB Type-C® connector are listed below.

Table 2. Power supply options

Mode of operation

Nominal voltage

Maximum current

Note

USB2.0

5 V

500 mA

Default current based on specification

 

 

 

USB3.1

5 V

900 mA

 

 

 

 

 

USB BC1.2

5 V

1.5 A

Legacy charging

 

 

 

 

Current @1.5 A

5 V

1.5 A

Support high-power devices

 

 

 

Current @3 A

5 V

3 A

 

 

 

 

 

USB PD

5 V to 20 V

5 A

Directional control and power level management

 

 

 

 

Note:

USB Type-C® to Type-C™ cable assembly needs VBUS to be protected against 20 V DC at the rated cable

 

current (3 A or 5 A).

AN5225 - Rev 3

page 7/64

 

 

AN5225

CC pins

4CC pins

There are two CC pins (CC1 and CC2) in the Type-C connector, but only one CC pin is present on the cable plug at each end of the cable (they are connected in common through the cable). On both CC1 and CC2, a source must expose Rp pull up resistors, whereas a sink must expose Rd pull down resistors. Electronic cables need to provide a resistor, Ra, to ground on VCONN.

From a source point of view, the state of attached devices can be determined by referring to Table 3.

Table 3. Attached device states - source perspective

CC1

CC2

State

 

 

 

Open

Open

Nothing attached

 

 

 

Rd

Open

Sink attached

 

 

Open

Rd

 

 

 

 

Open

Ra

Powered cable without sink attached

 

 

Ra

Open

 

 

 

 

Rd

Ra

Powered cable with sink, VCONN-

 

 

powered accessory (VPA), or VCONN-

Ra

Rd

powered USB device (VPD) attached.

 

 

 

Rd

Rd

Debug accessory mode attached

 

 

 

Ra

Ra

Audio adapter accessory mode attached

 

 

 

4.1Plug orientation/cable twist detection

As a USB Type-C® cable plug can be inserted in the receptacle in either orientation, it is mandatory to first detect the orientation. The detection is done through the CC lines using the Rp/Rd resistors.

Initially a DFP presents Rp terminations on its CC pins and a UFP presents Rd terminations on its CC pins. To detect the connection, the DFP monitors both CC pins (see figure 4-30 in [15]).

AN5225 - Rev 3

page 8/64

 

 

AN5225

Plug orientation/cable twist detection

Figure 3. Pull up/down CC detection

DFP monitors for connection

UFP monitors for orientation

+

 

Cable

 

Rp

CC

CC1

CC1

 

 

Rd

 

 

Ra

CC2

Ra

CC2

Rp

Rd

DFP monitors for connection

UFP monitors for orientation

AN5225 - Rev 3

page 9/64

 

 

AN5225

Power capability detection and usage

4.2Power capability detection and usage

Type-C offers increased current capabilities of 1.5 A and 3 A in addition to the default USB standard.

The current supply capability of the port to the device depends on the Rp pull up resistor value on the DFP. High current (5 A) capability is negotiated using the USB Power Delivery protocol.

Table 4 shows the possible values, as per [15].

Table 4. DFP CC termination (Rp) requirements

VBUS power

Current source to

Rp pull up to

Rp pull up to

1.7 V - 5.5 V

4.75 V - 5.5 V

3.3 V +/-5%

 

 

 

 

 

Default USB power

80 mA ± 20%

56 kΩ ± 20% (1)

36 kΩ ± 20%

1.5 A @5 V

180 mA ± 8%

22 kΩ ± 5%

12 kΩ ± 5%

 

 

 

 

3.0 A @5 V

330 mA ± 8%

10 kΩ ± 5%

4.7 kΩ ± 5%

 

 

 

 

1.For Rp when implemented in the USB Type-C plug on a USB Type-C to USB 3.1 Standard-A Cable Assembly, a USB Type-

C to USB 2.0 Standard-A Cable Assembly, a USB Type-C to USB 2.0 Micro-B Receptacle Adapter Assembly or a USB Type-C captive cable connected to a USB host, a value of 56 kΩ ± 5% shall be used, in order to provide tolerance to IR drop on VBUS and GND in the cable assembly.

The UFP must expose Rd-pull down resistors on both CC1 and CC2 to bias the detection system and to be identified as the power sink, as per [15].

Table 5. UFP CC termination (Rd) requirements

Rd implementation

Nominal value

Can detect power

max voltage on CC pin

capability?

 

 

 

 

 

 

 

± 20% voltage clamp

1.1 V

No

1.32 V

 

 

 

 

± 20% resistor to GND

5.1 kΩ

No

2.18 V

 

 

 

 

± 10% resistor to GND

5.1 kΩ

Yes

2.04 V

 

 

 

 

The UFP, in order to determine the DFP power capability, monitors the CC line voltages accurately, as per [15].

Table 6. Voltage on sink CC pins (multiple source current advertisements)

Detection

Min voltage (V)

Max voltage (V)

Threshold (V)

vRa

-0.25

0.15

0.2

 

 

 

 

vRd-Connect

0.25

2.04

-

 

 

 

 

vRd-USB

0.25

0.61

0.66

 

 

 

 

vRd-1.5

0.70

1.16

1.23

 

 

 

 

vRd-3.0

1.31

2.04

-

 

 

 

 

AN5225 - Rev 3

page 10/64

 

 

AN5225

Power profiles

5Power profiles

The USB Power Delivery protocol enables advanced voltage and current negotiation, to deliver up to 100 W of power, as defined in [14] and reported in the following figure:

Figure 4. Power profile

Table 7 shows the permitted voltage source and programmable power supply (PPS) selections, as a function of the cable current rating.

Table 7. Fixed and programmable power supply current and cabling requirements

 

 

Fixed voltage source

 

Programmable power supply (PPS)

Power range

5 V

9 V

15 V

20 V

5 V (3.3 to

9 V (3.3 to

15 V (3.3

20 V (3.3

 

5.9 V)

11 V)

to 16 V)

to 21 V)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

With 3 A cable

 

 

 

 

 

 

 

 

0 W < PDP <= 15 W

PDP / 5

-

-

-

PDP / 5

-

-

-

 

 

 

 

 

 

 

 

 

15 W < PDP <= 27 W

3.0 A

PDP / 9

-

-

3.0 A

PDP / 9

-

-

 

 

 

 

 

 

 

 

 

27 W < PDP <= 45 W

3.0 A

3.0 A

PDP / 15

-

3.0 A

3.0 A

PDP / 15

-

 

 

 

 

 

 

 

 

 

45 W < PDP <= 60 W

3.0 A

3.0 A

3.0 A

PDP / 20

3.0 A

3.0 A

3.0 A

PDP / 20

With 5 A cable

 

 

 

 

 

 

 

 

60 W < PDP <= 100 W

3.0 A

3.0 A

3.0 A

PDP / 20

3.0 A

3.0 A

3.0 A

PDP / 20

 

 

 

 

 

 

 

 

 

Further information is available in [14] and [15].

AN5225 - Rev 3

page 11/64

 

 

AN5225

USB power delivery 2.0

6USB power delivery 2.0

In USB power delivery, pairs of directly attached ports negotiate voltage, current and/or the direction of power, and data flow over the USB cable. The CC wire is used as a BMC-coded communication channel.

The mechanisms used operate independently of other USB power negotiation methods.

6.1Power delivery signaling

All communications are done through a CC line in half-duplex mode at 300 Kbit/s.

Communication uses BMC encoded 32-bit 4b/5b words over CC lines.

6.1.1Packet structure

The packet format is:

Preamble: 64-bit sequence of alternating 0s and 1s to synchronize with the transmitter.

SOP*: start of packet. Can be SOP, SOP’ (start of packet sequence prime) or SOP” (start of packet sequence double prime), see Figure 5. SOP* signaling.

SOP packets are limited to PD capable DFP and UFP only

SOP’ packets are used for communication with a cable plug attached to the DFP

SOP” packets are used for communication with a cable plug attached to the UFP.

A cable plug capable of SOP’ or SOP” communication must only detect and communicate with packets starting with SOP’ or SOP”.

Message data including message header which identifies type of packet and amount of data

CRC: error checking

EOP: end of packet, unique identifier.

Figure 5. SOP* signaling

Cable

DFP Plug

(SOP’)

SOP’

Electronically Marked

Cable

Cable

Plug UFP (SOP ‘’)

SOP’’

SOP

6.1.2K-codes

K-codes are special symbols provided by the 4b/5b coding. They signal hard reset, cable reset, and delineate packet boundaries.

AN5225 - Rev 3

page 12/64

 

 

AN5225

Negotiating power

6.2Negotiating power

The DFP is initially considered as a bus master.

The protocol layer allows the power configuration to be dynamically modified.

The power role, data role and VCONN swap are possible independently if both ports support dual power role functionality.

The default voltage on VBUS is always 5 V and can be reconfigured as up to 20 V.

The default current capability is initially defined by the Rp value, and can be reconfigured as up to 5 A for an electronically marked USB PD Type-C cable.

The protocol uses start-of-packet (SOP) communications, each of which begins with an encoded symbol (K- code).

SOP communication contains a control or data message.

The control message has a 16-bit fixed size manages data flow.

The data message size varies depending on its contents. It provides information on data objects.

AN5225 - Rev 3

page 13/64

 

 

AN5225

USB power delivery 3.0

7USB power delivery 3.0

From the power point of view, there are no differences between USB PD 2.0 and USB PD 3.0. All USB PD 3.0 devices are able to negotiate power contracts with USB PD 2.0 devices, and vice-versa. USB PD 3.0 adds the following key features:

Fast role swap

Authentication

Firmware update

Programmable power supply (PPS) to support sink directed charging

The following is a summary of the major changes between the USB PD 3.0 and USB PD 2.0 specifications:

Support for both Revision 2.0 and Revision 3.0 operation is mandated to ensure backward compatibility with existing products.

Profiles are deprecated and replaced with PD power rules.

BFSK support deprecated including legacy cables, legacy connectors, legacy dead battery operation and related test modes.

Extended messages with a data payload of up to 260 bytes are defined.

Only the VCONN source is allowed to communicate with the cable plugs.

Source coordinated collision avoidance scheme to enable either the source or sink to initiate an atomic message sequence (AMS).

Fast role swap defined to enable externally powered docks and hubs to rapidly switch to bus power when their external power supply is removed.

Additional status and discovery of:

Power supply extended capabilities and status

Battery capabilities and status

Manufacturer defined information

Changes to fields in the passive cable, active cable and AMA VDOs indicated by a change in the structured VDM version to 2.0.

Support for USB security-related requests and responses.

Support for USB PD firmware update requests and responses.

System policy now references USBTypeCBridge 1.0.

AN5225 - Rev 3

page 14/64

 

 

AN5225

Alternate modes

8Alternate modes

All the hosts and devices (except chargers) using a USB Type-C® receptacle shall expose a USB interface. If the host or device optionally supports alternate modes:

The host and device shall use USB power delivery structured vendor defined messages (structured VDMs) to discover, configure and enter/exit modes to enable alternate modes.

It is strongly encouraged that the device provide equivalent USB functionality where such exists for the best user experience.

Where no equivalent USB functionality is implemented, the device must provide a USB interface exposing a USB billboard device class to provide information needed to identify the device. A device is not required to provide a USB interface exposing a USB billboard device class for non-user facing modes (for exmple diagnostic modes).

As alternate modes do not traverse the USB hub topology, they must only be used between a directly connected host and device.

8.1Alternate pin re-assignments

In Figure 6, pins highlighted in yellow are the only pins that may be reconfigured in a full-feature cable

Figure 6. Pins available for reconfiguration over the Full Featured Cable

A12

A11

A10

A9

A8

A7

A6

A5

A4

A3

A2

A1

GND

RX2+

RX2-

VBUS

SBU1

D-

D+

CC

VBUS

TX1-

TX1+

GND

 

 

 

 

 

 

 

 

 

 

 

 

GND

TX2+

TX2-

VBUS VCONN

 

 

SBU2

VBUS

RX1-

RX1+

GND

B1

B2

B3

B4

B5

B6

B7

B8

B9

B10

B11

B12

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reconfigurable pin

Figure 7 shows pins available for reconfiguration for direct connect applications. There are three more pins than in Figure 6 because this configuration is not limited by the cable wiring.

AN5225 - Rev 3

page 15/64

 

 

AN5225

Billboard

Figure 7. Pins available for reconfiguration for direct connect applications

A12

A11

A10

A9

A8

A7

A6

 

A5

 

A4

 

A3

 

A2

A1

GND

RX2+

RX2-

VBUS

SBU1

D-

D+

 

CC

VBUS

 

TX1-

 

TX1+

GND

 

 

 

 

 

 

 

 

 

 

 

 

 

 

GND

TX2+

TX2-

VBUS VCONN

 

 

 

SBU2

VBUS

RX1-

RX1+

GND

 

B1

B2

B3

B4

B5

B6

B7

 

B8

 

B9

 

B10

 

B11

B12

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reconfigurable pin

8.2Billboard

The USB Billboard Device Class definition describes the methods used to communicate the alternate modes supported by a device container to a host system.

This includes string descriptors to provide support details in a human-readable format. For more details, refer to [16].

AN5225 - Rev 3

page 16/64

 

 

ST AN5225, STM32 Application note

AN5225

Product offer

9Product offer

STM32 MCUs and STM32 MPUs handle USB Type-C / USB Power Delivery interfacing by using the STM32 integrated UCPD (USB Type-C Power Delivery) peripheral, or a set of general-purpose (GP) peripherals. See USB Type-C and Power Delivery application page.

Figure 8. USB Type-C Power Delivery block diagram

Secure element

 

One chip

 

Dp/Dn

USB Power

 

Delivery

 

controller

USB Type-CTM

 

 

interface (PHY)

 

VBus

Power

Load switch

management

 

CC lines

Protection

USB

Type-CTM receptacle

Figure 9. STM32G0 Discovery kit USB Type-C analyser

AN5225 - Rev 3

page 17/64

 

 

AN5225

Product offer

STM32 MPU product specificities

For the STM32 MPU products, take into the consideration the following:

USB is only supported on Cortex-A7 core. No support on Cortex-M4 core.

For compatibility with Linux framework, USB Type-C is managed by external devices. Refer to MB1272- DK2-C01 board schematics on , CN7 implementation with STUSB1600 chipset (as opposed to CN6 implementation with ADC).

For more information, refer to section USB port using USB Type-C® receptacle in [8].

AN5225 - Rev 3

page 18/64

 

 

AN5225

Type-C with no power delivery

10 Type-C with no power delivery

This chapter may not fully apply to STM32 MPU products. Refer to Section 9 Product offer for their specificities.

10.1STM32 USB2.0-only device conversion for USB Type-C platforms

A USB2.0 legacy device needs to present itself as a UFP by means of an Rd pull-down resistor between the CC line and ground. It is assumed here that the maximum legacy USB 2.0 device current is needed, and it is therefore not necessary to monitor the CC lines.

Since the plug is reversible, the two DP/DN pairs need to be connected to each other as close as possible to the receptacle, before being routed to the STM32 device.

Figure 10. Legacy device using USB Type-C receptacle

Connector

Receptacle

CC1

CC2

Rd2

Rd1

5.1k +/-20%

5.1k +/-20%

 

DP1

 

DP2

 

DN1

 

DN2

 

GND

 

STM32x

USB_DP

USB_DN

10.2STM32 USB2.0 host conversion for USB Type-C platforms

This use case describes how to exchange a USB2.0 standard A receptacle for a USB Type-C® receptacle.

As the platform is designed for USB2.0, the maximum current capacity is 500 mA. If a higher supply current is available in the application, the Rp resistors can be adjusted to give 1.5 A or 3 A capability.

A USB2.0 legacy host needs to be configured as a DFP by means of a Rp pull up resistor between the CC line and the 5 V supply.

As the plug is reversible, the two DP/DN couples need to be connected in pairs as close as possible to the receptacle, before being routed to the STM32 device.

Monitoring CC lines through the ADC_IN inputs allow device-attachment detection and enabling of VBUS on the connector.

AN5225 - Rev 3

page 19/64

 

 

AN5225

STM32 legacy USB2.0 OTG conversion for USB Type-C platforms

Figure 11. Legacy host using USB Type-C receptacle

5V supply

 

 

STMPS2151

 

 

2

IN

EN

4

Connector

1

OUT

GND

5

 

receptacle

 

 

 

 

VBUS

VBUS

 

 

VBUS_enable

 

 

 

 

 

Rp1

 

 

Rp2

 

56k +/-5%

 

 

56k +/-5%

CC1

 

 

 

 

CC2

 

 

 

 

DP1

 

 

 

 

DP2

 

 

 

 

DN1

 

 

 

 

DN2

 

 

 

 

GND

 

 

 

 

STM32x

GPIO

ADC_IN1

ADC_IN2

USB_DP

USB_DN

10.3STM32 legacy USB2.0 OTG conversion for USB Type-C platforms

This use case explains how to exchange USB2.0 micro-AB receptacle for a USB Type-C® receptacle.

In this use case the platform is designed for USB2.0, so the maximum current capacity is 500 mA. If a higher supply current is available in the application, the Rp resistors can be adjusted to give 1.5 A or 3 A capability.

A legacy OTG platform starts to work as host or device depending on the USB_ID pin impedance to ground provided by the cable.

USB Type-C® is fully reversible, so the cable does not provide any role information. The role needs to be detected by sensing the CC lines (for example by using the ADC through its ADC_IN1 and ADC_IN2 inputs to detect the CC line level).

AN5225 - Rev 3

page 20/64

 

 

Loading...
+ 44 hidden pages