Teledyne LeCroy Lecroy USB-TMA2-M02-X Manual

USB Power Delivery Exerciser
Manual
Manual Version 1.46
For USB Protocol Suite Software Version 7.45 and above
February 2017
1
Document Disclaimer
The information contained in this document has been carefully checked and is believed to be reliable. However, no responsibility can be assumed for inaccuracies that may not have been detected.
Teledyne LeCroy reserves the right to revise the information presented in this document without notice or penalty.
Trademarks and Servicemarks
CATC Trace, Voyager M310C, Voyager ReadyLink, USB Protocol Suite, and BusEngine are trademarks of Teledyne LeCroy.
All other trademarks are property of their respective companies.
Copyright
Copyright © 2015, Teledyne LeCroy, Inc. All Rights Reserved.
This document may be printed and reproduced without additional permission, but all copies should contain this copyright notice.
Version
This is version 1.46 of the USB Power Delivery Exerciser Manual.
This manual applies to USB Protocol Suite software version 7.45 and higher.
2
3
Contents
1 INTRODUCTION ..................................................................................................................... 12
2 Packet Templates ............................................................................................................. 14
2.1 PD_ControlMessage .................................................................................................. 14
2.2 PD_GoodCrcMessage ................................................................................................ 14
2.3 PD_GotoMinMessage ............................................................................................... 14
2.4 PD_AcceptMessage ................................................................................................... 14
2.5 PD_RejectMessage .................................................................................................... 14
2.6 PD_PingMessage ....................................................................................................... 14
2.7 PD_PsRdyMessage .................................................................................................... 15
2.8 PD_GetSourceCapMessage ....................................................................................... 15
2.9 PD_GetSinkCapMessage ........................................................................................... 15
2.10 PD_DataRoleSwapMessage ................................................................................... 15
2.11 PD_PowerRoleSwapMessage ................................................................................ 15
2.12 PD_VConnSwapMessage ....................................................................................... 15
2.13 PD_WaitMessage ................................................................................................... 15
2.14 PD_SoftResetMessage ........................................................................................... 15
2.15 PD_NotSupportedMsg ........................................................................................... 15
2.16 PD_GetSourceCapExtendedMsg ........................................................................... 15
2.17 PD_GetStatusMsg .................................................................................................. 16
2.18 PD_FRSwapMsg ..................................................................................................... 16
2.19 PD_SourceCapabilitiesMessage ............................................................................ 16
2.19.1 PD_PowerDataObjectFixedSupply_Source ........................................................ 16
2.19.2 PD_PDOFixedSupplyNotVSafe5V_Source .......................................................... 16
2.19.3 PD_PowerDataObjectVariableSupply_Source ................................................... 17
2.19.4 PD_PowerDataObjectBatterySupply_Source .................................................... 17
2.20 PD_SinkCapabilitiesMessage ................................................................................. 17
2.20.1 PD_PowerDataObjectFixedSupply_Sink ............................................................ 17
2.20.2 PD_PowerDataObjectVariableSupply_Sink ....................................................... 18
2.20.3 PD_PowerDataObjectBatterySupply_Sink ......................................................... 18
2.21 PD_RequestPacket ................................................................................................. 18
2.21.1 PD_RequestDataObject_Fixed_Variable_NoGiveBack ...................................... 18
4
2.21.2 PD_RequestDataObject_Fixed_Variable_GiveBack ........................................... 19
2.21.3 PD_RequestDataObject_Battery_NoGiveBack .................................................. 19
2.21.4 PD_RequestDataObject_Battery_GiveBack ....................................................... 19
2.22 PD_BISTCarrierModeMessage ............................................................................... 19
2.23 PD_BISTTestDataMessage ..................................................................................... 19
2.24 PD_BatteryStatusMsg ............................................................................................ 19
2.25 PD_AlertMsg .......................................................................................................... 20
2.26 PD_VDM_Unstructured_Header ........................................................................... 20
2.27 PD_VDM_Structured_Header ............................................................................... 20
2.28 PD_VDM_Discover_Identity_Message .................................................................. 21
2.29 PD_VDM_Discover_Identity_Response ................................................................ 21
2.29.1 PD_VDM_Discover_Identity_ID_Header_VDO .................................................. 21
2.29.1.1 Revision 2.0 ........................................................................................................... 21
2.29.1.2 Revision 3.0 ........................................................................................................... 21
2.29.2 PD_VDM_Discover_Identity_Cert_Stat_VDO .................................................... 22
2.29.3 PD_VDM_Discover_Identity_Product_VDO ...................................................... 22
2.29.4 PD_VDM_Discover_Identity_Cable_VDO .......................................................... 22
2.29.5 PD_DiscoverIdPassiveCableVdo ......................................................................... 22
2.29.6 PD_DiscoverIdActiveCableVdo .......................................................................... 23
2.29.7 PD_VDM_Discover_Identity_Alternate_Mode_Adapter_VDO ......................... 23
2.29.7.1 Revision 2.0 ........................................................................................................... 23
2.29.7.2 Revision 3.0 ........................................................................................................... 24
2.30 PD_VDM_Discover_Svids_Message ...................................................................... 24
2.31 PD_VDM_Discover_Svids_Response ..................................................................... 24
2.31.1 Discover_SVIDs_Responder_VDO ...................................................................... 24
2.32 PD_VDM_Discover_Modes_Message ................................................................... 24
2.33 PD_VDM_Discover_Modes_Response .................................................................. 24
2.33.1 PD_VDO .............................................................................................................. 25
2.33.2 PD_VDM_DisplayPort_DiscoverMode_Vdo ...................................................... 25
2.34 PD_VDM_Enter_Mode_Message .......................................................................... 25
2.35 PD_VDM_Enter_Mode_Response ......................................................................... 25
2.36 PD_VDM_Exit_Mode_Message ............................................................................. 25
5
2.37 PD_VDM_Exit_Mode_Response ........................................................................... 26
2.38 PD_VDM_Attention_Message ............................................................................... 26
2.39 PD_VDM_DisplayPort_UpdateStatus_Message ................................................... 26
2.39.1 PD_VDM_DisplayPort_Status_VDO ................................................................... 26
2.40 PD_VDM_DisplayPort_UpdateStatus_Response .................................................. 26
2.41 PD_VDM_DisplayPort_Configure_Message .......................................................... 27
2.41.1 PD_VDM_DisplayPort_Configure_VDO ............................................................. 27
2.42 PD_VDM_DisplayPort_Configure_Response ........................................................ 27
2.43 PD_ExtMsgHeaders ............................................................................................... 27
2.44 PD_SourceCapExtendedMsg ................................................................................. 27
2.45 PD_StatusMsg ........................................................................................................ 28
2.46 PD_GetBatteryCapMsg .......................................................................................... 29
2.47 PD_GetBatteryStatusMsg ...................................................................................... 29
2.48 PD_BatteryCapabilitiesMsg ................................................................................... 29
2.49 PD_GetManufacturerInfoMsg ............................................................................... 29
2.50 PD_ManufacturerInfoMsg ..................................................................................... 29
2.51 PD_SecurityRequestMsg ....................................................................................... 30
2.51.1 PD_SRQDB_GetDigests ...................................................................................... 30
2.51.2 PD_SRQDB_GetCertificate ................................................................................. 30
2.51.3 PD_SRQDB_Challenge ........................................................................................ 30
2.52 PD_SecurityResponseMsg ..................................................................................... 31
2.52.1 PD_SRPDB_Digests ............................................................................................. 31
2.52.1.1 PD_Security_Digest ............................................................................................... 31
2.52.2 PD_SRPDB_Certificate ....................................................................................... 31
2.52.3 PD_SRPDB_ChallengeAuth ................................................................................ 31
2.52.4 PD_SRPDB_Error ................................................................................................ 32
3 Type-C Commands ........................................................................................................... 33
3.1 PD_SetResistorRp ...................................................................................................... 33
3.2 PD_SetResistorRd ...................................................................................................... 33
3.3 PD_SetResistorRa ...................................................................................................... 34
3.4 PD_SetVBusCap10MicroFarad .................................................................................. 34
3.5 PD_SetVBusCap1MicroFarad .................................................................................... 34
6
3.6 PD_SetVBus ............................................................................................................... 35
3.7 PD_SetVConn ............................................................................................................ 35
3.8 PD_SetLoadOnVBus .................................................................................................. 35
3.9 PD_TerminateCCLines ............................................................................................... 36
3.10 PD_SetStartDRPSetting .......................................................................................... 36
3.11 PD_StartDRP .......................................................................................................... 37
3.12 PD_SetStartSourceSetting ..................................................................................... 37
3.13 PD_StartSource ...................................................................................................... 38
3.14 PD_SetStartSinkSetting .......................................................................................... 38
3.15 PD_StartSink .......................................................................................................... 39
4 Basic Commands .............................................................................................................. 40
4.1 PD_SendPacket ......................................................................................................... 40
4.2 PD_SendPacket_Cable .............................................................................................. 41
4.3 PD_SendCorruptedPacket ......................................................................................... 42
4.4 PD_ReceivePacket ..................................................................................................... 43
4.5 PD_SendSoftReset ..................................................................................................... 45
4.6 PD_SendHardReset ................................................................................................... 45
4.7 PD_SendCableReset .................................................................................................. 46
4.8 PD_Delay ................................................................................................................... 46
4.9 PD_SetRoles .............................................................................................................. 46
4.10 PD_Set.................................................................................................................... 47
4.11 IfMatched/ElseMatched ........................................................................................ 49
4.12 PD_Loop ................................................................................................................. 51
4.13 PD_TimerLoop ....................................................................................................... 51
4.14 PD_BreakLoop ....................................................................................................... 52
4.15 PD_ContinueLoop .................................................................................................. 52
4.16 PD_Stop ................................................................................................................. 53
4.17 PD_Disconnect ....................................................................................................... 53
4.18 PD_ResumeUSB2Exerciser .................................................................................... 54
4.19 PD_ReportUSB3TermStatus .................................................................................. 54
4.20 PD_IncreaseMsgId ................................................................................................. 54
4.21 PD_DecreaseMsgId ................................................................................................ 55
7
4.22 PD_IncreaseMsgId_Cable ...................................................................................... 55
4.23 PD_DecreaseMsgId_Cable ..................................................................................... 55
5 Transaction Engine™ ........................................................................................................ 57
5.1 High Level Commands ............................................................................................... 57
5.1.1 PD_SetWorkingRevision .................................................................................... 57
5.1.2 PD_SetNegotiationSetting_Source .................................................................... 57
5.1.3 PD_AddSourceCap ............................................................................................. 58
5.1.4 PD_ResetSourceCaps ......................................................................................... 59
5.1.5 PD_NegotiatePower_Source ............................................................................. 59
5.1.6 PD_SetNegotiationSetting_Sink......................................................................... 60
5.1.7 PD_AddSinkCap .................................................................................................. 61
5.1.8 PD_ResetSinkCaps .............................................................................................. 61
5.1.9 PD_NegotiatePower_Sink .................................................................................. 62
5.1.10 PD_WaitForNegotiatePower ............................................................................. 62
5.1.11 PD_NegotiatePower........................................................................................... 63
5.1.12 PD_SetSwapPowerRoleSetting .......................................................................... 63
5.1.13 PD_SwapPowerRole ........................................................................................... 64
5.1.14 PD_WaitForSwapPowerRole .............................................................................. 65
5.1.15 PD_FastRoleSwap .............................................................................................. 65
5.1.16 PD_SetSwapDataRoleSetting ............................................................................. 66
5.1.17 PD_SwapDataRole ............................................................................................. 66
5.1.18 PD_WaitForSwapDataRole ................................................................................ 67
5.1.19 PD_SetSwapVConnSetting ................................................................................. 68
5.1.20 PD_SwapVConn .................................................................................................. 68
5.1.21 PD_WaitForSwapVConn .................................................................................... 69
5.1.22 PD_SetGotoMinSetting ...................................................................................... 69
5.1.23 PD_GotoMin ...................................................................................................... 70
5.1.24 PD_WaitForGotoMin ......................................................................................... 70
5.1.25 PD_SetGetSourceCapSetting ............................................................................. 71
5.1.26 PD_GetSourceCapabilities ................................................................................. 72
5.1.27 PD_WaitForGetSourceCapabilities .................................................................... 72
5.1.28 PD_SetGetSinkCapSetting .................................................................................. 73
5.1.29 PD_GetSinkCapabilities ...................................................................................... 73
5.1.30 PD_WaitForGetSinkCapabilities ......................................................................... 74
5.1.31 PD_SendBISTCarrierMode ................................................................................. 74
5.1.32 PD_SendBISTTestData........................................................................................ 75
5.1.33 PD_GetSourceCapExtended ............................................................................... 75
5.1.34 PD_SetGetSrcCapExtSetting .............................................................................. 76
5.1.35 PD_WaitForGetSrcCapExtended ........................................................................ 77
5.1.36 PD_SetSrcCapExtDataBlock ............................................................................... 77
5.1.37 PD_ResetSrcCapExtDataBlock ........................................................................... 78
5.1.38 PD_GetStatus ..................................................................................................... 78
5.1.39 PD_SetGetStatusSetting .................................................................................... 78
5.1.40 PD_WaitForGetStatus ........................................................................................ 79
5.1.41 PD_SetStatusDataBlock ..................................................................................... 80
5.1.42 PD_ResetStatusDataBlock.................................................................................. 80
5.1.43 PD_GetBatteryStatus ......................................................................................... 80
5.1.44 PD_SetGetBatteryStatusDataBlock .................................................................... 81
5.1.45 PD_SetGetBatteryStatusSetting......................................................................... 81
5.1.46 PD_WaitForGetBatteryStatus ............................................................................ 82
5.1.47 PD_SetBatteryStatusDO ..................................................................................... 82
5.1.48 PD_ResetBatteryStatusDO ................................................................................. 83
5.1.49 PD_Alert ............................................................................................................. 83
5.1.50 PD_SetAlertDO ................................................................................................... 83
5.1.51 PD_SetAlertSetting ............................................................................................ 84
5.1.52 PD_WaitForAlert ................................................................................................ 84
5.1.53 PD_GetBatteryCap ............................................................................................. 85
5.1.54 PD_SetGetBatteryCapDataBlock........................................................................ 85
5.1.55 PD_SetGetBatteryCapSetting ............................................................................ 86
5.1.56 PD_WaitForGetBatteryCap ................................................................................ 86
5.1.57 PD_SetBatteryCapDataBlock ............................................................................. 87
5.1.58 PD_ResetBatteryCapDataBlock ......................................................................... 87
5.1.59 PD_GetManufacturerInfo .................................................................................. 88
5.1.60 PD_SetGetManufacturerInfoDataBlock ............................................................. 88
8
9
5.1.61 PD_SetGetManufacturerInfoSetting .................................................................. 89
5.1.62 PD_WaitForGetManufacturerInfo ..................................................................... 89
5.1.63 PD_SetManufacturerInfoDataBlock .................................................................. 90
5.1.64 PD_SetSecurityRequestSetting .......................................................................... 90
5.1.65 PD_SecurityRequest ........................................................................................... 90
5.1.66 PD_SetSecurityRequestDataBlock ..................................................................... 91
5.1.67 PD_WaitForSecurityRequest .............................................................................. 91
5.1.68 PD_SetSecurityResponseDataBlock ................................................................... 92
5.1.69 PD_SetDiscoverIdentitySetting .......................................................................... 92
5.1.70 PD_AddDiscoverIdentityVDO ............................................................................. 93
5.1.71 PD_ResetDiscoverIdentityVDO .......................................................................... 93
5.1.72 PD_DiscoverIdentity .......................................................................................... 94
5.1.73 PD_WaitForDiscoverIdentity ............................................................................. 94
5.1.74 PD_SetDiscoverSVIDSetting ............................................................................... 95
5.1.75 PD_AddSvid ........................................................................................................ 96
5.1.76 PD_ResetSvids .................................................................................................... 96
5.1.77 PD_DiscoverSvids ............................................................................................... 96
5.1.78 PD_WaitForDiscoverSvids .................................................................................. 97
5.1.79 PD_SetDiscoverModeSetting ............................................................................. 98
5.1.80 PD_AddMode ..................................................................................................... 98
5.1.81 PD_AddModeVDO ............................................................................................. 99
5.1.82 PD_ResetModes ................................................................................................. 99
5.1.83 PD_DiscoverModes ............................................................................................ 99
5.1.84 PD_WaitForDiscoverModes ............................................................................. 100
5.1.85 PD_SetEnterModeSetting ................................................................................ 101
5.1.86 PD_EnterMode ................................................................................................. 101
5.1.87 PD_EnterModeVdo .......................................................................................... 102
5.1.88 PD_WaitForEnterMode.................................................................................... 103
5.1.89 PD_SetExitModeSetting ................................................................................... 103
5.1.90 PD_ExitMode ................................................................................................... 104
5.1.91 PD_WaitForExitMode ...................................................................................... 104
5.1.92 PD_Attention ................................................................................................... 105
10
5.1.93 PD_AttentionVdo ............................................................................................. 105
5.1.94 PD_SetDiscoveryProcessSetting ...................................................................... 106
5.1.95 PD_PerformDiscoveryProcess ......................................................................... 107
5.1.96 PD_SetDisplayPortSetting ................................................................................ 107
5.1.97 PD_DisplayPort_UpdateStatus ........................................................................ 108
5.1.98 PD_DisplayPort_Configure............................................................................... 109
5.1.99 PD_WaitForDisplayPortStatus ......................................................................... 109
5.1.100 PD_WaitForDisplayPortConfigure ................................................................ 110
5.1.101 PD_SetDiscoverIdentitySetting_Cable ......................................................... 110
5.1.102 PD_WaitForDiscoverIdentity_Cable ............................................................. 111
5.1.103 PD_AddDiscoverIdentityVDO_Cable ............................................................ 111
5.1.104 PD_ResetDiscoverIdentityVDO_Cable ......................................................... 112
5.1.105 PD_SetDiscoverSVIDSetting_Cable .............................................................. 112
5.1.106 PD_WaitForDiscoverSvids_Cable ................................................................. 113
5.1.107 PD_AddSvid_Cable ....................................................................................... 113
5.1.108 PD_ResetSvids_Cable ................................................................................... 114
5.1.109 PD_SetDiscoverModeSetting_Cable ............................................................ 114
5.1.110 PD_WaitForDiscoverModes_Cable .............................................................. 115
5.1.111 PD_AddModeVDO_Cable ............................................................................. 115
5.1.112 PD_AddMode_Cable .................................................................................... 116
5.1.113 PD_ResetModes_Cable ................................................................................ 116
5.1.114 PD_SetEnterModeSetting_Cable ................................................................. 117
5.1.115 PD_WaitForEnterMode_Cable ..................................................................... 117
5.1.116 PD_SetExitModeSetting_Cable .................................................................... 118
5.1.117 PD_WaitForExitMode_Cable ........................................................................ 118
5.1.118 PD_SetManufacturerInfoDataBlock_Cable .................................................. 119
5.1.119 PD_SetGetManufacturerInfoSetting_Cable ................................................. 119
5.1.120 PD_WaitForGetManufacturerInfo_Cable .................................................... 120
5.1.121 PD_SetSecurityResponseDataBlock_Cable .................................................. 121
5.1.122 PD_SetSecurityRequestSetting_Cable ......................................................... 121
5.1.123 PD_WaitForSecurityRequest_Cable ............................................................. 122
5.2 Auto Responses Capability ...................................................................................... 122
11
5.2.1 PD_DelayAutoResponse .................................................................................. 122
12
1 INTRODUCTION
Integrated in Teledyne LeCroy’s Voyager M310C test platform, the Power Delivery exerciser supports traffic generation, including both provider and consumer device emulation. The Power Delivery exerciser continues to evolve with each software release. Be sure to check for updated software and firmware before getting started with the Exerciser.
Important Licensing Note:
Operating the PD Exerciser beta requires that the USB Power Delivery
Exerciser option is enabled on the M310C base unit:
Getting Started:
The “left” port of the Voyager should be used to
connect DUT to the PD Exerciser. The PD exerciser also requires specific cable orientation (Red LED when connected wrong side-up).
To enable the PD Trainer/Exerciser, use the PD Tab under “Recording Options”
to select the Exerciser mode.
NoteAllow VBUS > 5v is a safety feature which prevents sourcing above 5V. When enabled, this mode will allow Voltage levels to be delivered to the DUT which may exceed their current carrying capabilities. While the M310C system is designed to tolerate higher current, these higher voltages may inadvertently cause damage to devices/cables under test.
To set devices port name, use the General Tab under “Recording Options” to add
“alias labels” for your DUTs.
These labels will appear in the trace capture.
The Alias name is primarily for use in analyzer mode and requires that device names are added before recording traffic. The device naming can also be used in Exerciser mode; however message frames from the Voyager M310C will be always be labeled “M310C”.
15
2.7 PD_PsRdyMessage
PD_PsRdyMessage packet template has same fields as PD_ControlMessage but default value for MessageType is 6.
2.8 PD_GetSourceCapMessage
PD_GetSourceCapMessage packet template has same fields as PD_ControlMessage but default
value for MessageType is 7.
2.9 PD_GetSinkCapMessage
PD_GetSinkCapMessage packet template has same fields as PD_ControlMessage but default
value for MessageType is 8.
2.10 PD_DataRoleSwapMessage
PD_DataRoleSwapMessage packet template has same fields as PD_ControlMessage but default
value for MessageType is 9.
2.11 PD_PowerRoleSwapMessage
PD_PowerRoleSwapMessage packet template has same fields as PD_ControlMessage but default
value for MessageType is 10.
2.12 PD_VConnSwapMessage
PD_VConnSwapMessage packet template has same fields as PD_ControlMessage but default
value for MessageType is 11.
2.13 PD_WaitMessage
PD_WaitMessage packet template has same fields as PD_ControlMessage but default value for MessageType is 12.
2.14 PD_SoftResetMessage
PD_SoftResetMessage packet template has same fields as PD_ControlMessage but default
value for MessageType is 13.
2.15 PD_NotSupportedMsg
PD_NotSupportedMsg packet template has same fields as PD_ControlMessage but default value
for MessageType is 16. Applied to Power Delivery Rev3.0.
2.16 PD_GetSourceCapExtendedMsg
PD_GetSourceCapExtendedMsg packet template has same fields as PD_ControlMessage but
default value for MessageType is 17. Applied to Power Delivery Rev3.0.
33
3 Type-C Commands
In addition to Power Delivery commands, PD Exerciser also provides a command set to manage USB Type-C connection . It includes some low level commands for manipulating voltages, capacitors and resistors as well as some high level commands that let you have SINK, SINKAS, SOURCE and DRP state machines, described in Type-C specification, with the facilities to customize different behaviors and characteristics. Note that at the present, Type-C state machines are just followed when related commands are running. In other words, Type-C state machines are not followed in parallel to other Power Delivery commands execution.
3.1 PD_SetResistorRp
Sets resistor Rp On/Off.
Format
Call PD_SetResistorRp( state, current, line )
Parameters
state
Possible values: PD_ON, PD_OFF
current
Possible values:
CC_RP_CUR_DEFAULT CC_RP_CUR_1_5 CC_RP_CUR_3_0
line
Possible values:
CC_LINE_1 CC_LINE_2 CC_LINE_ALL
Examples
Call PD_SetResistorRP( PD_ON, CC_RP_CUR_1_5, CC_LINE_2 )
3.2 PD_SetResistorRd
Sets resistor Rd On/Off.
Format
Call PD_SetResistorRd( state, line )
Parameters
state
Possible values: PD_ON
PD_OFF
line
Possible values:
CC_LINE_1 CC_LINE_2
34
CC_LINE_ALL
Examples
Call PD_SetResistorRd( PD_ON, CC_LINE_1 )
3.3 PD_SetResistorRa
Sets resistor Ra On/Off.
Format
Call PD_SetResistorRa( state, line )
Parameters
state
Possible values:
PD_ON PD_OFF
line
Possible values:
CC_LINE_1 CC_LINE_2 CC_LINE_ALL
Examples
Call PD_SetResistorRa( PD_ON, CC_LINE_2 )
3.4 PD_SetVBusCap10MicroFarad
Sets the VBus Capacitor(10 Micro Farad) On/Off.
Format
Call PD_SetVBusCap10MicroFarad( state )
Parameters
state
Possible values:
PD_ON PD_OFF
Examples
Call PD_SetVBusCap10MicroFarad( PD_ON )
3.5 PD_SetVBusCap1MicroFarad
Sets the VBus Capacitor(1 Micro Farad) On/Off.
Format
Call PD_SetVBusCap1MicroFarad( state )
Parameters
state
Possible values:
PD_ON
35
PD_OFF
Examples
Call PD_SetVBusCap1MicroFarad( PD_ON )
3.6 PD_SetVBus
Sets VBus On/Off.
Format
Call PD_SetVBus( state, voltage_milli_volt )
Parameters
state
Possible values:
PD_ON PD_OFF
voltage_milli_volt
The voltage which applied on VBus. Voltage should be in range of 5000 to 20500 mV. In order to apply voltages greater than 5V, the corresponding check box should be set in recording options.
Examples
Call PD_SetVBus( PD_ON, 5000 )
3.7 PD_SetVConn
Sets VConn On/Off.
Format
Call PD_SetVConn( state )
Parameters
state
Possible values:
PD_ON PD_OFF
Examples
Call PD_SetVConn( PD_ON )
3.8 PD_SetLoadOnVBus
Enables/Disables load on VBus.
Format
Call PD_SetLoadOnVBus( state )
Parameters
state
Possible values:
PD_ON PD_OFF
AdvertizedCurrent
When WithAccessory setting is PD_TRUE: indicates advertised current level on Rp. Default: CC_RP_CUR_1_5
StartWithSNK
Applies when WithAccessory setting is PD_TRUE. If is set to PD_FALSE, SINKAS state machine starts from Unattached.Accessory state instead of Unattached.SNK state. Default: PD_TRUE
AccessoryStateDuration
When WithAccessory setting is PD_TRUE: indicates the time that Execiser stays in Powered.Accessory or Audio.Accessory states. Default: 1000000 us
PoweredAccessoryExitState
When WithAccessory setting is PD_TRUE: indicates the exit state from Powered.Accessory state. Default: PD_TYPE_C_STATE_NONE
Result
Result Values
Description
PD_RESULT_OK
PD_RESULT_FAILED
None
Examples
$startsnk_setting = PD_Start_Sink_Settings {
WithAccessory = PD_TRUE } Call PD_SetStartSinkSetting( $startsnk_setting )
3.15 PD_StartSink
It starts SINK or SINKAS state machine for connecting to a Type-C device. The command is terminated if timeout occurs or Exerciser transitions to Attached.SNK. When Exerciser acts as SINKAS, with no exit state for Powered.Accessory state, that state will be the last state and command is terminated after specified time for this state duration.
Format
Call PD_StartSink()
Parameters
None
Result
Examples
Call PD_StartSink()
39
46
None
Result
None
Examples
Call PD_SendHardReset()
4.7 PD_SendCableReset
Sends Cable Reset and resets all the cable related states in protocol layer.
Format
Call PD_SendCableReset()
Parameters
None
Result
None
Examples
Call PD_SendCableReset()
4.8 PD_Delay
Delays Exerciser execution for specified time.
Format
Call PD_Delay( delay_value )
Parameters
delay_value
Delay in micro seconds.
Result
None
Examples
#calling PD_Delay
Call PD_Delay(15000)
4.9 PD_SetRoles
Sets data role and power role of Exerciser.
Format
Call PD_SetRoles( DataRole, PowerRole )
Parameters
51
#check for result
IfMatched( $PdResult.Result, PD_RESULT_OK, PD_COMPARE_EQUAL ) { Call PD_ReceivePacket( $receive_settings ) } ElseMatched( $PdResult.Result, PD_RESULT_FAILED, PD_COMPARE_EQUAL ) { Call PD_SendHardReset() } ElseMatched { $ping_msg = PD_PingMessage Call PD_SendPacket( $ping_msg, $send_setting ) } IfMatchedEnd
4.12 PD_Loop
Using this command you can create a loop containing other Exerciser commands.
Note - The limit for using nested PD_Loop() commands is 8.
Format
PD_Loop(count)
{
#command list
}
Parameters
count
Loop count
Result
None
Examples
$send_setting = PD_SendPacketSettings { OrderedSetType = PD_ORDERED_SET_TYPE_SOP } $ping_msg = PD_PingMessage
PD_Loop(3) { call PD_SendPacket( $ping_msg, $send_setting ) }
4.13 PD_TimerLoop
Using this command you can create a loop(containing other Exerciser commands) which is bound to a predefined timer. On timer timeout, the loop will exit.
Note - The limit for using nested PD_TimerLoop() commands is 8.
Format
PD_TimerLoop(timeout)
{
#command list
}
Parameters
52
timeout
Loop duration in Micro Seconds.
Result
None
Examples
$send_setting = PD_SendPacketSettings { OrderedSetType = PD_ORDERED_SET_TYPE_SOP } $ping_msg = PD_PingMessage
# Sending Ping message for 200ms
PD_TimerLoop(200000) { call PD_SendPacket( $ping_msg, $send_setting ) }
4.14 PD_BreakLoop
Breaks the PD_Loop and PD_TimerLoop commands.
Format
PD_BreakLoop()
Parameters
None
Result
None
Examples
$send_setting = PD_SendPacketSettings { OrderedSetType = PD_ORDERED_SET_TYPE_SOP }
PD_Loop(3) { PD_Loop(2) { $accept_msg = PD_AcceptMessage call PD_SendPacket( $accept_msg, $send_setting ) }
$ping_msg = PD_PingMessage call PD_SendPacket( $ping_msg, $send_setting )
IfMatched( $PdResult.Result, PD_RESULT_OK, PD_COMPARE_EQUAL ) { PD_BreakLoop() } IfMatchedEnd }
4.15 PD_ContinueLoop
Continue command for PD_Loop and PD_TimerLoop comamnds.
Format
PD_ContinueLoop()
53
Parameters
None
Result
None
Examples
$send_setting = PD_SendPacketSettings { OrderedSetType = PD_ORDERED_SET_TYPE_SOP }
PD_Loop(3) { $ping_msg = PD_PingMessage call PD_SendPacket( $ping_msg, $send_setting )
IfMatched( $PdResult.Result, PD_RESULT_OK, PD_COMPARE_EQUAL ) { PD_ContinueLoop() } IfMatchedEnd
Call PD_SendSoftReset( PD_ORDERED_SET_TYPE_SOP ) }
4.16 PD_Stop
Stops the Exerciser.
Format
Call PD_Stop( return_value )
Parameters
return_value
Value returned to Exerciser.
Result
None
Examples
Call PD_Stop(0)
4.17 PD_Disconnect
Simulates cable detach.
Format
Call PD_Disconnect()
Parameters
None
Result
None
Examples
54
Call PD_Disconnect()
4.18 PD_ResumeUSB2Exerciser
Resumes USB2 Exerciser execution. Not intended or supported for Customer Use.
Format
Call PD_ResumeUSB2Exerciser()
Parameters
None
Result
None
Examples
Call PD_ResumeUSB2Exerciser()
4.19 PD_ReportUSB3TermStatus
Reports USB3 TermStatus. Not intended or supported for Customer Use.
Format
Call PD_ReportUSB3TermStatus()
Parameters
None
Result
None
Examples
Call PD_ReportUSB3TermStatus()
4.20 PD_IncreaseMsgId
Increase Message ID(Exerciser mode: DFP/UFP).
Format
Call PD_IncreaseMsgId(OrderedSetType)
Parameters
OrderedSetType
Indicates the OrderedSet type. Possible values:
PD_ORDERED_SET_TYPE_SOP PD_ORDERED_SET_TYPE_SOP_PRIME PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME
Result
None
55
Examples
Call PD_IncreaseMsgId(PD_ORDERED_SET_TYPE_SOP)
4.21 PD_DecreaseMsgId
Decrease Message ID(Exerciser mode: DFP/UFP).
Format
Call PD_DecreaseMsgId(OrderedSetType)
Parameters
OrderedSetType
Indicates the OrderedSet type. Possible values:
PD_ORDERED_SET_TYPE_SOP PD_ORDERED_SET_TYPE_SOP_PRIME PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME
Result
None
Examples
Call PD_DecreaseMsgId(PD_ORDERED_SET_TYPE_SOP)
4.22 PD_IncreaseMsgId_Cable
Increase Message ID(Exerciser mode: Cable Emulator).
Format
Call PD_IncreaseMsgId_Cable(OrderedSetType)
Parameters
OrderedSetType
Indicates the OrderedSet type. Possible values:
PD_ORDERED_SET_TYPE_SOP_PRIME PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME
Result
None
Examples
Call PD_IncreaseMsgId_Cable(PD_ORDERED_SET_TYPE_SOP_PRIME)
4.23 PD_DecreaseMsgId_Cable
Decrease Message ID(Exerciser mode: Cable Emulator).
Format
Call PD_DecreaseMsgId_Cable(OrderedSetType)
Parameters
56
OrderedSetType
Indicates the OrderedSet type. Possible values:
PD_ORDERED_SET_TYPE_SOP_PRIME PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME
Result
None
Examples
Call PD_DecreaseMsgId_Cable(PD_ORDERED_SET_TYPE_SOP_PRIME)
61
Possible values:
PD_FALSE, PD_TRUE(default)
Result
None
Examples
#Set sink negotiation settings as default
$settings = PD_Negotiation_Sink_Settings call PD_SetNegotiationSetting_Sink( $settings )
5.1.7 PD_AddSinkCap
Adds Sink Capabilities to PD Exerciser. Before adding a group of sink caps make sure that there is no unwanted sink cap in the list by calling PD_ResetSinkCaps command. This command must be called before PD_NegotiatePower_Sink or PD_NegotiatePower or
PD_WaitForNegotiatePower or PD_DelayAutoResponse commands to take effect.
Note - By default there is one pre-defined sink cap in the list.
Format
Call PD_AddSinkCap(PD_PowerDataObject $PowerDataObject)
Parameters
$PowerDataObject
Parameter type is PD_PowerDataObject. Refer to PD_SinkCapabilitiesMessage for available sink power data objects.
Result
None
Examples
local $power_data_object = PD_PowerDataObjectFixedSupply_Sink { OperationalCurrent_10mAUnits = 50 Voltage_50mVUnits = 100 } call PD_AddSinkCap($power_data_object)
5.1.8 PD_ResetSinkCaps
Clears all Sink Capabilities defined for PD Exercise. Should be called before adding one or more sink capabilities.
Format
Call PD_ResetSinkCaps()
Parameters
None
Result
None
80
5.1.41 PD_SetStatusDataBlock
Sets the Status Data Block in PD Exerciser. It must be called before PD_WaitForGetStatus or
PD_DelayAutoResponse commands to take effect.
Format
Call PD_SetStatusDataBlock( PD_StatusDataBlock $status_db )
Parameters
$status_db
Parameter type is PD_StatusDataBlock. Refer to PD_StatusMsg for available fields.
Result
None
Examples
$status_db = PD_StatusDataBlock Call PD_SetStatusDataBlock( $status_db )
5.1.42 PD_ResetStatusDataBlock
Clears the Status Data Block in PD Exerciser. Should be called before calling
PD_SetStatusDataBlock command.
Format
Call PD_ResetStatusDataBlock()
Parameters
None
Result
None
Examples
Call PD_ResetStatusDataBlock()
5.1.43 PD_GetBatteryStatus
Starts the GetBatteryStatus AMS.
Format
Call PD_GetBatteryStatus()
Parameters
None
Result
User can evaluate the command results(including sub-results) using IfMatched/ElseMatched command. List of result values:
96
5.1.75 PD_AddSvid
Adds SVIDs to PD Exerciser. It must be called before PD_DiscoverSvids or
PD_WaitForDiscoverSvids or PD_PerformDiscoveryProcess or PD_DelayAutoResponse commands to
take effect.
Note - Up to 11 SVIDs can be added using this command.
Format
Call PD_AddSvid(value)
Parameters
value
SVID value to add
Result
None
Examples
call PD_AddSvid(0xFF01)
5.1.76 PD_ResetSvids
Clears SVIDs which is added to PD Exerciser. Should be called before adding one or more SVID.
Format
Call PD_ResetSvids()
Parameters
None
Result
None
Examples
call PD_ResetSvids()
5.1.77 PD_DiscoverSvids
Starts DiscoverSVID AMS.
Note - PD Exerciser supports only one(first) DiscoverSVIDs Ack message.
Format
Call PD_DiscoverSvids(OrderedSetType)
Parameters
OrderedSetType
99
5.1.81 PD_AddModeVDO
Adds Mode with VDO in PD Exerciser. It must be called before PD_DiscoverModes or
PD_WaitForDiscoverModes or PD_PerformDiscoveryProcess or PD_DelayAutoResponse commands to
take effect.
Format
Call PD_AddModeVDO(PD_Generic_VDO $ModeVdo)
Parameters
$ModeVdo
Parameter type is PD_Generic_VDO. Refer to PD_VDM_Discover_Modes_Response for available VDOs which can be use as this parameter.
Result
None
Examples
local $vdo_1 = PD_VDO { Data = 0x01 } call PD_AddModeVDO($vdo_1)
5.1.82 PD_ResetModes
Clears Modes which are added to PD Exerciser. Could be called before adding one or more Mode.
Format
Call PD_ResetModes()
Parameters
None
Result
None
Examples
call PD_ResetModes()
5.1.83 PD_DiscoverModes
Starts DicoverModes AMS.
Format
Call PD_DiscoverModes(OrderedSetType, selectedSvid)
Parameters
OrderedSetType
possible values:
PD_ORDERED_SET_TYPE_SOP
Loading...