4.7 USB PD Communication Operational Model
4.7.2 Transmitting an SOP* USB PD Message with Greater than 128 Data
The TRANSMIT_BUFFER holds the content of the SOP* USB PD message to be transmitted. If DEVICE_CAPABILITIES_2.LongMessage is set to one, the TRANSMIT _BUFFER is capable of holding 264 byte SOP* messages that include the Message Header, Extended Message Header and the Data. The TCPC automatically increments the TRANSMIT_BUFFER.TX_BUF_BYTE_x offset when the TCPM writes to TRANSMIT_BUFFER.TX_BUF_BYTE_x. For example, after N number of bytes are written to the TRANSMIT_BUFFER.TX_BUF_BYTE_x, the next write to TRANSMIT_BUFFER.TX_BUF_BYTE_x occur at buffer offset N+1 byte. The TCPM may re-write the TRANSMIT_BUFFER.TX_BUF_BYTE_x beginning at offset 1 by writing the
COMMAND.ResetTransmitBuffer. If DEVICE_CAPABILITIES_2.LongMessage is set to one, the TCPM may write up to 132 bytes to the TX_BUF_BYTE_x in one burst. Otherwise
(DEVICE_CAPABILITIES_2.LongMessage is set to zero), a TCPM may write only up to 30 bytes to the TX_BUF_BYTE_x. If the TCPM writes more than 132 bytes into the TX_BUF_BYTE_x (when DEVICE_CAPABILITIES_2.LongMessage = 1b), the first 132 bytes are written but the remaining overflow bytes are discarded.
The TRANSMIT_BUFFER pointer is reset either when the TCPM writes to the TRANSMIT register or when the TCPM writes COMMAND.ResetTransmitBuffer (0xDD). A TCPC receiving a USB PD message shall not reset the TRANSMIT_BUFFER. If the TCPM writes to the
TRANSMIT register when the TRANSMIT_BUFFER pointer is reset (i.e. the transmit buffer pointer is less offset 3), the TCPC shall generate FAULT_STATUS.I2CInterfaceError.
The TCPM may write TCPC_CONTROL.EnableSMBusPEC = 1 to enable SMBus PEC. If an incorrect PEC is detected as the TCPM writes to TRANSMIT_BUFFER.TX_BUF_BYTE_x, the TCPC shall not automatically increment the TRANSMIT_BUFFER.TX_BUF_BYTE_x offset and shall generate a bit-level NAK to the PEC byte.
The steps for transmitting an SOP* USB PD message are as follows:
1. The TCPM writes COMMAND.ResetTransmitBuffer (0xDD) to reset the pointer of TRANSMIT_BUFFER to the beginning. This is only necessary if the TRANSMIT register has not been written and the contents of the
TRANSMIT_BUFFER.TX_BUF_BYTE_x was previously written.
2. The TCPM writes the TRANSMIT_BUFFER.I2C_WRITE_BYTE_COUNT (N1) and the first portion of the message to be transmitted into
TRANSMIT_BUFFER.TX_BUF_BYTE_x.
3. The TCPM writes the TRANSMIT_BUFFER.I2C_WRITE_BYTE_COUNT (N2) and the second portion of the message to be transmitted into
TRANSMIT_BUFFER.TX_BUF_BYTE_x. The TCPC inserts these content s into its internal transmit buffer starting at offset N1+1.
The TCPM writes the TRANSMIT_BUFFER.I2C_WRITE_BYTE_COUNT (N3) and the third portion of the message to be transmitted into
TRANSMIT_BUFFER.TX_BUF_BYTE_x. The TCPC inserts these bytes into its internal transmit buffer starting at offset N1+N2+1.
4. The TCPM may repeat Step3 until it has written the entire message.
5. TCPM writes to the TRANSMIT register to request transmitting an SOP* USB PD message with N1+N2+N3 byte count. By writing to the TRANSMIT register, the pointer of the TRANSMIT_BUFFER is reset. The TCPM must guarantee the bytes are written into the TRANSMIT_BUFFER before requesting the TCPC to place the USB PD message on the CC wire.
6. The outcome of the TRANSMIT register write reported by the TCPC may be one of three indications after asserting the Alert# pin:
If the TCPC PHY layer successfully transmits the message, the TCPC sets the TransmitSOP*MessageSuccessful bit in the ALERT register. The pointer of TRANSMIT_BUFFER is reset.
If the TCPC PHY layer did not get any response after retries, the TCPC sets the TransmitSOP*MessageFailed bit in the ALERT register. The pointer of TRANSMIT_BUFFER is reset.
If the transmission was discarded due to an incoming received message, the TCPC sets the TransmitSOP*MessageDiscarded bit in the ALERT register. The pointer of TRANSMIT_BUFFER is reset.
7. Before requesting another transmission, the TCPM clears the alert by writing a logical 1 to the asserted bit(s) in the ALERT register.
When transitioning through the steps of transmitting an SOP* USB PD message, the TCPC may assert ALERT.ReceiveSOP*MessageStatus or ALERT.ReceivedHardReset bit at any time to notify the TCPM that a message was received.
Example #1: Successful transmission of 260 data bytes in an Extended USB PD Message 1. The TCPM intends to transmit 260 data bytes in an Extended USB PD Message 2. The TCPM writes 133 total bytes: I2C_WRITE_BYTE_COUNT (132) +
TX_BUF_BYTE_0…TX_BUF_BYTE_131 (4 header bytes + the beginning 128 data bytes) 3. The TCPC moves the pointer of TRANSMIT_BUFFER to offset 133.
4. The TCPM writes 133 total bytes: I2C_WRITE_BYTE_COUNT (132) + TX_BUF_BYTE_0...TX_BUF_BYTE_131 (the remaining 132 data bytes) .
5. The TCPM writes to TRANSMIT register requesting SOP* transmission of 4 header bytes + 260 data bytes.
6. The TCPC PHY layer successfully transmits the 260 data byte USB PD message, the TCPC sets the TransmitSOP*MessageSuccessful bit in the ALERT register. The pointer of TRANSMIT_BUFFER is reset.
7. The TCPM clears ALERT.TransmitSOP*MessageSuccessful
Example #2: Abbreviated transaction. Successful transmission of 28 data bytes in a USB PD Message.
1. The TCPM intends to transmit 28 data bytes in a USB PD Message 2. The TCPM writes 17 total bytes: I2C_WRITE_BYTE_COUNT (30) +
TX_BUF_BYTE_0…TX_BUF_BYTE_15 (2 header bytes + 14 data bytes). The TCPM issues a Stop bit to abort the write transaction. The I2C write is ignored and the pointer of TRANSMIT_BUFFER remains at offset 1. The TCPC shall assert
FAULT_STATUS.I2CInterfaceError.
3. The TCPM intends to rewrite to transmit the previous 27 data bytes in a USB PD Message
4. The TCPM writes 31 total bytes: I2C_WRITE_BYTE_COUNT (30) + TX_BUF_BYTE_0…TX_BUF_BYTE_29 (2 header bytes + 28 data bytes).
5. The TCPC moves the pointer of TRANSMIT_BUFFER to offset 31
6. The TCPM writes to TRANSMIT register requesting SOP* transmission of 2 header bytes + 28 data bytes.
7. The TCPC PHY layer successfully transmits the 28 data byte USB PD message, the TCPC sets the TransmitSOP*MessageSuccessful bit in the ALERT register. The pointer of TRANSMIT_BUFFER is reset.
8. The TCPM clears ALERT.TransmitSOP*MessageSuccessful
Example #3: Using the SMBus PEC, successfully transmitting 260 data bytes in an Extended USB PD Message. As part of the initialization processes, the TCPM reads
DEVICE_CAPABILITIES_2.SMBusPEC = 1 to determine if the TCPC supports SMBus PEC, then TCPM writes TCPC_CONTROL.EnableSMBusPEC = 1 to enable the SMBus PEC. The TCPM may need to limit total number of byte (I2C_WRITE_BYTE_COUNT), to account for SMBus PEC CRC-8 error detection limitation.
1. The TCPM intends to transmit 260 data bytes in an Extended USB PD Message 2. The TCPM writes 134 total bytes: I2C_WRITE_BYTE_COUNT (132) +
TX_BUF_BYTE_0...TX_BUF_BYTE_131 (4 header bytes + the beginning 128 data bytes) + 1 PEC byte. The TCPC checks the validity of the PEC in real time. The TCPC
discovers an incorrect PEC and generates a bit-level NAK to the PEC byte. The pointer of TRANSMIT_BUFFER remains at offset 1.
3. The TCPM intends to rewrite to transmit the previous 260 data bytes Extended USB PD Message
4. The TCPM writes 134 total bytes: I2C_WRITE_BYTE_COUNT (132) +
TX_BUF_BYTE_0…TX_BUF_BYTE_131 (4 header bytes + the beginning 128 data bytes) + 1 PEC byte. The TCPC checks the validity of the PEC in real time. The CRC
calculated by TCPC matches the PEC byte and it generates a bit-level ACK to the PEC byte.
5. The TCPC moves the pointer of TRANSMIT_BUFFER to offset 133.
6. The TCPM writes 134 total bytes: I2C_WRITE_BYTE_COUNT (132) +
TX_BUF_BYTE_0...TX_BUF_BYTE_131 (the remaining 132 data bytes) + 1 PEC byte.
The TCPC checks the validity of the PEC in real time. The TCPC discovers an incorrect PEC and generates a bit-level NAK to the PEC byte. The pointer of
TRANSMIT_BUFFER remains at offset 133.
7. The TCPM intends to rewrite to the previous remaining 132 data bytes.
8. The TCPM writes 134 total bytes: I2C_WRITE_BYTE_COUNT (132) +
TX_BUF_BYTE_0...TX_BUF_BYTE_131 (the remaining 132 data bytes) + 1 PEC byte.
The TCPC checks the validity of the PEC in real time. The CRC calculated by TCP C matches the PEC byte and it generates a bit-level ACK to the PEC byte.
9. The TCPM writes to the TRANSMIT register requesting an SOP* transmission of 4 header bytes + 260 data bytes.
10. The TCPC PHY layer successfully transmits the 260 data byte USB PD message, the TCPC sets the TransmitSOP*MessageSuccessful bit in the ALERT register. The pointer of the TRANSMIT_BUFFER is reset.
11. The TCPM clears ALERT.TransmitSOP*MessageSuccessful.