USB Type-C and power delivery 101 – Power delivery protocol

May 15, 2017

gaya-May 15, 2017

As described in the first part of this two-part series, USB Type-C is the newly introduced and powerful interconnect standard for USB. When paired with the new Power Delivery (PD) specification, Type-C offers enhancements to the existing USB 3.1 interconnect that lower the cost and simplify the implementation of power delivery over USB.  In this article, we describe the USB Type-C power delivery protocol.

Figure 9 shows the PD message format. All PD messages are transmitted at 300KHz +/- 10% over the CC line.  The first 64 bits (Preamble) are an alternating 1, 0 pattern so that the receiver can synchronize with the actual transmitted clock. The next 16-bit word (Address or Type), contains the message address, indicating the message recipient or other type information (SOP* communication explained below). The next 16-bit field contains the message header, which is encoded as shown in Figure 9. The header field includes a data object count (#Data Objects).  If the data object count is 0, then the message type is “control.” If it is 1 through 7, then up to seven 32-bit data objects follow, and the message type is “data.” A 32-bit CRC is transmitted, followed by a 4-bit end of packet (EOP) token that completes the message. If the calculated CRC is the same as the received CRC, then the Type-C device physical layer passes the decoded message up to its protocol layer for decoding. Refer to the USB-PD specification for more details on the message structure.


Figure 9. PD message format (Source: Cypress Semiconductor)

The USB-PD specification defines two types of Messages (see Table 4):

  • Control Messages are short and manage the Message flow between Port Partners or for exchanging Messages that require no additional data.

  • Data Messages exchange information between a pair of Port Partners. Data messages include exposing capabilities and negotiating power, Built-In-Self-Test (BIST), and custom messaging defined by the OEM.

Table 4. PD Message Types: Control and Data (Source: Cypress Semiconductor)

Control Message

Description

GoodCRC

Message sent by the receiver to acknowledge that the previous Message was correctly received

GotoMin

It is a directive to the Sink Port to reduce its operating power level to the amount specified in the Minimum Operating Current field of its latest Sink Request Data Object

Accept

Sent by the recipient of certain messages like Request (during a power negotiation), DR_SWAP, PR_SWAP, VCONN_SWAP, etc. to signal that it is willing to do a power contract or role swaps

Reject

Sent by the recipient of certain messages like Request (sent by Sink during a power negotiation) to signal that it is unable to meet the power profiles requested by the Sink in Request message or as a reply to the messages like DR_SWAP, PR_SWAP, VCONN_SWAP, etc. to signal that it is unable to do role swaps

PS_RDY

[Power Supply Ready] Message sent by the Source (or by both the new Sink and new Source during the Power Role Swap sequence) to indicate its power supply has reached the desired operating condition

Get_Source_Cap

[Get Source Capability] Message sent by a Port to request the Source Capabilities and Dual-Role capability of its Port Partner (e.g. Dual-Role capable). The Port shall respond by returning a SourceCapabilities Message. A Sink Port, without Dual-Role capability, shall return a Reject Message

Get_Sink_Cap

[Get Sink Capability] Message sent by a Port to request the Sink Capabilities and Dual-Role capability of its Port Partner (e.g. Dual-Role capable). The Port shall respond by returning a Sink_Capabilities Message. A Source Port, without Dual-Role capability, shall return a Reject Message

DR_Swap

[Data Role Swap] Message used to swap the port’s data role (DFP / UFP) between the Port Partners both utilizing Type-C connectors while maintaining the direction of power flow over VBUS

PR_Swap

[Power Role Swap] Message used to swap the port power role (power provider / power consumer) between the Port Partners both utilizing Type-C connectors while maintaining the data role of the ports

Vconn_Swap

Message sent by either Port Partner to request an exchange of VCONN Source

Wait

Sent by the recipient of certain messages like Request (during a power negotiation), DR_SWAP, PR_SWAP, VCONN_SWAP, etc to signal that it is unable to meet the power profiles requested by the Sink in the Request message or unable to do role swaps at this point of time

SoftReset

Message initiated by either the Source or Sink to its Port Partner requesting a Soft Reset. It is used to recover from PD Protocol Layer errors.

Data Message

Description

SourceCapabilities

A Source Port shall report its capabilities in a series of 32-bit Power Data Objects as part of a SourceCapabilities Message. Power Data Objects (PDOs) are used to convey a Source Port’s capabilities to provide power

Request

Message sent by a Sink to request power, typically during the request phase of a power negotiation. The Request Data Object shall be returned by the Sink making a request for power

SinkCapabilites

A Sink Port shall report power level capabilities in a series of 32-bit Power Data Objects. These are returned as part of a SinkCapabilities Message in response to a Get_Sink_Cap Message. This is similar to that used for Source Port capabilities with equivalent Power Data Objects for Fixed, Variable and Battery Supplies as defined in this section. Power Data Objects are used to convey the Sink Port’s operational power requirements

BIST

[Built In Self-Test] Message sent to request the Port to enter Physical Layer test mode

VendorDefined

[Vendor Define Message – VDM] Message provided to allow vendors to exchange information outside of that defined by the USB-PD specification


Figure 10. Successful Power Negotiation. Note: Rqt – Request; Ack – Acknowledge; VDM – Vendor Defined message (Source: Cypress Semiconductor)

Figure 10 shows the message flow during a successful power negotiation between any two generic PD-enabled Type-C devices connected by an Electronically Marked Type-C cable (see Figure 11).  Note that each command and data message is acknowledged by the receiver of the message, which sends a GoodCRC response back to the initiator (not shown in Figure 10).


Figure 11. Type-C connection with EMCA (Source: Cypress Semiconductor)

  • The DRP, which got locked as a DFP (Source), first discovers the presence of an EMCA attached due to the presence of Ra. It queries for the characteristics of the cable by sending the DiscoverIdentity

  • The cable responds with the cable characteristics using the DiscoverIdentity ACK response message (see Figure 10).

  • The DFP (Source) also detects the presence of a UFP (Sink) due to the Rd The DFP (Source) then sends the source capabilities message to the UFP (Sink) that represents the DFP (Source) power supply’s present capabilities as in Figure 10. In Figure 10, this message sends out the power supply capability as the ability to source 5 V at 3 A and 9 V at 3 A.

  • The UFP (Sink) then uses a Request message for, in this case, 3 A of current at 9 V.

  • The DFP (Source) sends an Accept message and then sends a PS_RDY message as an indication that the source is ready to start sourcing the new power level on VBUS.

The UFP (Sink), on detecting VBUS, could start enumeration if it had USB data channels.

Continue reading on page two >>

 

< Previous
Page 1 of 2
Next >

Loading comments...