Home
Beagle Protocol Analyzer User Manual v5.10
Contents
1. Hardware revisions that are compatible with this software version The top 16 bits gives the maximum accepted hw revision The lower 16 bits gives the minimum accepted hw revision u32 hw revs for sw Firmware revisions that are compatible with this software version The top 16 bits gives the maximum accepted fw revision The lower 16 bits gives the minimum accepted fw revision TI u32 fw revs for sw Driver revisions that are compatible with this software version The top 16 bits gives the maximum accepted driver revision The lower 16 bits gives the minimum accepted driver revision This version checking is currently only pertinent for WIN32 platforms o X N Tf u32 drv revs for sw Software requires that the API must be this version ul6 api req by sw All version numbers are of the format major 8 minor example v1 20 would be encoded as 0x0114 The structure is zeroed before the open is attempted It is filled with whatever information is available For example if the hardware version is not filled then the device could not be queried for its version number 96 9 TOTAL PHASE Beagle Protocol Analyzer User Manual This function is recommended for use in complex applications where extended information is required For simpler applications the use of bg open is recommended Close a Beagle analyzer connection bg close int bg close Beagle beagle Close
2. data filled with the contents of the data portion of the frame Table 72 MDIO Clause definitions BG MDIO CLAUSE 22 MDIO Clause 22 BG MDIO CLAUSE 45 MDIO Clause 45 BG MDIO CLAUSE ERROR Unknown value in clause field Table 73 MDIO Opcode definitions BG MDIO OPCODE45 WRITE Clause 45 write OP code BG MDIO OPCODE45 READ POSTINC Clause 45 post read increment address OP code BG MDIO OPCODE45 READ Clause 45 read OP code Return Value A Beagle status code of BG OK is returned on success or an error code as detailed in Table 74 Specific Error Codes BG MDIO BAD TURNAROUND An unexpected value in turnaround field of the frame Details The return value will indicate validity of the turnaround field BG OK indicates the value of the turnaround field is valid BG MDIO BAD TURNAROUND indicates an invalid value in the turnaround field 200 TOTAL PHASE Beagle Protocol Analyzer User Manual 6 10 Current Voltage Monitoring API 6 10 1 Notes The Current Voltage Monitoring API is currently only available for the Beagle USB 480 Power Protocol Analyzer 6 10 2 Current Voltage Monitoring Interface Read Current Voltage Monitoring data bg_usb_read Current Voltage Monitoring data are delivered in the same data stream as USB records The capture must be first configured by calling bg usb configure with BG USB CAPTURE IV MON LITE and BG USB CAPTURE USB2 Packets of BeagleUSBSource BG USB SOURCE IV MON can then be
3. 4 8 Application Notes 4 8 1 Receive Saturation Once enabled the Beagle analyzer is constantly monitoring data on the target bus Between calls to the Beagle API these messages must be buffered somewhere in memory This is accomplished on the analysis computer courtesy of the operating system Naturally the buffer is limited in size and once this buffer is full data will be dropped An overflow can occur when the Beagle analyzer receives data faster than the rate that it is processed the receive link is saturated The system is most susceptible to saturation when monitoring large amounts of traffic over USB or high speed SPI bus 4 8 2 Threading The Beagle DLL is designed for single threaded environments so as to allow for maximum cross platform compatibility If the application design requires multi threaded use of the Beagle analyzer s functionality each Beagle API call can be wrapped with a thread safe locking mechanism before and after invocation 88 9 TOTAL PHASE Beagle Protocol Analyzer User Manual It is the responsibility of the application programmer to ensure that the Beagle analyzer open and close operations are thread safe and cannot happen concurrently with any other Beagle analyzer operations However once a Beagle analyzer is opened all operations to that device can be dispatched to a separate thread as long as no other threads access that same Beagle analyzer 89 9 TOTAL PHASE Beagle Protocol Analyzer Use
4. MODE O MODE Clock Polarity CPOL CPOL 1 MODE 2 MODE 3 SOM Pvt JM Pie Figure 26 SP Modes The frame of the data exchange is described by two parameters the clock polarity CPOL and the clock phase CPHA This diagram shows the four possible states for these parameters and the corresponding mode in SPI 1 3 4 SPI Benefits and Drawbacks SPI is a very simple communication protocol It does not have a specific high level protocol which means that there is almost no overhead Data can be shifted at very high rates in full duplex This makes it very simple and efficient in a single master single slave scenario Because each slave needs its own SS the number of traces required is n 3 where n is the number of SPI devices This means increased board complexity when the number of slaves is increased 35 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 1 3 5 SPI References Introduction to Serial Peripheral Interface Embedded com SPI Serial Peripheral Interface 1 4 MDIO Background 1 4 1 MDIO History Management Data Input Output or MDIO is a 2 wire serial bus that is used to manage PHYS or physical layer devices in media access controllers MACs in Gigabit Ethernet equipment The management of these PHYs is based on the access and modification of their various registers MDIO was originally defined in Clause 22 of IEEE RFC802 3 In the original specification a single MDIO interface is ab
5. int bg i2c read bit timing Beagle beagle u32 status u64 time_sop u64 time duration u32 time dataoffset int max bytes ul6 data in int max timing u32 bit timing Read data from the PC port Arguments common args see bg i2c read for common arguments max timing size of bit timing array bit timing an allocated array of u32 which is filled with the timing data for each bit read Return Value 116 TOTAL PHASE Beagle Protocol Analyzer User Manual This function returns the number of bytes read or a negative value indicating an error Specific Error Codes None Details This function is an extension of the bg i2c read function with the added feature of giving bit level timing All of the bg 12c read arguments and details apply The values in the bit timing array give the offset of each bit from time sop The bit timing array should be allocated at least as large as max timing Use the function bg bit timing size in Section 6 4 3 4 to determine how large an array to allocate for b t timing 6 7 SPI API 6 7 1 Notes The SPI API functions are only available for the Beagle I C SPI MDIO Protocol Analyzer 6 7 2 SPI Monitor Interface SPI Configuration bg spi configure int bg spi configure Beagle beagle BeagleSpiSSPolarity ss polarity BeagleSpiSckSamplingEdge sck sampling edge BeagleSpiBitorder bitorder Sets SPI bus parameters Arguments beagle handle o
6. Beagle Protocol Analyzer User Manual This function returns a memory test result listed in Table 54 or a negative value indicating an error Table 54 USB Memory Test Results BG USB MEMORY TEST PASS Memory test passed BG USB MEMORY TEST FAIL Memory test failed Specific Error Codes None Details This function is not supported for the Beagle USB 12 and the Beagle USB 480 Protocol Analyzers This function is used to verify that the USB 2 0 capture buffer hardware is functioning properly Please contact Total Phase if this function ever returns BG USB MEMORY TEST FAIL 6 8 5 USB Monitor Interface USB 3 0 Configure PHY bg usb3 phy config int bg usb3 phy config Beagle beagle u08 tx u08 rx Configure USB 3 0 PHY settings Arguments beagle handle of a Beagle analyzer tx bitmask of PHY settings for Tx channel rx bitmask of PHY settings for Rx channel Table 55 BG USB3 PHY CONFIG Bitmasks POLARITY NON INVERT Force polarity to non invert 173 9 TOTAL PHASE Beagle Protocol Analyzer User Manual all entries in table are prefixed with BG USB3 PHY CONFIG Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE An attempt was made to call this function with an invalid Beagle product Details This function is used to control the PHY settings of the Beagle USB analyzer By default the analyzer will auto detect
7. how the different packet structures are used USB 3 0 specific packets are shown in Figure 17 1 1 3 Theory of Operations This introduction is a general summary of the USB spec Total Phase strongly recommends that developers consult the USB specification on the USB IF website for detailed and up to date information 10 9 TOTAL PHASE Beagle Protocol Analyzer User Manual USB 2 0 Connectors Figure 5 USB Cable A USB cable has two different types of connectors A and B The A connectors connect upstream towards the Host and B connectors connect downstream to the Devices USB cables have two different types of connectors A and B A type connectors connect towards the host or upstream direction B connectors connect to downstream devices though many devices have captive cables eliminating the need for B connectors The A and B connectors are defined in the USB spec to prevent loopbacks in the bus This prevents a host from being connected to a host or conversely a device to a device It also helps enforce the tiered star topology of the bus USB hubs have one B port and multiple A ports which makes it clear which port connects to the host and which to downstream devices The USB spec has been expanded to include Mini A and Mini B connectors to support small USB devices The USB On The Go OTG spec has introduced the Micro A plug Micro B plug and receptacle and the Micro AB receptacle to allow for dev
8. 2 4 Beagle I C SPI MDIO Protocol Analyzer 2 4 1 Connector Specification The ribbon cable connector is a standard 0 100 2 54 mm pitch IDC type connector This connector will mate with a standard keyed boxed header Alternatively split cables are available which connects to the ribbon cable and provides individual leads for each pin with or without grabber clips 52 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Orientation The ribbon cable pin order follows the standard convention The red line indicates the first position When looking at your Beagle analyzer in the upright position Figure 38 pin 1 is in the top left corner and pin 10 is in the bottom right corner Figure 38 The Beagle FC SPI MDIO Protocol Analyzer in the upright position Pin 1 is located in the upper left corner of the connector and Pin 10 is located in the lower right corner of the connector If you flip your Beagle analyzer over Figure 39 such that the text on the serial number label is in the proper upright position the pin order is as shown in the following diagram 53 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Figure 39 The Beagle FC SPI MDIO Protocol Analyzer in the upside down position Pin 1 is located in the lower left corner of the connector and Pin 10 is located in the upper right corner of the connector Order of Leads 1 SCL 2 GND SDA NC 5V MISO NC 5V SCLK MDC MOSI MDIO SS Gr dee
9. 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Call this function before calling the bg read bit timing API functions to determine how large a b t timing array to allocate For BG PROTOCOL MDIO this function will always return the value 32 regardless of the the value passed for num data bytes Trigger Capture bg capture trigger int bg capture trigger Beagle beagle Trigger the capture Arguments beagle handle of a Beagle analyzer Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is supported only for analyzers with on board triggering capability Calling this function triggers the capture Once the capture has been triggered data can be downloaded from the hardware buffer by calling the read function Wait for Capture to Trigger bg capture trigger wait int bg capture trigger wait Beagle beagle u32 timeout ms BeagleCaptureStatus status Wait for capture to trigger Arguments beagle handle of a Beagle analyzer timeout ms timeout value status filled with enumerated value described in Table 10 110 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Table 10 BeagleCaptureStatus Enums BG CAPTURE STATUS INACTIVE Capture is not active BG CAPTURE STATUS SYNC STANDBY Waiting for capture to start on all analyzers connected by Cross Analyzer Sync BG
10. BG USB EXTOUT LOW Tie LOW default BG USB EXTOUT HIGH Tie HIGH BG USB EXTOUT POS PULSE BG USB EXTOUT NEG PULSE Negative pulse BG USB EXTOUT TOGGLE Toggle initial value LOW BG USB EXTOUT TOGGLE 1 Toggle initial value HIGH 180 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Enable Simple Matching bg usb3 simple match config bg usb3 simple match config Beagle beagle u32 trigger mask u32 extout mask BeagleUsb3ExtoutMode extout mode u08 extin edge mask BeagleUsb3IPSType tx ips type BeagleUsb3IPSType rx ips type Enable the USB 3 simple matching system for triggering Arguments beagle handle of a Beagle analyzer trigger mask bitmask of events sources that will be used for triggering capture extout mask bitmask of events sources that will be used for controlling EXTOUT extout mode mode of EXTOUT assertion extin edge mask bitmask of EXTIN edge s to match on tx ips type mode of downstream IPS matching rx ips type mode of upstream IPS matching Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG CONFIG ERROR An attempt was made to set an invalid configuration Details The trigger mask and extout mask bitmask fields use the same set of constants Zero or more of the following constants may be used in each of the two fields BG USB3 SIMPLE MATCH NONE BG USB3 SIMPLE MATCH SSTX IPS e BG USB3 SIMPLE MATCH SSTX SLC BG U
11. BG USB SOURCE USB3 RX BG USB SOURCE USB3 TX Automatic Configuration of the Device Address To help resolve cases where the device address is unknown or changes upon each enumeration of the device an automatic device address configuration feature is available When this feature is enabled the analyzer will automatically set the 138 9 TOTAL PHASE Beagle Protocol Analyzer User Manual dev match val field to the address observed in the first Set Address device request To enable this feature pass a non zero value in the auto config field Auto config affects fields dev match type and dev match vaL While it isnt necessary to configure these two fields to non zero values when using auto config endpoint and source stream fields should still be configured Once the analyzer has determined the device address the user provided endpoint and source stream settings will be used to perform statistics tracking Automatic device address configuration is not instantaneous and requires that a Set Address device request be observed on the bus by the analyzer To check the status of device address configuration use the bg usb stats config query function as described below When enabled automatic device address configuration occurs only once until re enabled by another call to bg usb stats config A device address set by automatic configuration will persist until analyzer reset or until another call to this configuration function In other w
12. BeagleUsbTimerUnit enumerated values BG USB TIMER UNIT DISABLED The timer is disabled BG USB TIMER UNIT NS The timer value is in ns BG USB TIMER UNIT US The timer value is in us BG USB TIMER UNIT MS The timer value is in ms BG USB TIMER UNIT SEC The timer value is in seconds The validity of timer_val depends on the selected units The timer must be at least 8 ns and at most 34 36 sec Asynchronous Event Match Units The BeagleUsb3AsyncEventMatchUnit should be used to create an asynchronous event match unit Timer match unit configuration struct BeagleUsb3AsyncEventMatchUnit BeagleUsb3AsyncEventType event type u08 edge mask ul6 repeat count 190 9 TOTAL PHASE Beagle Protocol Analyzer User Manual u08 sticky action u08 action_mask u08 goto selector Hh The BeagleUsb3AsyncEventType enumerated type is used to define the event type to match on The different enumerated types are listed below Restrictions on edge mask are based on the selected event type and are indicated by footnotes BG USB3 COMPLEX MATCH EVENT SSTX LFPS BG USB3 COMPLEX MATCH EVENT SSTX POLARITY 5 BG USB3 COMPLEX MATCH EVENT SSTX DETECTED BG USB3 COMPLEX MATCH EVENT SSTX SCRAMBL 5 BG USB3 COMPLEX MATCH EVENT SSRX LFPS BG USB3 COMPLEX MATCH EVENT SSRX POLARITY 5 BG USB3 COMPLEX MATCH EVENT SSRX DETECTED BG USB3 COMPLEX MATCH EVENT SSRX SCRAMBL 5 BG USB3 COMPLEX MATCH EVENT VBUS INRUSH B
13. Query the status of USB 3 0 capture Arguments BG USB3 NOT ENABLED A USB 3 0 capture has not been enabled Return Value Input arguments are the same as bg usb2 capture status See Section 6 8 4 15 for details 178 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Capture Data Truncation bg usb3 truncation mode int bg usb3 truncation mode Beagle beagle u08 tx truncation mode u08 rx truncation mode Configure the capture truncation mode Arguments beagle handle of a Beagle analzyer tx truncation mode truncation mode of the host transmission stream see Table 58 rx truncation mode truncation mode of the host reception stream see Table 58 Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes None Details This function allows users to set a maximum length for the amount of saved data for each packet on a given stream This truncation is applied before data is written into the hardware memory buffer and can thus be useful in applications that wish to minimize memory usage on the analyzer and on the analysis computer The truncation mode of each stream can be set to 20 symbols 36 symbols 68 symbols or off These truncation lengths include the packet framing 4 symbols and thus provide a means for capturing 16 symbols 32 symbols or 64 symbols after the packet framing The return value of bg usb read will still return the true length of the p
14. Table 14 I C Data Mask constants BG I2C MONITOR DATA OxOOff Mask to access data field BG I2C MONITOR NACK 0x0100 Mask to access ACK NACK field The data in pointer should be allocated at least as large as max bytes All of the timing data is measured in ticks of the sample clock Read l C with data level timing bg i2c read data timing int bg i2c read data timing Beagle beagle u32 status u64 time sop u64 time duration u32 time dataoffset int max bytes ul6 data in int max timing u32 data timing Read data from the FC port Arguments common args see bg i2c read for common arguments max timing size of data timing array 115 9 TOTAL PHASE Beagle Protocol Analyzer User Manual data timing an allocated array of u32 which is filled with timing data for each data word read Return Value This function returns the number of bytes read or a negative value indicating an error Specific Error Codes None Details This function is an extension of the bg i2c read function with the added feature of giving data level timing All of the bg i2c read arguments and details apply The values in the data timing array give the offset of the start of each data word from time sop A data word includes all 8 bits of data as well as the acknowledgment bit The data timing array should be allocated at least as large as max timing Read l C with bit level timing bg i2c read bit timing
15. the software or documentation downloaded from its site or any derivative works thereof even if Total Phase or distributors have been advised of the possibility of such damage The software its documentation and any derivative works is provided on an as is basis and thus comes with absolutely no warranty either express or implied This disclaimer includes but is not limited to implied warranties of merchantability fitness for any particular purpose and non infringement Total Phase and distributors have no obligation to provide maintenance support or updates Information in this document is subject to change without notice and should not be construed as a commitment by Total Phase While the information contained herein is believed to be accurate Total Phase assumes no responsibility for any errors and or omissions that may appear in this document 7 2 Life Support Equipment Policy Total Phase products are not authorized for use in life support devices or systems Life support devices or systems include but are not limited to surgical implants medical systems and other safety critical systems in which failure of a Total Phase product could cause personal injury or loss of life Should a Total Phase product be used in such an unauthorized manner Buyer agrees to indemnify and hold harmless Total Phase its officers employees affiliates and distributors from any and all claims arising from such use even if such claim alleges that
16. thereby utilizing all of the improvements present in the replaced DLL On Linux the DLL is technically known as a shared object SO 4 6 2 DLL Location Total Phase provides language bindings that can be integrated into any custom application The default behavior of locating the Beagle DLL is dependent on the operating system platform and specific programming language environment For example for a C or C application the following rules apply On a Windows system this is as follows 1 The directory from which the application binary was loaded 2 The applications current directory 85 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 3 32 bit system directory for a 32 bit application Examples e Windows System32 Windows XP Vista 7 32 bit e C Windows System64 Windows XP 64 bit e Windows SysWow64 Windows Vista 7 64 bit 4 64 bit system directory for a 64 bit application Examples e C Windows System32 Windows XP Vista 7 64 bit 5 The Windows directory Ex c Windows 6 The directories listed in the PATH environment variable On a Linux system this is as follows 1 First search for the shared object in the application binary path If the proc filesystem is not present this step is skipped 2 Next search in the applications current working directory 3 Search the paths explicitly specified in LD LIBRARY PATH 4 Finally check any system library paths as specified in etc ld so conf
17. they should not poll the buffer at all Regardless the polling traffic itself can be filtered from the analysis data by using the hardware based Self Filter 3 4 7 Match Action System The Beagle USB 480 Protocol Analyzer provides a simple matching system that can perform one or more actions in response to a match The Ultimate Edition of the Beagle USB 480 Power Protocol Analyzer features Complex Matching which provides a state based system for matching specific packet types and data patterns in addition to specific events It also includes the Advanced trigger option which extends the Complex 78 TOTAL PHASE Beagle Protocol Analyzer User Manual Matching framework with multiple states and extended matching facilities to build complex state machines USB 2 0 Simple Matching The USB 2 0 simple matching system is capable of monitoring and triggering capture on USB 2 0 digital inputs as well as asserting digital outputs and triggering capture on user provided packet data match patterns USB 2 0 Complex Matching The USB 2 0 complex matching system provides a state based facility to match specific packet types and data patterns in addition to specific events The Ultimate Edition of the Beagle USB 480 Power Protocol Analyzers allows up to 8 states Each state may have 4 data matching units 1 timer match unit and 1 asynchronous event match unit This state based system is used in an identical manner as the USB 3 0 Complex Match
18. va Error Directed Directed RS v U1 aS LFPS Handshake i j LFPS Handshak Y M Recovery LFPS Handshake TOTAL PHASE Beagle Protocol Analyzer User Manual Figure 4 LTSSM State Machine The Link Training and Status State Machine LTSSM is the core of the USB 3 0 link layer and defines link connectivity and link power management states states and transitions Image courtesy of USB Implementers Forum In order for a USB 3 0 device to enter the UO operational link state the link must be trained in order to synchronize the transmitter and receiver between the host and device Key LTSSM link states Rx Detect This is the initial power on state where a transmitter checks for proper receiver termination to determine if its SuperSpeed partner is present on the bus When the termination is detected link training can begin Polling During the polling state two link partners train the link to synchronize their communications in preparation for data transmission UO This is the normal operational state where SuperSpeed signaling is enabled and 5Gb packets are transmitted and received U1 U2 U3 These are low power states where no 5Gb packets are transmitted U1 U2 and U3 have increasingly longer wakeup times into UO and thus allow transmitters to go into increasingly deeper sleeps USB 3 0 Protocol Layer The USB 3 0 protocol layer manages the flow of data between devices and specifies
19. 0 valid rx data 0 rx data 1 valid rx data 1 rx data 2 valid rx data 2 timer valid 185 TOTAL PHASE Beagle Protocol Analyzer User Manual H BeagleUsb3TimerMatchUnit u08 Beag LeUsb3AsyncEventMatchUnit u08 u08 u08 timer async valid async goto 0 goto 1 goto 2 Up to 3 destination states can be defined per state These states should be set using the goto N fields Match units can pick one of these 3 destination states using their goto selector 0 1 or 2 fields Each state can accomodate up to 3 TX data match units 3 RX data match units 1 timer match unit and 1 asynchronous event match unit To denote a valid match unit object the corresponding valid field should contain a non zero value Data Match Units The BeagleUsb3DataMatchUnit should be used to create a data match unit Data match unit configuration struct BeagleUsb3DataMatchUnit Beag lLeUsb3PacketType u16 u08 u16 u08 BeagleUsb3ErrorType u08 BeagleUsb3DataProperties Beag LeUsb3MatchModifier ul6 u08 u08 08 packet_type data_length data data_valid_length data_valid err match data properties valid data properties match modifier repeat count sticky action action mask goto selector Table 62 BeagleUsb3DataMatchUnit field descriptions packet type The type of packet to be matched data length Length of the data array Byte array of data on which to match data valid
20. Beagle i2c SPI MDIO Protocol Analyzer Features Non intrusize i2c monitoring up to 4 MHz Non intrusize SPI monitoring up to 24 MHz Non intrusize MDIO monitoring up to 2 5 MHz User selectable bit level timing up to 20 ns resolution 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 1 General Overview 1 1 USB Background 1 1 1 USB History Universal Serial Bus USB is a standard interface for connecting peripheral devices to a host computer The USB system was originally devised by a group of companies including Compaq Digital Equipment IBM Intel Microsoft and Northern Telecom to replace the existing mixed connector system with a simpler architecture USB was designed to replace the multitude of cables and connectors required to connect peripheral devices to a host computer The main goal of USB was to make the addition of peripheral devices quick and easy All USB devices share some key characteristics to make this possible All USB devices are self identifying on the bus All devices are hot pluggable to allow for true Plug n Play capability Additionally some devices can draw power from the USB which eliminates the need for extra power adapters To ensure maximum interoperability the USB standard defines all aspects of the USB system from the physical layer mechanical and electrical all the way up to the software layer The USB standard is maintained and enforced by the USB Implementers Forum USB IF US
21. MODE EXTOUT only when capture triggers BG USB3 EXTOUT EVENTS MODE EXTOUT on every extout mask source match The extin edge mask bitmask specifies the EXTIN edge s that will cause a match Zero or more of the follow constants may be used e BG USB EDGE RISING BG USB EDGE FALLING The BeagleUsb3IPSType enumerated type is used to specify the IPS type that will cause a match to occur if one of the IPS sources is enabled in trigger mask or extout mask The different enumerated types are described in Table 61 Table 61 Beagl eUsb3IPSType enumerated values BG USB3 IPS TYPE DISABLED IPS matching disabled BG USB3 IPS TYPE TS1 Match only on TS1 BG USB3 IPS TYPE TS2 Match only on TS2 BG USB3 IPS TYPE TSEQ Match only on TSEQ BG USB3 IPS TYPE TSx Match on TS1 or TS2 BG USB3 IPS TYPE TS ANY Match on TS1 TS2 or TSEQ Configure Complex Matching bg usb3 complex match config int bg usb3 complex match config Beagle beagle u08 validate u08 extout BeagleUsb3ComplexMatchState state 0 BeagleUsb3ComplexMatchState state 1 BeagleUsb3ComplexMatchState state 2 BeagleUsb3ComplexMatchState state 3 BeagleUsb3ComplexMatchState state 4 183 TOTAL PHASE Beagle Protocol Analyzer User Manual BeagleUsb3ComplexMatchState state 5 BeagleUsb3ComplexMatchState state 6 BeagleUsb3ComplexMatchState state 7 Configure the USB 3 0 complex matching system for triggering Arguments beagle ha
22. PHYADR REGADR TA DATA 16 BITS ODEN NENNEN TUHU mm O 1 Write 1 0 Read Figure 27 Basic MDIO Frame Format Table 3 Clause 22 format Start of Frame 01 for Clause 22 OP Code PHYADR PHY Address REGADR Register Address TA Turnaround time to change bus ownership from STA to MMD if required DATA 16 bits Data Driven by STA during write Driven by MMD during read The frame format only allows a 5 bit number for both the PHY address and the register address which limits the number of MMDs that the STA can interface Additionally Clause 22 MDIO only supports 5 V tolerant devices and does not have a low voltage option 1 4 4 Clause 45 In order to address the deficiencies of Clause 22 Clause 45 was added to the 802 3 specification Clause 45 added support for low voltage devices down to 1 2 V and extended the frame format Figure 28 to provide access to many more devices and registers Some of the elements of the extended frame are similar to the basic data frame 37 9 TOTAL PHASE Beagle Protocol Analyzer User Manual ST OP PHYADR DEVTYPE TA ADDR DATA 16 BITS Rea 1 O Read Addr Figure 28 Extended MDIO Frame Format Table 4 Clause 45 format Start of Frame 00 for Clause 45 OP Code A 2 bits Turnaround time to change bus ownership from STA to MMD if required ADDR DATA 16 bits Address or Data Driven by STA for address Driven by STA during write Driven by MMD during
23. TOTAL PHASE Beagle Protocol Analyzer User Manual steps describe the feedback the user should receive from Windows after a Beagle analyzer is plugged into a system for the first time Windows XP 1 The Found New Hardware notification bubble will pop up from the system tray and state that the Total Phase Beagle Protocol Analyzer has been detected Note that installation may take a while 30 60 seconds per device 2 When the installation is complete the Found New Hardware notification bubble will again pop up and state that your new hardware is installed and ready to use Windows Vista 7 1 A notification bubble will pop up from the system tray and state that Windows is installing device driver software 2 When the installation is complete the notification bubble will again pop up and state that the device driver software installed successfully To confirm that the device was correctly installed check that the device appears in the Device Manager To navigate to the Device Manager screen select Control Panel System Properties Hardware Device Manager for Windows XP or select Control Panel Hardware and Sound Device Manager for Windows Vista 7 The Beagle analyzer should appear under the Universal Serial Bus Controllers section for Windows XP Vista 7 4 2 2 Driver Removal The USB communication driver can be removed from the operating system by using the Windows program removal utility Instructions fo
24. Total Phase was negligent in the design or manufacture of its product 7 3 Contact Information Total Phase can be found on the Internet at http www totalphase com If you have support related questions please email the product engineers at support totalphase com For sales inquiries please contact sales totalphase com 204 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 02005 2013 Total Phase Inc All rights reserved The Total Phase name and logo and all product names and logos are trademarks of Total Phase Inc All other trademarks and service marks are the property of their respective owners 205
25. USB B receptacle These are used to connect the target host computer to the target device The target host computer can be the same computer as the analysis computer 50 TOTAL PHASE Beagle Protocol Analyzer User Manual Target Host Port Target Device Port Figure 36 Beagle USB 12 Protocol Analyzer Capture Side The Capture side acts as a USB pass through In order to remain within the USB 2 0 specifications no more than 5 meters of USB cable should be used in total between the target host computer and the target device The Beagle USB 12 monitor is galvanically isolated from the USB bus to ensure the signal integrity Please note that on the Capture side there is a small gap between the two receptacles In this gap two LED indicators are visible a green one and an amber one as shown in Figure 37 When the Beagle USB 12 monitor has been correctly connected to the analysis computer the green LED will illuminate When the Beagle USB 12 monitor is correctly connected to the target host computer the amber LED will illuminate Anaylsis Port Target Host Connection Connection Figure 37 Beagle USB 12 Protocol Analyzer LED Indicators Please check all the connections if the one or both LEDs fail to illuminate after the Beagle USB 12 monitor has been connected to the analysis computer or the target host computer 51 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 2 3 2 Signal Specifications Power C
26. format of the Handshake packets is shown in Figure 14 totana om O r om 9 e Figure 11 above Token Packet Format maansa m m m e Figure 12 above Start Of Frame SOF Packet Format 19 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Bbits Dow Full 32 tis pig 85 up 108 bytes lo7 1023 bytes fll 15 bytes igh gebe Figure 13 above Data Packet Format CETT om E Figure 14 above Handshake Packet Format Data Transactions Data transactions occur in three phases Token Data and Handshake TOKEN Host initiates the transfer by mp a Token packet type of token indicates whether the Host will transmit or receive data DATA i a Transmitter sends a D LS i D IN USB Host Token Data Handshake GE USB Device a BUE BP Figure 15 The Three Phases of a USB Transfer 20 9 TOTAL PHASE Beagle Protocol Analyzer User Manual All communication on the USB is host directed In the Token phase the host will generate a Token packet which will address a specific device endpoint combination A Token packet can be IN OUT or SETUP The host is requesting data from the addressed dev ep The host is sending data to the addressed dev ep SETUP The host is transmitting control information to the device In the data phase the transmitter will send one data packet For IN requests the device may send a NAK or STALL packet during the data phase to indicate that it isnt ab
27. functioning properly Please contact Total Phase if this function ever returns BG USB MEMORY TEST FAIL 6 8 6 USB 5000 Monitor Interface Configure USB 5000 Cross Analyzer Sync bg5000 cross analyzer sync configure int bg5000 cross analyzer sync config Beagle beagle Beagle5000CrossAnalyzerSyncMode cross sync mode Beaglb5000CrossAnalyzerMode cross trigger mode Beagsb5000CrossAnalyzerMode cross stop mode Configure Cross Analyzer Sync Arguments beagle handle of a Beagle analyzer cross sync mode enumerated value Table 70 that can enable or disable the Cross Analyzer Sync feature cross trigger mode enumerated value Table 71 that configures the Cross Analyzer Trigger feature cross stop mode enumerated value Table 71 that configures the Cross Analyzer Stop feature Table 70 Beagle5000CrossAnalyzerSyncMode enumerated values BG5000 CROSS ANALYZER SYNC WAIT Wait for all analyzers connected by Cross Analyzer Sync to start before proceeding with capture BG5000 CROSS ANALYZER SYNC BYPASS Bypass the Cross Analyzer Sync feature proceeding with capture immediately after start Table 71 Beagle5000CrossAnalyzerMode enumerated values 195 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG5000 CROSS ANALYZER ACCEPT Allow honor Cross Analyzer signal from connected analyzers BG5000 CROSS ANALYZER IGNORE Reject ignore Cross Analyzer signal from connected analyzers Return Value This functio
28. high speed devices that are plugged into a full speed hub are automatically downgraded to full speed data rates On the other hand low speed devices are not upgraded to full speed data rates In order to send data to low speed devices the hub must actually pass slower moving data signals to those devices The host or high speed hub is the one that generates these slower moving signals on the full speed bus Ordinarily the low speed ports on the hub are quiet When a low speed packet needs to be sent downstream it is prefaced with a PRE PID This opens up the low speed ports Note that the PRE is sent at full speed data rates but the following transaction is transmitted at low speed data rates High speed hubs only communicate at 480 Mbps with high speed host They do not downgrade the link between the host and hub to slower speeds However high speed hubs must still deal with slower devices being downstream of them High speed hubs do not use the same mechanism as full speed hubs There would be a tremendous cost on bandwidth to other high speed devices on the bus if low speed or full speed signaling rates were used between the host and the hub of interest Thus in order to save 22 9 TOTAL PHASE Beagle Protocol Analyzer User Manual bandwidth high speed hosts do not send the PRE token to high speed hubs but rather a SPLIT token The SPLIT token is similar to the PRE in that it indicates to a hub that the following transaction is for
29. length Length of the data valid array 186 9 TOTAL PHASE Beagle Protocol Analyzer User Manual data valid Array specifying which bytes in the data array are valid non zero and which are dont cares zero err match Dictates which CRC error conditions must be valid or invalid for a match Options are listed in Table 64 data properties Specific match information for supplied data match modifier Modify the matching criteria The BeagleUsb3PacketType enumerated type is used in data match units to denote which type of packet to be matched The different enumerated types are described in the Table 63 data properties valid data properties is valid Table 63 BeagleUsb3PacketType enumerated values Match exit from 5 Gb transmission The BeagleUsb3ErrorType enumerated type is used differently depending on the match packet type that is configured In situations where the packet type is an SLC SHP SDP or SHP_ SDP this field defines the type of CRC condition which is intended to be matched The various options include looking for failing and passing CRC conditions in each of the CRC slots CRC 1 describes the first CRC slot of the packet while CRC 2 describes the second CRC slot of the packet Since Data Packet Payloads do not have a second CRC slot this field is instead used to indicate whether or not the packet ended with an END framing or an EDB framing A passing CRC 2 describes an END framing while a failing CRC 2 describes an E
30. match unit can be further configured to trigger on every match after a set number of matches For example a match unit can be configured to filter out all TSEQ after the first 50 In this way only the first 50 TSEQ packets would be seen in the capture and all subsequent TSEQs would be filtered out Actions When a match units successfully makes a match it can perform one or more actions The available actions are triggering the capture asserting the external output filtering the matching data out or going to a different state The ability to go to a different state is only available in the Advanced Complex Triggers option Each individual Match Unit in a state can have different actions which provides flexibility of defining a complex multi state matching trigger USB 2 0 Matching The USB 2 0 matching system provides the user the capability of matching events packet types packet data or external input The functionality of this system is based on the Beagle USB 480 Protocol Analyzer s system with the addition of the ability for the inputs and outputs to trigger the capture 71 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 3 3 9 Capture Settings The Beagle USB 5000 analyzer is the only USB protocol analyzer with the ability to capture USB 3 0 and USB 2 0 data and stream it in real time to the Analysis PC for interactive display Real time USB 3 0 Capturing It is important to note that the downlink from the analyzer t
31. matching the PID using the structure will therefore overwrite the PID settings defined in BeagleUsb2PacketMatch Furthermore the data matching is determined through two arrays The data array determines which values the user would like to match The first byte of this array would correlate to the first byte of the packet The second array data valid determines which of those bytes in the data array are valid for matching Setting a byte to zero in the data valid array means that byte is a dont care condition for the matching algorithm The digital outputs activate as soon as their triggering event can be fully confirmed Thus Pins 1 and 2 will activate as soon as the capture activates or rxactive goes high respectively However Pins 3 and 4 must assure a match of all of their characteristics Therefore only once all possible PIDs device address and endpoints of a given packet are checked completely can the output activate The assertion of matched data on Pin 4 must wait until the end of the data packet to assure a match Packets that are shorter then what is defined by the BeagleUsb2DataMatch structure may still activate Pin 4 if all the data up to that point matched correctly Enable USB 2 0 Digital Input bg usb2 digital in config int bg usb2 digital in config Beagle beagle u08 in enable mask 151 TOTAL PHASE Beagle Protocol Analyzer User Manual Configures the analyzer to report an event on changes to the external in
32. packet array The duration of each bit is provided in counts of a 480 MHz clock corresponding to approximately a 2 ns resolution Those bits that are followed by a bit stuff will have a duration that is twice as long as a normal bit time for that speed 171 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The bit timing array should be allocated at least as large as max timing Use the function bg bit timing size in Section 6 4 3 4 to determine how large an array to allocate for b t timing Read USB 2 0 Statistics Counts bg usb2 stats read int bg usb2 stats read Beagle beagle BeagleUsb2Stats config Read hardware based USB 2 0 statistics counts Arguments beagle handle of a Beagle analyzer stats filled with the hardware based statistics counts Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG CONFIG ERROR USB 2 0 capture is not enabled or USB 3 0 capture is enabled BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is very similar to bg usb stats read in Section 6 8 3 10 but it will works only with USB 2 0 only captures If it is run with a USB 3 0 enabled capture the function will return an appropriate error code Test Memory bg usb2 memory test int bg usb2 memory test Beagle beagle Test the USB 2 0 capture buffer hardware Arguments beagle handle of a Beagle analyzer Return Value 172 TOTAL PHASE
33. seen in Figure 3 TOTAL PHASE Beagle Protocol Analyzer User Manual UTP Signal Pair Filler optional SDP Signal Pair Braid Power Jacket SDP Signal Pair Ground Figure 3 USB 3 0 Cable Cross section of a USB 3 0 cable Image courtesy of USB Implementers Forum These two additional pairs allow for full duplex communication over USB 3 0 Since the original USB 2 0 lines are unchanged USB 2 0 communications can occur in parallel to USB 3 0 USB 3 0 Power Many of the key changes in USB 3 0 involve power and power management of USB devices USB 3 0 Power Distribution The amount of power available to USB devices has been increased in USB 3 0 For unconfigured devices 150 mA of power is available compared with only 100 mA of power in USB 2 0 150 mA is considered one unit load Configured devices are able to draw up to 6 unit loads or 900 mA a significant increase from the 500 mA available in USB 2 0 The added power allows for a broader range of devices to be bus powered USB 3 0 Power Management 9 TOTAL PHASE Beagle Protocol Analyzer User Manual USB 3 0 provides better power management facilities to use power more efficiently and to help reduce overall power consumption Link level power management allows the host or device to initiate a transition to a lower level power state There are three low power states available that are shown in Figure 4 In USB 3 0 there is no longer periodic de
34. the Beagle analyzer port Arguments beagle handle of a Beagle analyzer to be closed Return Value The number of analyzers closed is returned on success This will usually be 1 Specific Error Codes None Details If the handle argument is zero the function will attempt to close all possible handles thereby closing all open Beagle analyzer The total number of Beagle analyzers closed is returned by the function Get Features bg features int bg features Beagle beagle Return the device features as a bit mask of values or an error code if the handle is not valid Arguments beagle handle of a Beagle analyzer Return Value The features of the Beagle analyzer are returned These are a bit mask of the following values define BG FEATURE NONE 0 97 9 TOTAL PHASE Beagle Protocol Analyzer User Manual define BG FEATURE I2C 1 lt lt 0 define BG FEATURE SPI 1 lt lt 1 define BG FEATURE USB 1 lt lt 2 define BG FEATURE MDIO 1 lt lt 3 define BG FEATURE USB HS 1 4 define BG FEATURE USB SS 1 5 Specific Error Codes None Details None Get Features by Unique ID bg unique id to features int bg unique id to features u32 unique id Return the bitmask of device features for the given Beagle device identified by unique id Arguments beagle unique ID of a Beagle analyzer Return Value The features of the Beagle analyzer are returned See bg features for details on the bi
35. the polarity settings descrambler settings and SuperSpeed termination of the target host and device The PHY settings can be forced into an alternate configuration by calling this function with the proper bitmask For example a SuperSpeed device can be forced to operate at high speed USB by using the following bitmask BG USB3 PHY CONFIG POLARITY AUTO BG USB3 PHY CONFIG DESCRAMBLER AUTO BG USB3 PHY CONFIG RXTERM OFF Configure Link bg usb3 link config int bg usb3 link config Beagle beagle const BeagleUsb3Channel tx 174 9 TOTAL PHASE Beagle Protocol Analyzer User Manual const BeagleUsb3Channel rx Configure front end settings of USB 3 0 link Arguments beagle handle of a Beagle analyzer tx buffer which contains Tx channel configuration rx buffer which contains Rx channel configuration Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG CONFIG ERROR An attempt was made to configure the Beagle with invalid settings BG FUNCTION NOT AVAILABLE An attempt was made to call this function with an invalid Beagle product Details For the convenience of the user it is possible to modify the receiver and transmitter settings of the active buffer circuitry On the receiver side users are able to modify the receiver equalization settings though often this is not necessary On the transmitter side users are able to adjust the signal level of the
36. turned off Once the handle to the Beagle analyzer is closed the state of the receiver termination detection system will revert to the default setting of auto detect If the termination resistors are forced on the Beagle analyzer will apply termination resistors to the lines it presents to the transmitter regardless of the true state of the target receiver termination The RxTerm LED will be on to indicate that the lines to the transmitter have been terminated 61 9 TOTAL PHASE Beagle Protocol Analyzer User Manual If the termination resistors are forced off the Beagle analyzer will not apply a termination resistor regardless of whether the receiver has terminated the lines The RxTerm LED will be off to indicate that the lines to the transmitter have not been terminated While the analyzer is in auto detection mode and is in the process of testing for the presence or absence of a receiver it is not able to pass USB 3 0 data to the target receiver Conversely while data is being sent to the target receiver it is not possible for the analyzer to detect the presence or absence of the termination resistor Note lf a device is removed while data is being sent the Beagle analyzer will prioritize capturing the data and will not be able to detect the absence of the termination immediately In this situation the Beagle analyzer will be presenting receiver termination on its link which does not accurately reflect the state of the link wit
37. val BeagleUsb2MatchType dev match type u08 dev_match val BeagleUsb2MatchType ep match type u08 ep match val H The BeagleUsb2DataMatch structure describes the data sequence that need to be matched struct BeagleUsb2DataMatch BeagleUsb2MatchType data match type u08 data match pid ul6 data length u08 data ul6 data valid length u08 data valid The BeagleUsb2MatchType enumerated type is used throughout the two structures to determine whether the match should assert on the values being equal 150 9 TOTAL PHASE Beagle Protocol Analyzer User Manual not equal or dont care disabled The different enumerated types are described in the following table Table 42 BeagleUsb2MatchType enumerated values BG USB2 MATCH TYPE DISABLED The match type is disabled BG USB2 MATCH TYPE EQUAL The match type must equal BG USB2 MATCH TYPE NOT EQUAL The match type must not equal The BeagleUsb2DataMatch structure has its own field for checking PIDs This field is a bitmask for each of the four types of data packets and is described in the following table Table 43 Data Match PID bit mask BG USB2 DATA MATCH DATAO Enable match on data with DATAO PID BG USB2 DATA MATCH DATAI1 Enable match on data with DATA1 PID BG USB2 DATA MATCH DATA2 Enable match on data with DATA2 PID BG USB2 DATA MATCH MDATA Enable match on data with MDATA PID Since the BeagleUsb2DataMatch has its own fields for
38. 0 Output is only rated for 1 8 V The USB 3 0 output of the Beagle USB 5000 analyzer have been optimized for maximum edge performance at 125 MHz Consequently it cannot tolerate voltage signals higher than 1 8 V Applying signals with higher voltage will damage your analyzer and is not covered by the warranty The USB 3 0 external output has a short latency of 50 to 75 ns from when a trigger occurs and when the output is asserted on the SMA connector The output can be asserted by a sophisticated matching system which provides a spectrum of functionality from simple matches all the way to complicated multi state triggers The behavior of the output is configurable and can be set to e Set Low Set High Positive Pulse Negative Pulse Toggle Initially Low Toggle Initially High When configured as a positive or negative pulse the pulse width is 24 ns For FW versions before v1 10 the pulse width is 40 ns WARNING The USB 2 0 Output is only rated for 3 3 V Applying signals with higher voltage will damage your analyzer and is not covered by the warranty The USB 2 0 external outputs are available on pins 5 through 8 on the Mini DIN 9 connector These outputs behave similarly to the digital outputs of the Beagle USB 480 analyzer as described in Section 3 4 4 except that the output level is 3 V 65 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 3 3 7 Cross Analyzer Sync Overview Multiple point analysis of
39. 0x96 BG USB PID PRE Ox3c BG USB PID ERR Ox3c BG USB PID SPLIT 0x78 BG USB PID PING Oxb BG USB PID EXT OxfO 10 In addition to the general read status values in Table 11 the USB read functions can also return USB specific status values The enumerated types are listed in Table 19 Table 19 USB Read Status definitions Status Codes for USB 12 USB 480 and USB 5000 BG READ USB ERR BAD SIGNALS Incorrect line states BG READ USB ERR BAD PID Captured packet has bad PID 123 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Cannot find SYNC signal Bit stuffing error detected Incorrect End of packet End of packet too long Available truncated data mask Captured packet in truncation mode 11 Additional event information is returned by the USB read functions through the events argument The event information is bitmask encoded with the enumerated types defined in Tables 20 21 22 24 25 23 Refer to Section 1 1 2 for details on how these events pertain to the USB architecture Table 20 USB 12 480 and 5000 Event Code definitions Event Codes for USB 12 USB 480 and USB 5000 124 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG EVENT USB HOST DISCONNECT Target Host disconnected BG EVENT USB TARGET DISCONNECT Target Device disconnected BG EVENT USB HOST CONNECT Target Host connected BG EVENT USB TARGET CONNECT Target Dev
40. 2DataMatchUnit u08 BeagleUsb2DataMatchUnit u08 BeagleUsb2TimerMatchUnit data 0 valid data 0 data 1 valid data 1 u data 2 valid data 2 data 3 valid data 3 timer valid timer 156 TOTAL PHASE Beagle Protocol Analyzer User Manual u08 a sync valid BeagleUsb2AsyncEventMatchUnit async u08 goto 0 u08 goto 1 u08 goto 2 Up to 3 destination states can be defined per state These states should be set using the goto N fields Match units can pick one of these 3 destination states using their goto selector 0 1 or 2 fields Each state can accomodate up to 4 data match units 1 timer match unit and 1 asynchronous event match unit To denote a valid match unit object the corresponding valid field should contain a non zero value Data Match Units The BeagleUsb2DataMatchUnit should be used to create a data match unit The fields are described in Table 47 and Table 68 Data match unit configuration struct BeagleUsb2DataMatchUnit BeagleUsb2PacketType packet type BeagleUsb2DataMatchPrefix prefix u08 handshake ul6 data length u08 data ul6 data valid length u08 data valid BeagleUsb2ErrorType err match 08 data properties valid BeagleUsb2DataProperties BeagleUsb2MatchModifier ul6 u08 08 u08 Fa data_properties match modifier repeat count sticky action action mask goto selector Table 47 BeagleUsb2DataMatchUnit field descriptions packet type The type
41. 32 END EDB Framing Data properties configuration struct BeagleUsb3DataProperties Beag LeUsbMatchType source match type BeagleUsbSource source match val BeagleUsbMatchType ep match type u08 ep match val BeagleUsbMatchType dev match type u08 dev match val BeagleUsbMatchType stream id match type ul6 stream id match val BeagleUsbMatchType data len match type ul6 data len match val 188 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The BeagleUsbMatchType enumerated type is used in data property objects to determine whether a match field should assert on the values being equal greater or equal less or equal or dont care disabled The different enumerated types are listed below Restrictions on usage are indicated by footnotes BG USB MATCH TYPE DISABLED BG USB MATCH TYPE EQUAL BG USB MATCH TYPE LESS EQUAL 4 e BG USB MATCH TYPE GREATER EQUAL 4 4 Only valid when used in the data len match type field The BeagleUsbSource enumerated type is used only in the source match val field The enumerated types are listed in Table 30 Fields ep match val dev match val anddata len match val allow any value subject to unsigned integer range limitations The match modifier gives the ability to modify the polarity of the matching conditions The available match modifiers are described in Table 66 If any feature is disabled i e the data length or data properties valid is 0 then that part of t
42. 8 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG USB2 MATCH PACKET STALL Match on STALL packets BG USB2 MATCH PACKET DATAO DATA1 Match on DATAO or DATA1 packets BG USB2 MATCH PACKET DATAX Match on DATAO DATA1 DATA2 or MDATA packets BG USB2 MATCH PACKET SUBPID MASK Mask a standard packet type with this to mark it as a SubPID BG USB2 MATCH PACKET ERROR types The BeagleUsb2DataMatchPrefix enumerated type is used in data match units to denote what type of PID should precede the desired packet type This feature is not valid for ERROR types The different enumerated types are described in the Table 49 Table 49 BeagleUsb2DataMatchPrefix enumerated values BG USB2 MATCH PREFIX CSPLIT IN BG USB2 MATCH PREFIX SSPLIT OUT BG USB2 MATCH PREFIX SSPLIT SETUP The handshake parameter takes a bitmask of available packet handshake parameters This feature is not available for ERROR packet types The available handshake options are described in Table 50 BG USB2 MATCH PREFIX CSPLIT 159 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Table 50 BeagleUsb2DataMatchUnit handshake bitmask values BG USB2 MATCH HANDSHAKE MASK DISABLED BG USB2 MATCH HANDSHAKE MASK NONE BG USB2 MATCH HANDSHAKE MASK ACK BG USB2 MATCH HANDSHAKE MASK NAK BG USB2 MATCH HANDSHAKE MASK NYET BG USB2 MATCH HANDSHAKE MASK STALL The BeagleUsb2ErrorType enumerated type is used differently depending on the match packet type th
43. 9 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 2 Hardware Specifications 2 1 Beagle USB 5000 SuperSpeed Protocol Analyzer v2 2 1 1 Front Panel The front panel Figure 29 of the Beagle USB 5000 Protocol Analyzer offers a number of LED indicators and connectors Target Power Target Host Target Device Capture External LED Light Port Port LED Light Input amp Output BEAGLE ss 000 iain DEVICE tipser Target Power USB 3 0 2 0 Activity Trigger Mini DIN 9 Port Button LED Lights LED Light Figure 29 Beagle USB 5000 SuperSpeed Protocol Analyzer v2 Front Analyzer Power The Beagle USB 5000 analyzer power indicator is integrated into the Total Phase logo located above the USB 3 0 External Input Output connectors When the analyzer is powered the large circle in the Total Phase logo will be illuminated Target Power The Target Power indicator consists of two elements the large white circular button and the LED indicator in the upper right corner of the button When the button is pressed V gus Will be disconnected between the target host and target device When Vg is present the white LED will be on When the button is pressed to disconnect Vays the white LED will turn off Vas can also be disconnected by software Should Vas be disconnected in this way the LED will turn off as expected 40 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Target Host and Target Device Ports The Target Host
44. 9 TOTAL PHASE Beagle Protocol Analyzer User Manual match units match at the same time the first match unit will have priority as to which state is transitioned to Data Match Unit A data match unit can match specific data packet types or data in either the upstream direction or downstream direction The types of data that can be matched are link commands header packets data packets qualified data packets and training sequences Within each of these packet types specific subtypes or data patterns can be defined For example under link commands only LGOOD 3 can be specified For any of the packet types valid or invalid CRCs can be specified as part of match criteria of the match unit Table 6 Match Supported Packets Link Command LGOOD n LGOOD 0 7 LRTY LBAD LCRD x LCRD A D LGO Ux LGO U 1 3 LAU LXU LPMA LUP LDN Header Packet Link Management Packet Transaction Packet Data Packet Header Isochronous Timestamp Packet Data Packet Data Packet Training Sequence TSEQ TS1 TS2 Part of the criteria of a match unit is the ability to match for the negative criteria For example a match unit can be set to match LGOOD n only or match any other Link Command packet NOT LGOOD n The negative criteria normally only applies within a group of packets In the previous example matching NOT LGOOD n will only match any other link command that is not an LGOOD n However sometimes it is useful to be able to match any
45. Addressing Multi master support Data broadcast general call For more information about other features see the references at the end of this section 1 2 4 IC Benefits and Drawbacks Since only two wires are required 1 C is well suited for boards with many devices connected on the bus This helps reduce the cost and complexity of the circuit as additional devices are added to the system Due to the presence of only two wires there is additional complexity in handling the overhead of addressing and acknowledgments This can be inefficient in simple configurations and a direct link interface such as SPI might be preferred 1 2 5 I C References 12C bus NXP Philips Semiconductors Official FC website C Inter Integrated Circuit Bus Technical Overview and Frequently Asked Questions Embedded Systems Academy Introduction to IC Embedded com I C Open Directory Project Listing 33 TOTAL PHASE Beagle Protocol Analyzer User Manual 1 3 SPI Background 1 3 1 SPI History SPI is a serial communication bus developed by Motorola It is a full duplex protocol which functions on a master slave paradigm that is ideally suited to data streaming applications 1 3 2 SPI Theory of Operation SPI requires four signals clock SCLK master output slave input MOSI master input slave output MISO and slave select SS Figure 25 Sample SPI Implementation Each slave device requires a separa
46. B 3 0 USB 3 0 General Packet Structures Packets in USB 3 0 generally come in 3 different patterns Header Packet Header Packets consist of three parts header packet framing packet header and a link control word Note that SHP is a a K symbol which stands for start header packet The header is protected by CRC 16 and the link control word is protected by CRC 5 Data Payload Packet Data Payload Packets send application data and are protected by CRC 32 Note that SDP stands for start data packet payload Link Command Packet Link Command Packets are used to control various link specific features including low power states and flow control A Link Command Packet atually consists of two identical Link Command Words where each Link Command Word is protected by a CRC 5 Note that SLC stands for start link command Link Management Packets LMP Link Management Packets LMP are a type of header packet used to manage the link between two ports Figure 18 Because these packets are used to manage a single link they only travel between the two link partners and therefore require no addressing information 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 210 SubType Specific SubType Type DWORD 0 SubType Specific DWORD 1 SubType Specific DWORD 2 Link Control Word CRC 16 DWORD 3 25 TOTAL PHASE Beagle Protocol Analyzer User Manual Figure 18 abov
47. B devices must pass a USB IF compliance test in order to be considered in compliance and to be able to use the USB logo USB 1 0 was first introduced in 1996 but was not adopted widely until 1998 with USB 1 1 In 2000 USB 2 0 was released and has since become the de facto standard for connecting devices to computers and beyond In 2008 the USB specification was expanded with USB 3 0 also known as SuperSpeed USB USB 3 0 represents a significant change in the underlying operation of USB To simplify the experience for the user USB 3 0 has been designed to be plug n play backwards compatible with USB 2 0 USB 3 0 specification include a number of significant changes including Higher data transfer rate up to 5 Gbps Increased bus power and current draw Improved power management Full duplex data communications Link Training and Status State Machine LTSSM Interrupt driven instead of polling 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Streaming interface for more efficient data transfers As of 2010 the USB standard specifies different flavors of USB low speed full speed high speed and SuperSpeed USB IF has also released additional specs that expand the breadth of USB These are On The Go OTG and Wireless USB Although beyond the scope of this document details on these specs can be found on the USB IF website 1 1 2 Architectural Overview USB is a host scheduled token based serial bus protocol
48. Beagle Protocol Analyzers y The Beagle Protocol Analyzers are non intrusive bus monitors which allow developers to see and analyze serial bus TOTAL data in real time as it appears on the bus All Beagle analyzers P HAS E feature Monitor packets in real time as they appear on the bus High speed USB up link to analysis computer Windows Linux and Mac OS X compatible Beagle USB 5000 SuperSpeed Protocol Analyzer v2 Features Non intrusive super high full and low speed USB monitoring 2 GB on board hardware buffer up to 4 GB supported Beagle Protocol Analyzers Digital inputs and outputs for synchronizing with external logic User Manual v5 10 Packet level timing down to 2 ns resolution November 27 2013 Advanced Match Action triggers and filters Data scrambling spread spectrum clocking and receiver detection Cross analyzer synchronization Beagle USB 480 Protocol Analyzer Series Features Non intrusive high full and low speed USB monitoring Large 64 MB on board hardware buffer 256 MB in Power models Digital inputs and outputs for synchronizing with external logic Packet level timing with 16 6 ns resolution e Vays Current Voltage Monitoring Power models only Advanced Match Action triggers and filters Power model Ultimate Edition only Beagle USB 12 Protocol Analyzer Features e Non intrusize full low speed USB monitoring 12 and 1 5 Mbps Bit level timing with 21 ns resolution
49. Beagle USB 480 Protocol Analyzer has an on board buffer which when full will cause the analyzer to stop capturing new data while allowing all of the previously captured data to be downloaded The BG CAPTURE STATUS TRANSFER will indicate that the capture has stopped because the buffer became full previous data is still available for download capture remaining to be downloaded will return the amount currently in buffer For the Beagle USB 480 analyzer this function can be useful for delayed download captures to poll the status of the buffer However calling this function issues a short communication between the Beagle USB 480 analyzer and the analysis PC If the Beagle analyzer is on the same bus that it is monitoring then calls to this function will take up bus bandwidth and can take up on board memory space due to the USB 167 TOTAL PHASE Beagle Protocol Analyzer User Manual broadcast architecture see Section 1 1 2 1 If bus bandwidth is a concern then polling the buffer should be kept to a minimum If polling is required then it is recommended that Self Filtering be enabled in order to eliminate the packets intended for the Beagle analyzer and thus save on board memory For Beagle 12 only the status of BG CAPTURE STATUS POST TRIGGER can be returned indicating that the capture is running Because there is no on board buffer capture remaining will always be 0 Read USB 2 0 bg_usb2_read int bg usb2 read Beagle
50. Beagle analyzer Sample Rate bg samplerate int bg samplerate Beagle beagle int samplerate khz Set the sample rate in kilohertz Arguments beagle handle of a Beagle analyzer samplerate khz New sample rate in kilohertz 108 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Return Value This function returns the actual sample rate set Specific Error Codes BG FUNCTION NOT AVAILABLE The Beagle analyzer does not support changing the sample rate BG STILL ACTIVE An attempt was made to change the configuration while the capture was still active Details Changes the sample rate for a Beagle analyzer The device must not currently have monitoring enabled If samplerate khz is 0 the function will return the sample rate currently set on the Beagle analyzer and the sample rate will be left unmodified The Beagle USB 12 analyzer and the Beagle USB 480 analyzer do not support changing the sample rate so it will always return the current sample rate Bit Timing Size bg bit timing size int bg bit timing size BeagleProtocol protocol int num data bytes Get the size of the timing data for the given protocol and data size Arguments protocol enumerated values specifying the protocol of the data see Table 9 num data bytes number of data bytes expected Return Value The number of timing entries to expect for given number of data bytes for the given protocol Specific Error Codes None Details 109
51. CAPTURE STATUS PRE TRIGGER Filling pre trigger BG CAPTURE STATUS PRE TRIGGER SYNC Synchronizing timestampes between multiple streams BG CAPTURE STATUS POST TRIGGER Filling post trigger BG CAPTURE STATUS TRANSFER Capture stopped downloading data BG CAPTURE STATUS COMPLETE Capture stopped all data downloaded Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is supported only for analyzers with on board triggering capability This function will block while the capture is in the pre trigger or sync standby states or until timeout ms milliseconds have passed Abort Capture bg capture stop int bg capture stop Beagle beagle Stop capturing data Arguments beagle handle of a Beagle analyzer Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes 111 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is supported only for analyzers with on board triggering capability For other analyzers use bg disabLe to stop the capture and download to PC Captured data may still be read from the hardware buffer after calling this function but new data will not be monitored This is different that bg disable which discards the capture buffer After callin
52. DB framing Please see Table 64 and Table 65 for more information When the match packet type is ERROR the BeagleUsb3ErrorType value is actually used as a bitmask to test for various bit corruptions The possible errors to test for are CRC errors framing errors a single corrupted symbol in the framing and unknown packets By masking these bits together on an ERROR packet type multiple error conditions can be matched with a single match unit 187 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The BeagleUsb3ErrorType value is not valid for any other packet type Table 64 BeagleUsb3ErrorType enumerated values When using SLC SHP SDP SHP SDP Packet Types BG USB3 MATCH CRC DONT CARE Both CRCs may be valid or fail BG USB3 MATCH CRC 1 VALID First CRC must be valid BG USB3 MATCH CRC 2 VALID Second CRC must be valid BG USB3 MATCH CRC BOTH VALID Both CRCs must be valid BG USB3 MATCH CRC EITHER FAIL Either CRC must fail BG USB3 MATCH CRC 1 FAIL First CRC must fail BG USB3 MATCH CRC 2 FAIL Second CRC must fail BG USB3 MATCH CRC BOTH FAIL Both CRCs must fail When using ERROR Packet Type BG USB3 MATCH ERR MASK CRC Any CRC failure BG USB3 MATCH ERR MASK FRAMING Any framing error BG USB3 MATCH ERR MASK UNKNOWN Any unknown packet Table 65 CRC 1 and CRC 2 Descriptions Link Command First CRC 5 Second CRC 5 Header Packet Header CRC 16 Link Control Word CRC 5 Data Packet Payload Data CRC
53. G USB3 COMPLEX MATCH EVENT VBUS PRESENT BG USB3 COMPLEX MATCH EVENT SSTX PHYERR 6 BG USB3 COMPLEX MATCH EVENT SSRX PHYERR 6 BG USB3 COMPLEX MATCH EVENT SMA EXTIN The edge mask field is a bitmask that specifies the event edge on which to trigger Zero or more of the following constants may be used e BG USB EDGE RISING e BG USB EDGE PULSE e BG USB EDGE FALLING 5 For the sake of clarity bits BG USB EDGE RISING and BG USB EDGE FALLING must both be set in the event edge mask as the analyzer will always match on either edge for these event types 191 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 6 Only bit BG USB EDGE PULSE should be set in the event edge mask Match Actions Each match unit can perform certain actions on a match event Table 68 Match unit action field descriptions repeat count The number of repeated matches after the first match that must occur before a match action is executed sticky action A non zero value will cause actions other than goto to be repeatedly executed while the number of repeated actions is less than or equal to repeat count action mask A bitmask of the action s that will be taken if a match situation occurs goto selector The goto N field from the complex match state object not the destination state to use for the goto action Valid values 0 1 2 The action mask field can contain zero or more of the following actions BG USB COMPLEX TRIGGER ACTION EX
54. IN4 e BG USB2 COMPLEX MATCH EVENT CHIRP 2 e BG USB2 COMPLEX MATCH EVENT SMA EXTIN e BG USB2 COMPLEX MATCH EVENT CROSS TRIGGER 3 BG USB2 COMPLEX MATCH EVENT VBUS TRIGGER The edge mask field is a bitmask that specifies the event edge s on which to trigger Zero or more of the following constants may be used BG USB EDGE RISING 163 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG USB EDGE PULSE BG USB EDGE FALLING The following constants may be used for EVENT CHIRP e BG USB EDGE DEVICE CHIRP e BG USB EDGE HOST CHIRP 2 Bits BG USB EDGE DEVICE CHIRP and BG USB EDGE HOST CHIRP are mutually exclusive Only one of these bits should be set in the event edge mask 3 Only bit BG USB EDGE PULSE should be set in the event edge mask The BeagleUsb2VbusTriggerType enumerated type is used to define the Vays trigger type to match on The different enumerated types are listed below Note that the vbus trigger type and vbus trigger val fields are valid only when the event type field is BG USB2 COMPLEX MATCH EVENT VBUS TRIGGER e BG USB2 VBUS TRIGGER TYPE CURRENT e BG USB2 VBUS TRIGGER TYPE VOLTAGE vbus trigger vaLlis a float value that specifies the threshold Valid values range from 0 to 24V for BG USB2 VBUS TRIGGER TYPE VOLTAGE and 3A to 3A for BG USB2 VBUS TRIGGER TYPE CURRENT Vgus trigger is currently avaiable for the Beagle 480 Power Protocol Analyzer Ultimate Edition only Capture mus
55. If the timeout is set to 0 there is no timeout interval and the read functions will block until the requested amount of data is captured or a complete packet with the appropriate bus end condition is observed This setting is distinctly different than the latency setting The timeout time should be set to a value longer than the latency time Sleep bg sleep ms u32 bg sleep ms u32 milliseconds Sleep for given amount of time Arguments milliseconds number of milliseconds to sleep Return Value This function returns the number of milliseconds slept Specific Error Codes None Details This function provides a convenient cross platform function to sleep the current thread using standard operating system functions The accuracy of this function depends on the operating system scheduler This function will return the number of milliseconds that were actually slept 102 TOTAL PHASE Beagle Protocol Analyzer User Manual Target Power bg_target_power int bg target power Beagle beagle u08 power flag Activate deactivate target power pins 4 and 6 Arguments beagle handle of a Beagle analyzer power mask enumerated values specifying power pin state See Table 7 Table 7 Power Flag definitions BG TARGET POWER OFF Disable target power pin BG TARGET POWER ON Enable target power pin BG TARGET POWER QUERY Queries the target power pin state Return Value The current state of the target power pins on the Beag
56. MatchType data len match type ul6 data len match val The BeagleUsb2DataMatchDirection is used to indicate the direction of the USB packet This is similar in nature to the prefix option but gives a broader sense of direction For example the IN direction would match all packets that are coming into the host including SSPLIT IN or CSPLIT IN The available direction options are described in Table 52 Table 52 BeagleUsb2DataMatchDirection enumerated values BG_USB2_MATCH_DIRECTION_DISABLED Disable direction matching BG_USB2_MATCH_DIRECTION_IN Match packets going into the host BG_USB2_MATCH_DIRECTION_OUT_SETUP Match packets going out of the host BG_USB2_MATCH_DIRECTION_SETUP Match SETUP packets going out of the host The BeagleUsbMatchType is described in Section 6 8 The match modifier gives the ability to modify the polarity of the matching conditions The available match modifiers are described in Table 53 In each case PID describes the matching of packet type as well as prefix and handshake If any feature is disabled i e the data length ordata properties validis 0 then that part of the match will always evaluate to true and then be modified by the match modifier Table 53 BeagleUsb2DataMatchModifier enumerated values BG USB2 MATCH MODIFIER 0 PID amp Pattern amp Data Property BG USB2 MATCH MODIFIER 1 PID amp Pattern amp Data Property BG USB2 MATCH MODIFIER 2 PID amp Pattern amp Da
57. Micro B Figure 10 connectors Given the small size of the original USB 2 0 micro connectors it was not possible to add the USB 3 0 signals in the same form factor The USB 3 0 micro plugs cannot interface with USB 2 0 receptacles but USB 2 0 micro plugs can interface with USB 3 0 receptacles USB 2 0 Signaling All USB devices are connected by a four wire USB cable These four lines are GND and the twisted pair D and D USB uses differential signaling on the two data lines There are four possible digital line states that the bus can be in single ended zero SEO single ended one SE1 J and K The single ended line states are defined the same regardless of the speed However the definitions of the J and K line states change depending on the bus speed Their definitions are described in Table 1 All data is transmitted through the J and K line states An SE1 condition should never be seen on the bus except for allowances during transitions between the other line states Table 1 Differential Signal Encodings J Sras ended zero E o 0 Howe o T LowspeedK t 0 High Fulkspeed J t 0 jHigh Full speed K O The actual data on the bus is encoded through the line states by a nonreturn to zero inverted NRZI digital signal In NRZI encoding a digital 1 is represented by no change in the line state and a digital O is represented as a change of the line state Thus every 14 9 TOTAL
58. OTAL PHASE Beagle Protocol Analyzer User Manual BG I2C NOT ENABLED 201 i2c not enabled BG SPI NOT AVAILABLE 300 spi feature not available BG I2C NOT AVAILABLE 200 i2c feature not available BG CROSS ANALYZER SYNC DISTURBED RE ENABLE 410 cross analyzer sync disturbed re enable capture BG CROSS ANALYZER SYNC DISTURBED RECONNECT 411 cross analyzer sync disturbed reconnect to analyzer BG MDIO NOT AVAILABLE 500 mdio feature not available BG MDIO NOT ENABLED 501 mdio not enabled BG MDIO BAD TURNAROUND 502 mdio bad turnaround field BG IV MON NULL PACKET null packet or length to bg iv mon parse BG IV MON INVALID PACKET LENGTH 601 packet length to bg iv mon parse too small 203 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 7 Legal Contact 7 1 Disclaimer All of the software and documentation provided in this datasheet is copyright Total Phase Inc Total Phase License is granted to the user to freely use and distribute the software and documentation in complete and unaltered form provided that the purpose is to use or evaluate Total Phase products Distribution rights do not include public posting or mirroring on Internet websites Only a link to the Total Phase download area can be provided on such public websites Total Phase shall in no event be liable to any party for direct indirect special general incidental or consequential damages arising from the use of its site
59. OTO SEL ACTION GOTO DEST BAD VBUS TRIGGER TYPE BAD VBUS TRIGGER THRES NO MULTI VBUS TRIGGERS IV MONITOR NOT ENABLED Details A edge mask field is invalid A ACTION FILTER action is being applied to a match unit that is not supported such as timer units asynchronous event units and ERR packet types Agoto selector field is invalid A BG USB COMPLEX MATCH ACTION GOTO action is being used with an invalid goto N destination state number Avbus trigger type field is invalid Avbus trigger val field is out of the valid range Only one Vgys trigger threshold is allowed across the states Vgus trigger is set without enabling current voltage monitoring bg usb configure must be called with BG USB CAPTURE USB2 BG USB CAPTURE IV MON LITE prior to this call This function is used to configure the USB 3 0 complex matching system on the Beagle USB analyzer The BeagleUsb3ComplexMatchState fields should be used to form a valid complex matching state machine The default state state 0 is the entry point of the state machine Complex match state configuration struct BeagleUsb3ComplexMatchState u08 BeagleUsb3DataMatchUnit u08 BeagleUsb3DataMatchUnit u08 BeagleUsb3DataMatchUnit u08 BeagleUsb3DataMatchUnit u08 BeagleUsb3DataMatchUnit u08 BeagleUsb3DataMatchUnit u08 tx data 0 valid tx data 0 tx data 1 valid tx data 1 tx data 2 valid tx data 2 rx data
60. PHASE Beagle Protocol Analyzer User Manual time a 0 is transmitted the line state will change from J to K or vice versa However if a 1 is being sent the line state will remain the same USB has no synchronizing clock line between the host and device However the receiver can resynchronize whenever a valid transition is seen on the bus This is possible provided that a transition in the line state is guaranteed within a fixed period of time determined by the allowable clock skew between the receiver and transmitter To ensure that a transition is seen on the bus within the required time USB employs bit stuffing After 6 consecutive 1s in a data stream i e no transitions on the D and D lines for 6 clock periods a 0 is inserted to force a transition of the line states This is performed regardless of whether the next bit would have induced a transition or not The receiver expecting the bit stuff automatically removes the 0 from the data stream USB 3 0 Signaling USB 3 0 signaling occurs on two dedicated pairs of differential pairs for transmission and reception Due to the full duplex nature of the USB 3 0 bus the bus operates differently from a USB 2 0 bus USB 3 0 continues to use the concept of endpoints pipes and the four basic types of transfers control interrupt bulk and isochronous USB 3 0 still uses three part transaction of Token Data and Handshake but the components are used differently In the case of OUTs the
61. SB3 SIMPLE MATCH SSTX SHP 181 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG USBS3 SIMPLE MATCH SSTX SDP BG USB3 SIMPLE MATCH SSRX IPS BG USB3 SIMPLE MATCH SSRX SLC BG USBS3 SIMPLE MATCH SSRX SHP BG USB3 SIMPLE MATCH SSRX SDP BG USB3 SIMPLE MATCH SSTX SLC CRC 5A CRC 5B BG USB3 SIMPLE MATCH SSTX SHP CRC 5 BG USB3 SIMPLE MATCH SSTX SHP CRC 16 BG USB3 SIMPLE MATCH SSTX SDP CRC BG USBS3 SIMPLE MATCH SSTX SLC SLC CRC BG USB3 SIMPLE MATCH SSRX SLC CRC 5A CRC 5B BG USB3 SIMPLE MATCH SSRX SHP CRC 5 BG USB3 SIMPLE MATCH SSRX SHP CRC 16 BG USB3 SIMPLE MATCH SSRX SDP CRC BG USB3 SIMPLE MATCH SSRX SLC SLC CRC BG USB3 SIMPLE MATCH EVENT SSTX LFPS BG USB3 SIMPLE MATCH EVENT SSTX POLARITY BG USB3 SIMPLE MATCH EVENT SSTX DETECTED BG USB3 SIMPLE MATCH EVENT SSTX SCRAMBL BG USB3 SIMPLE MATCH EVENT SSRX LFPS BG USB3 SIMPLE MATCH EVENT SSRX POLARITY BG USB3 SIMPLE MATCH EVENT SSRX DETECTED BG USB3 SIMPLE MATCH EVENT SSRX SCRAMBL BG USB3 SIMPLE MATCH EVENT VBUS PRESENT BG USB3 SIMPLE MATCH EVENT SSTX PHYERR BG USB3 SIMPLE MATCH EVENT SSRX PHYERR BG USB3 SIMPLE MATCH EVENT SMA EXTIN 182 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The BeagleUsb3ExtoutMode enumerated type is used to set the mode of EXTOUT operation The different enumerated types are described in Table 60 Table 60 BeagleUsb3ExtoutMode enumerated values BG USB3 EXTOUT DISABLED EXTOUT is disabled BG USB3 EXTOUT TRIGGER
62. SE Beagle Protocol Analyzer User Manual configuration of the SPI devices being monitored the capture data from the monitor may be corrupted Read SPI bg_spi_read int bg spi read Beagle Read data from the SPI port Arguments beagle status time sop time duration time dataoffset mosi max bytes data mosi miso max bytes data miso Return Value u32 u64 u64 u32 int u08 int u08 beagle status time sop time duration time dataoffset mosi max bytes data mosi miso max bytes data miso handle of a Beagle analyzer filled with the status bitmask as detailed in Table 11 filled with the timestamp when the data read begins filled with the number of ticks that it took to read the data filled with the timestamp when data appeared on the bus maximum number of MOSI bytes to fill an allocated array of u08 which is filled with the data sent from the master to the slave maximum number of MISO bytes to fill an allocated array of u08 which is filled with the data sent from the slave to the master This function returns the number of bytes read or a negative value indicating an error Specific Error Codes None Details 119 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The function will block until the requested amount of data is captured a complete packet with slave select deassertion is observed or the bus is idle for longer than the timeout inter
63. So lO Uo DH 29 M GND Ground GND Pin 2 GND Pin 10 It is imperative that the Beagle analyzer s ground lead is connected to the ground of the target system Without a common ground between the two the signaling will be unpredictable and communication will likely be corrupted Two ground pins are provided to ensure a secure ground path 12C Pins SCL Pin 1 Serial Clock line the signal used to synchronize communication between the master and the slave SDA Pin 3 54 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Serial Data line the bidirectional signal used to transfer data between the transmitter and the receiver SPI Pins SCLK Pin 7 Serial Clock control line that is driven by the master and regulates the flow of the data bits MOSI Pin 8 Master Out Slave In this data line supplies output data from the master which is shifted into the slave MISO Pin 5 Master In Slave Out this data line supplies the output data from the slave to the input of the master SS Pin 9 Slave Select control line that allows slaves to be turned on and off via hardware control MDIO Pins MDC Pin 7 Management Data Clock control line that is driven by the STA and synchronizes the flow of the data on the MDIO line MDIO Pin 8 Management Data Input Output the bidirectional signal used to transfer data between the STA and the MMD Powering Downstream Devices I
64. T USB LTSSM STATE POLLING ACTIVE LTSSM Polling Active substate BG EVENT USB LTSSM STATE POLLING CONFIG LTSSM Polling Configuration substate 127 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG EVENT USB LTSSM STATE POLLING IDLE LTSSM Polling ldle substate BG EVENT USB LTSSM STATE RECOVERY ACTIVE LTSSM Recovery Active substate BG EVENT USB LTSSM STATE RECOVERY CONFIG LTSSM Recovery Configuration substate BG EVENT USB LTSSM STATE RECOVERY IDLE LTSSM Recovery Idle substate BG EVENT USB LTSSM STATE HOT RESET ACTIVE LTSSM Hot Reset Active substate BG EVENT USB LTSSM STATE HOT RESET EXIT LTSSM Hot Reset Exit substate BG EVENT USB LTSSM STATE LOOPBACK ACTIVE LTSSM Loopback Active substate BG EVENT USB LTSSM STATE LOOPBACK EXIT LTSSM Loopback Exit substate BG EVENT USB LTSSM STATE COMPLIANCE LTSSM Compliance Mode state 6 8 2 Using the Beagle USB API In order to use the USB API with the Beagle USB Protocol Analyzers a number of subsystems need to be configured properly before capture data can be read The sequence of typical configuration commands are as follows 1 Call bg open to open a handle to a Beagle analyzer 2 Callbg timeout to set the read timeout 3 Call bg latency to set the capture latency 4 Callbg usb2 capture buffer configor bg usb3 capture buffer config to configure the hardware capture buffers 128 9 TOTAL PHASE Beagle Protocol Analyzer User Manual These functions
65. TATUS STALL Device Notification DEV NOTIFICATION PING PING RESPONSE Data Packets DP Data Packets DP are used to transmit application data and are comprised of two parts a data packet header DPH and a data packet payload DPP Figure 20 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 109 8 7 6 54 32 1 0 Device Address Route String Reserved Type DWORD 0 Data Length s Rsvd Ept Num Io IRI Seq DWORD 1 Reserved Pr Reserved Stream ID Reserved DWORD 2 Data Packet Header DPH Link Control Word CRC 16 DWORD 3 Data DWORD 0 DWORD 0 Xx XxH Data Packet Payload DPP xx 4 CRC 32 ridi Note The framing symbols around the DPH and DPP are left out of this figure for the sake of readability Figure 20 Data Packet DP Data Packets are used to transmit application data between the host and device A Data Packet is composed of a Data Packet Header DPH and the Data Packet Payload DPP Image courtesy of USB Implementers Forum Since data is being sent between the host and device DP packets have a route string to direct it to intended device Isochronous Timestamp Packets ITP Isochronous Timestamp Packets ITP are used to send timestamps to all devices for synchronization Figure 20 ITPs are the only packets that are broadcast by the host to all active devices Since this packet is broadcast it does not require a route strin
66. TOUT BG USB COMPLEX TRIGGER ACTION TRIGGER BG USB COMPLEX TRIGGER ACTION FILTER 7 BG USB COMPLEX TRIGGER ACTION GOTO 7 Only valid in packet based data match units not in timer or asynchronous event match units Configure Matching bg usb3 complex match config single int bg usb3 complex match config single Beagle beagle u08 validate u08 extout BeagleUsb3ComplexMatchState state Configure the USB 3 0 complex matching system for triggering Arguments 192 9 TOTAL PHASE Beagle Protocol Analyzer User Manual beagle handle of a Beagle analyzer validate validate a configuration state without actually programming the Beagle analyzer extout enable EXTOUT assertion on complex match state data timer and async match units corresponding to the initial state Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details Same as bg usb3 complex match config except that only one state can be provided This is a convenience function for users that can or want to only use one state This function will configure state 0 and clear all others See Section 6 8 5 9 for more details Enable Complex Matching bg usb3 complex match enable int bg usb3 complex match enable Beagle beagle Enable the USB 3 0 complex matching system Arguments beagle handle of a Beagle analyzer Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes No
67. Table 37 For analyzers that do not have on board triggering capability pretrig kb will return 0 and capture kb will return the buffer size For the Beagle 480 65536 or 145 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 64 MB will be returned for capture kb since there is a 64 MB post trigger buffer available For the Beagle 12 capture kb will be returned as 0 since there is essentially no on board capture buffer Table 37 capture kb constants BG USB CAPTURE SIZE INFINITE Infinite capture BG USB CAPTURE SIZE SCALE Copy pretrig to capture ratio from USB 3 0 buffer configuration Configure Target bg usb2 target config int bg usb2 target config Beagle beagle u32 target config Specify the speed of the USB 2 0 target link Arguments beagle handle of a Beagle analyzer target config target configuration as detailed in Table 38 which includes the intended speed of the USB 2 0 link and an option to start the capture without the target host V BUS Table 38 Beagle Usb2 Target Config constants BG USB2 AUTO SPEED DETECT Configure to auto detect the bus speed BG USB2 LOW SPEED Configure to lock to low speed capture BG USB2 FULL SPEED Configure to lock to full speed capture BG USB2 HIGH SPEED Configure to lock to high speed capture BG USB2 VBUS OVERRIDE Configure to not require Vas or capture Return Value A Beagle status code of BG OK is returned on success or an error code as detai
68. USB TRIGGER event along with the triggering packet or event 14 Complex triggers are represented by a BG EVENT COMPLEX TRIGGER event along with state information indicating the complex state in which the trigger occurred Complex triggers like simple triggers come with the triggering packet or event Table 23 USB 5000 USB 2 0 and 3 0 Trigger Event Code definitions Trigger Event Codes for USB 5000 BG EVENT USB VBUS TRIGGER Veus trigger event detected BG EVENT USB COMPLEX TIMER Complex timer lapsed BG EVENT USB COMPLEX TRIGGER Complex trigger event BG EVENT USB TRIGGER Simple trigger event BG EVENT USB TRIGGER STATE MASK Bitmask of trigger state number BG EVENT USB TRIGGER STATE SHIFT Shift amount to recover state number Table 24 USB 5000 USB 3 0 General Event Code definitions 126 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG EVENT USB TRIGGER 5GBIT START Table 25 USB 5000 USB 3 0 LTSSM Event Code definitions LTSSM Event Codes for USB 5000 BG EVENT USB LTSSM STATE UNKNOWN Unknown LTSSM state BG EVENT USB LTSSM STATE SS DISABLED LTSSM SS Disabled state BG EVENT USB LTSSM STATE SS INACTIVE LTSSM SS Inactive state BG EVENT USB LTSSM STATE RX DETECT RESET LTSSM Rx Detect reset BG EVENT USB LTSSM STATE RX DETECT ACTIVE LTSSM Rx Detect active BG EVENT USB LTSSM STATE POLLING LFPS LTSSM Polling LFPS substate BG EVENT USB LTSSM STATE POLLING RXEQ LTSSM Polling RxEQ substate BG EVEN
69. USB allows for the connection of up to 127 devices on a single USB host controller A host PC can have multiple host controllers which increases the maximum number of USB devices that can be connected to a single computer Devices can be connected and disconnected at will The host PC is responsible for installing and uninstalling drivers for the USB devices on an as needed basis A single USB system comprises of a USB host and one or more USB devices There can also be zero or more USB hubs in the system A USB hub is special class of device The hub allows the connection of multiple downstream devices to an upstream host or hub In this way the number of devices that can be physically connected to a computer can be increased A USB device is a peripheral device that connects to the host PC The range of functionality of USB devices is ever increasing The device can support either one function or many functions For example a single multi function printer may present several devices to the host when it is connected via USB It can present a printer device a scanner device a fax device etc All the devices on a single USB must share the bandwidth that is available on the bus It is possible for a host PC to have multiple buses which would all have their own separate bandwidth Most often the ports on most motherboards are paired such that each bus has two downstream ports TOTAL PHASE Beagle Protocol Analyzer User Manual T
70. Upon detecting a data line pulse the Beagle software will return an event corresponding to this condition After detecting a data line pulse the software will report a Vays pulse if it is seen on the bus Note that this means that any Vays pulse that occurs without a preceding data line pulse will not be reported since it is completely out of the OTG specification If the SRP is successful it will be followed by a host connect event If it is unsuccessful then it will be followed by a host disconnect event 3 4 3 Digital Inputs Digital inputs provide a means for users to insert events into the data stream There are four digital inputs that can be enabled individually Whenever an enabled input changes state it will issue an event and be tagged with a timestamp of when the input was interpreted by the Beagle USB 480 analyzer Digital inputs cannot exceed a rate of 30 MHz Digital inputs that occur faster than that are not guaranteed to be interpreted correctly by the Beagle analyzer Also only one digital input event may occur per active packet All other digital input events can only be handled after the packet has completed Digital inputs although guaranteed to have the correct timestamp given the previous conditions have the possibility of being presented out of order because they are provided randomly by the user and have no direct correlation to the bus Note the digital inputs are susceptible to cross talk if they are not being actively
71. V Important See the above disclaimer Section 2 2 5 for operating the analyzer above the rated current and voltage 2 2 7 Signal Specifications Power Consumption Speed The Beagle USB 480 Protocol Analyzer supports capture of all wired USB speeds The analyzer has automatic speed detection as well as manual speed locking 49 9 TOTAL PHASE Beagle Protocol Analyzer User Manual ESD Protection The Beagle analyzer has built in electrostatic discharge protection to prevent damage to the unit from high voltage static electricity Power consumption When the Beagle analyzer is connected it consumes a maximum of approximately 2 5 mA from the capture host This is a minimal overhead in addition to the current draw of the target device Note that if a capture target reports itself as a 100 mA device and draws almost all of that current the Beagle analyzer s extra power consumption may cause the overall power consumption to be out of spec The Beagle analyzer consumes a maximum of approximately 180 mA 2 3 Beagle USB 12 Protocol Analyzer 2 3 1 Connector Specification On one side of the Beagle USB 12 monitor is a single USB B receptacle This is the Analysis side Figure 35 This port connects to the analysis computer that is running the Beagle Data Center software ce n C Analysis Port Figure 35 Beagle USB 12 Protocol Analyzer Analysis Side On the opposite side is the Capture side Figure 36 are a USB A and
72. a USB system is extremely helpful in a variety of development scenarios The most obvious example is hub development where traffic is sent between the hub and the host as well as between the hub and the device Normally clock drift prevents the reliable correlation of captured data from two different analyzers Synchronizing capture events start trigger stop on multiple analyzers also proves difficult Beagle Cross Analyzer Sync solves the challenges posed by multiple point analysis allowing users to easily and reliably monitor both sides of a USB hub or any number of points in a USB system Two HDMI ports on the back of the Beagle USB 5000 analyzer Section 2 1 2 3 allow two or more analyzers to synchronize their capture timestamps as well as their capture start capture trigger and capture stop events Setup Cross Analyzer Sync is easy to use Connect the SYNC OUT port on one Beagle USB 5000 analyzer to the SYNC IN port on another analyzer Once two analyzers are connected adding more analyzers to the chain is simple The following steps describe the setup process 1 Connect SYNC OUT on one analyzer to SYNC IN on another analyzer to begin a sync chain 2 Connect SYNC OUT on the last analyzer in the chain to SYNC IN on an unconnected analyzer to extend the sync chain Repeat this step as desired to expand the sync chain Start Capture Once a Cross Analyzer Sync chain is setup follow the steps below to start a synchronize
73. a slower speed device however the data following the SPLIT is transmitted to the hub at high speed data rates and does not choke the high speed bus m8 Eza EJ E USB Host it Token Data Handshake E USB Hub Pocket Packet En Pocket Pocket Figure 16 Split Bulk Transactions When full low speed USB traffic is sent through a high speed USB hub the transactions are preceded by a SPLIT token to allow the hub to asynchronously handle the full low speed traffic without blocking other high speed traffic from the host In this example bulk packets for a full speed device are being sent through the high speed hub Multiple CSPLIT IN NYET transactions can occur on the bus until the high speed hub is ready to return the DATA from the downstream full low speed device Although all SPLIT transactions have the same PID there are two over arching types of SPLITs Start SPLITs SSPLIT and Complete SPLITs CSPLIT SSPLITs are only used the first time that the host wishes to send a given transaction to the device Following that it polls the hub for the devices response with CSPLITs The hub may respond many times with NYET before supplying the host with the devices response Once this transaction is complete it will begin the next hub transaction with an SSPLIT Figure 16 illustrates an example of hub transaction Start of Frame Transactions Start of Frame SOF transactions are issued by the host at precisely timed
74. acket on the bus If a packet is truncated the read function will set the BG USB TRUNCATION MODE flag in the status field The number of bytes actually available for inspection will be set in the status field as well and can be found by masking the status with BG USB TRUNCATION LEN MASK Even if truncation is enabled USB 3 0 match units will still be able to test against the full length of the packet 179 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Table 58 USB 3 0 truncation modes BG USB3 TRUNCATION OFF Disable truncation BG USB3 TRUNCATION 20 Truncate to 20 symbols BG USB3 TRUNCATION 36 Truncate to 36 symbols BG USB3 TRUNCATION 68 Truncate to 68 symbols Enable External I O bg usb3 ext io config int bg usb3 ext io config Beagle beagle bool extin enable BeagleUsbExtoutType extout modulation Enable the SMA External Inputs Outputs Arguments beagle handle of a Beagle analyzer extin enable a non zero value enables EXTIN monitoring and matching extout modulation mode of EXTOUT signal modulation Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG CONFIG ERROR An attempt was made to set an invalid configuration Details The BeagleUsbExtoutType enumerated type is used to set the mode of EXTOUT signal modulation The different enumerated types are described in the table below Table 59 BeagleUsbExtoutType enumerated values
75. al amount of available current supply it is advisable to plug the Beagle analyzers directly into the analysis PC s USB host port or to use a self powered hub 56 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 2 5 USB 2 0 All Beagle analyzers are high speed USB 2 0 devices They require a high speed USB 2 0 host controller for the analysis data connection 2 6 Temperature Specifications The Beagle analyzers are designed to be operated at room temperature 10 35 C The electronic components are rated for standard commercial specifications 0 70 C However the plastic housing along with the ribbon and USB cables may not withstand the higher end of this range Any use of the Beagle analyzer outside the room temperature specification will void the hardware warranty 57 TOTAL PHASE Beagle Protocol Analyzer User Manual 3 Device Operation 3 1 Electrical Connections 3 1 1 Beagle USB Protocol Analyzers The Beagle USB analyzer s analysis port must be connected to the analysis computer through a USB cable The Capture side of the Beagle analyzer must be placed on the USB to be monitored Normally this is accomplished by placing the Beagle analyzer in line between the USB device and host being monitored In other words the bus to be monitored goes through the Beagle USB analyzer To properly accomplish this connection connect the target host to the USB B receptacle on the Capture side of the Beagle USB analyzer an
76. amble the data appropriately to properly interpret the data Data scrambling is implemented by applying an XOR to the transmitted data with a pseudo random number Receivers must then apply an XOR with the same number to the received data in order to descramble the data This pseudo random number is generated through the use of an linear feedback shift register LFSR that is updated upon the transmission reception of every symbol on the bus with the exception of COM and SKP symbols It is very important that the transmitter and receiver s LFSR stay synchronized otherwise data will be incorrectly descrambled To facilitate the synchronization of the LFSRs COM symbols will reset the LFSR on the transmitter and receiver Each training sequence packet TSEQ TS1 TS2 starts with at least one COM symbol and will therefore reset and synchronize the transmitter and receiver scrambling state According to the USB 3 0 specification the transmitter informs the receiver of its scrambling mode through a single bit in the TS1 and TS2 packets In order for a receiver to interpret the transmitted data correctly it must properly decode this bit and enable disable its descrambler as appropriate The Beagle USB 5000 Protocol Analyzer is able to reliably detect the state of data scrambling and the reset events Using its own LFSR the Beagle analyzer can robustly decode and descramble the tapped data By default data scrambling detection will be set to au
77. and cached in etc ld so cache On a Mac OS X system this is as follows 1 First search for the shared object in the application binary path 2 Next search in the applications current working directory 3 Search the paths explicitly specified in DYLD LIBRARY PATH 4 Finally check the usr lib and usr local lib system library paths If the DLL is still not found the BG UNABLE TO LOAD LIBRARY error will be returned by the binding function 4 6 3 DLL Versioning The Beagle DLL checks to ensure that the firmware of a given Beagle analyzer is compatible Each DLL revision is tagged as being compatible with firmware revisions greater than or equal to a certain version number Likewise each firmware version is tagged as being compatible with DLL revisions greater than or equal to a specific version number Here is an example 86 9 TOTAL PHASE Beagle Protocol Analyzer User Manual DLL v1 20 compatible with Firmware v1 15 Firmware v1 30 compatible with DLL v1 20 Hence the DLL is not compatible with any firmware less than version 1 15 and the firmware is not compatible with any DLL less than version 1 20 In this example the version number constraints are satisfied and the DLL can safely connect to the target firmware without error If there is a version mismatch the API calls to open the device will fail See the API documentation for further details 4 7 Rosetta Language Bindings API Integration into Custom App
78. ansaction packets Qualified NRDY transaction packets Qualified ERDY transaction packets Qualified ACK transaction packets with retry flag set carry 1k dp Number of times qualified data was transferred in chunks of 1 KB Table 35 BeagleUsb2Stats field descriptions carry 1k data Number of times data was transferred in chunks of 1 KB Any DATA packets DATAO 1 2 M Packets with corrupted PID Packets with failing CRC16 Packets with failing CRC5 Packets marked with rxerror IN NAK packet pairs PING NAK packet pairs 142 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Connection Specific USB 3 0 Statistics Connection specific statistics correspond to a particular USB 3 0 device address endpoint number and stream direction Settings for connection specific statistics must be configured prior to starting a capture or these statistics will not be tracked Use bg usb stats config to configure the device endpoint and stream direction you would like these statistics fields to track See Section 6 8 3 7 for details Resetting Statistics Counts To manually reset all of the statistics counts use bg usb stats reset See Section 6 8 3 9 for details 6 8 4 USB Monitor Interface USB 2 0 Configure USB 2 0 Capture bg usb2 capture config int bg usb2 capture config Beagle beagle BeagleUsb2CaptureMode capture mode Configure the capture mode Arguments beagle handle of a Beagle analyzer capture mode mode of
79. ar to the USB 2 0 Standard B connector with an additional structure at the top of the plug for the additional USB 3 0 pins Due to the distinct appearance of the USB 3 0 Standard B plug and receptacle they do not need to be color coded however many manufacturers color them blue to match the Standard A connectors 12 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Given the new geometry the USB 3 0 Standard B plug is only compatible with USB 3 0 Standard B receptacles Conversely the USB 3 0 Standard B receptacle can accept either a USB 2 0 or USB 3 0 Standard B plug C1 Added device PWR and GND pins Figure 8 USB 3 0 Powered B Connector USB 3 0 includes a variant of the Standard B connectors which has two additional conductors to provide power to USB adapters Image courtesy of USB Implementers Forum A Powered B variant of the Standard B connector Figure 8 is also defined by the USB 3 0 specification The Powered B connector has two additional pins to provide power to a USB adapter without the need for an external power supply Figure 9 USB 3 0 Micro A Connector USB 3 0 Micro A plug and receptacle Image courtesy of USB Implementers Forum 13 9 TOTAL PHASE Beagle Protocol Analyzer User Manual USB 2 0 USB 3 0 Portion Portion Figure 10 USB 3 0 Micro B Connector USB 3 0 Micro B plug and receptacle Image courtesy of USB Implementers Forum USB 3 0 also specifies Micro A Figure 9 and
80. are assigned values less than 0 separating these responses from any numerical values returned by certain API functions Each API function can return one of two error codes with respect to the loading of the Beagle DLL BG UNABLE TO LOAD LIBRARY and BG INCOMPATIBLE LIBRARY If these status codes are received refer to the previous sections in this datasheet that discuss the DLL and API integration of the Beagle software Furthermore all API calls can potentially return the errors BG UNABLE TO LOAD DRIVER or BG INCOMPATIBLE DRIVER If either of these errors are seen please make sure the driver is installed and of the correct version Where appropriate compare the language binding versions BG HEADER VERSION found in beagle h and BG CFILE VERSION found in beagle c to verify that there are no mismatches Next ensure that the Rosetta language binding e g beagle c and beagle h are from the same release as the Beagle DLL If all of these versions are synchronized and there are still problems please contact Total Phase support for assistance 91 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Note that any API function that accepts a Beagle handle can potentially return the error code BG INVALID HANDLE if the handle does not correspond to a valid Beagle analyzer that has already been opened If this error is received check the application code to ensure that the bg open command returned a valid handle and that this handle was not corr
81. at is configured In situations where the packet type is not configured to ERROR this field defines the type of CRC condition which is intended to be matched The various options include looking for failing and passing CRC conditions When the match packet type is ERROR the BeagleUsb2ErrorType value is actually used as a bitmask to test for various errors The possible errors to test for are CRC errors corrupted PIDs jabber and general PHY receive errors By masking these bits together on an ERROR packet type multiple error conditions can be matched with a single match unit Table 51 BeagleUsb2ErrorType enumerated values When not using ERROR BG USB2 MATCH CRC DONT CARE CRC may be valid or fail BG USB2 MATCH CRC VALID CRC must be valid BG USB2 MATCH CRC INVALID CRC must invalid When using ERROR BG USB2 MATCH ERR MASK CORRUPTED PID BG USB2 MATCH ERR MASK CRC BG USB2 MATCH ERR MASK RXERROR BG USB2 MATCH ERR MASK JABBER Jabber is matched by a high speed packet being greater than 1027 bytes a full speed packet being greater than 1026 bytes and a low speed packet being greater than 11 bytes These lengths include the PID and CRC Data properties configuration struct BeagleUsb2DataProperties 1 BeagleUsb2DataMatchDirection direction BeagleUsbMatchType ep match type 160 9 TOTAL PHASE Beagle Protocol Analyzer User Manual u08 ep match val BeagleUsbMatchType dev match type u08 dev_match_val BeagleUsb
82. at the analyzer is always up to date with the current requirements of the devices even when these settings change outside of the scope of an active capture Please note that according to the USB 3 0 specifications training sequences are never scrambled Consequently even if the data scrambling is manually turned on training sequences will not be scrambled Similarly K symbols are never scrambled even if the user manually turns the scrambling on It is important to note that the Beagle analyzer is detecting the data scrambling on the tapped signal and does not in any way influence or modify the signal sent between the transmitter and receiver By manually changing the data scrambling of the data the analyzer is simply changing the perception of the tapped signal and not modifying the data sent between the transmitter and receiver 3 3 5 Digital Inputs For the Beagle USB 5000 analyzer the digital inputs provide a means for users to trigger the capture or insert events into the data stream WARNING The USB 3 0 Input is only rated for 1 8 V The USB 3 0 input of the Beagle USB 5000 analyzer have been optimized for maximum edge performance at 125 MHz Consequently it cannot tolerate voltage signals higher than 1 8 V Applying signals with higher voltage will damage your analyzer and is not covered by the warranty For USB 3 0 there is a single external input that can be enabled by configuring matching in the device settings The USB 3 0 i
83. ata stream This filter however is only effective if the Beagle USB 480 analyzer is in fact connected to the same bus as it is analyzing If the Beagle analyzer is connected to a different host controller this filter should be disabled as there is a probability that another device on the Target bus will match the Beagle analyzers device address and data to that device will be lost Filters and Digital I O There are a couple of issues regarding the hardware filtering and digital I O that are worth noting Digital outputs are computed before any filtering takes place This means 76 9 TOTAL PHASE Beagle Protocol Analyzer User Manual that if an output is set to activate on a normally filtered packet the output will still activate even if the packet is never seen by the user For example if SOF filtering is enabled digital outputs set to activate upon seeing an SOF PID will still activate when an SOF is on the bus Digital inputs can potentially invalidate a filter The filters that are susceptible to this are the IN PING and SPLIT filters These filters suppress entire transactions based on the sequence of packets on the bus If an input trigger occurs at any time during this sequence the entire transaction is sent to the user As an example of this if IN NAK pair filtering is enabled and a digital input event occurs at any time between the start of the IN token and the very end of the NAK handshake the entire transaction will
84. atch when the selected PID device address endpoint and data pattern match The digital outputs activate as soon as their match can be fully confirmed Thus Pins 1 and 2 will match as soon as the capture activates or rxactive goes high respectively However Pins 3 and 4 must assure a match of all of their characteristics Therefore only once all possible PIDs device address and endpoints of a given packet are checked completely can the match be confirmed and the output asserted The assertion of matched data on Pin 4 must wait until the end of the data packet to assure a match Packets that are shorter then what is defined by the user to match will activate Pin 4 if all the data up to that point matched correctly Hardware specifications for the digital outputs are provided in Section 3 4 4 3 4 5 Hardware Filtering Hardware filters provide users with the ability to suppress data less transactions When possible the hardware filters will discard all packets that meet the filtering criteria These filters can save a significant amount of capture memory when used and are highly recommended when capture memory capacity is a concern 75 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Another benefit of the hardware filters is that they reduce the amount of traffic between the analysis computer and the Beagle analyzer This is especially useful for situations where the analysis computer has a hard time keeping up with the bandwidth
85. be reported to the user However if no digital input event occurs the IN NAK pair will be discarded 3 4 6 Capture Modes The Beagle USB 480 Protocol Analyzer provides the user with three different capture modes real time capture real time capture with overflow protection and delayed download Real time Capture Real time capture is the default capture mode It provides the user with real time status of the bus being monitored The real time capture can be stopped by three methods The first method is by having the user end the capture through a bg disable call or though the Beagle Data Center software The second method is if the Beagle analyzer loses power This is not the recommended method for stopping a capture Finally the capture will be automatically stopped by the Beagle USB 480 analyzer if the 64 MB hardware buffer 256 MB in Power models fills to capacity In this situation the Beagle analyzer will no longer capture new data from the monitored bus Instead calls to bg usb480 read will only retrieve whatever data is remaining in the buffer The last call of bg usb480 read will return a BG READ USB END OF CAPTURE indicating that the capture has stopped and that there is no new data The hardware buffer may fill in conditions where the analysis computer is not reading the data from the Beagle analyzer as fast as it is capturing new data Real time Capture with Overflow Protection Real time Capture with Ov
86. ble 5 9 8 7 3 5 4 2 j Figure 33 Beagle USB 480 Protocol Analyzer Digital I O Port Pinout Table 5 Digital I O Cable Pin Assignments Pin Name Golor Pin Number mpnz Re Pme The top of the Beagle USB 480 Protocol Analyzer has three LED indicators as shown in Figure 34 The green LED serves as an Analysis Port connection indicator The green LED will be illuminated when the Beagle analyzer has been correctly connected to the analysis computer and is receiving power from USB 47 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The amber LED serves as a Target Host connection indicator The amber LED will be illuminated when the target host computer is connected to the analyzer Finally the red LED is an activity LED Its blink rate is proportional to the amount of data being sent across the monitored bus If no data is seen on the bus but the capture is active the activity LED will simply remain on Anaylsis Port Connection Target Host k tivi Connection Activity Figure 34 Beagle USB 480 Protocol Analyzer LED Indicators Please check all the connections if the green or the amber LED fail to illuminate after the Beagle USB 480 analyzer has been connected to the analysis computer and the target host computer 2 2 2 Digital I O Digital inputs allow users to synchronize external logic with the analyzed USB data stream Whenever the state of an enabled digital input changes a
87. buffer for capture data This data is constantly streamed from the analyzer to the Analysis computer over the high speed data downlink after the trigger condition has been met Consequently the memory buffer is constantly being emptied which frees up resources for additional data This means that the Beagle analyzer is capable of capturing significantly more data than the available on board hardware buffer 2 1 4 Active Analog Buffer The Beagle USB 5000 analyzer features an active analog buffer circuit as part of the capture front end of the SuperSpeed signals to provide optimal signal integrity Each signal transmitted by the host and device is buffered and retransmitted The signal is not retimed to the respective receiver At the same time as data is retransmitted to the target receiver a parallel signal is passed to the analyzer for analysis The maximum latency for the analog buffering is less than 1 ns and thus the circuitry is non intrusive from the perspective of the host and 44 9 TOTAL PHASE Beagle Protocol Analyzer User Manual device Due to the high speed signaling of USB 3 0 data it is not practical to passively tap the data lines between host and device outside of very high end oscilloscopes and bit error rate testers Configurable SuperSpeed Front End For the convenience of the user it is possible to modify the receiver and transmitter settings of the active buffer circuitry On the receiver side users are able
88. cal hardware interface 2 2 1 Connector Specification On one side of the Beagle USB 480 monitor is a single USB B receptacle This is the Analysis side Figure 31 This port connects to the analysis computer that is running the Beagle Data Center software or custom application Furthermore the Beagle USB 480 analyzer Analysis side must be plugged in at any time a target device is plugged in This is to ensure that all connections are properly powered Analysis Port Figure 31 Beagle USB 480 Protocol Analyzer Analysis Side The opposite side is the Capture side Figure 32 and it contains a USB A and USB B receptacle These are used to connect the target host computer to the target device The target host computer can be the same computer as the analysis computer although it may not be optimal under certain conditions Digital I O Port Target Host Port Torget Device Port Figure 32 Beagle USB 480 Protocol Analyzer Capture Side 46 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The Capture side acts as a USB pass through In order to remain within the USB 2 0 specifications no more than 5 meters of USB cable should be used in total between the target host computer and the target device The Capture side also includes a mini DIN 9 connector which serves as a connection to the digital inputs and outputs Its pin outs are described in Figure 33 and the cable coloring for the included cable are described in Ta
89. capture 1 C SPI or MDIO signals the sampling rate must be set properly For SPI or MDIO monitoring the minimum requirement for the sampling rate is twice the bus bit rate For I C monitoring the sampling rate should be 5 10 times the bus bit rate For further details on this refer to Section 3 4 6 3 Logic High Levels All signal levels should be nominally 3 3 V 10 logic high This allows the Beagle analyzer to be used with both TTL 5 V and CMOS logic level 3 3 V devices A logic high of 3 3 V will be adequate for TTL compliant devices since such devices are ordinarily specified to accept logic high inputs above approximately 3 V ESD protection The Beagle analyzer has built in electrostatic discharge protection to prevent damage to the unit from high voltage static electricity This adds a small amount of parasitic capacitance approximately 15 pF to the signal path under analysis Power Consumption The Beagle analyzer consumes approximately 125 mA of power from the analysis PC However it reports itself to the analysis PC as a low power device This reporting allows the Beagle analyzer to be used when its analysis port is connected to a bus powered hub which are only technically specified to supply 100 mA per port Normally this extra amount of power consumption should not cause any serious problems since other ports on the hub are most likely not using their full 100 mA budget If there are any concerns regarding the tot
90. convenience function for users that can or want to only use one state This function will configure state 0 and clear all others See Section 6 8 4 11 for more details Enable Complex Matching bg usb2 complex match enable int bg usb2 complex match enable Beagle beagle Enable the USB 2 0 complex matching system Arguments beagle handle of a Beagle analyzer Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device 165 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Details This function is supported only for analyzers with on board triggering capability and licensed for USB 2 0 Complex triggering Complex matching must first be configured before it can be enabled Disable Complex Matching bg usb2 complex match disable int bg usb2 complex match disable Beagle beagle Disable the USB 2 0 complex matching system Arguments beagle handle of a Beagle analyzer Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is supported only for analyzers with on board triggering capability and licensed for USB 2 0 Complex triggering Since complex matching only requires a single configuration complex matching can be re enabled without reconfiguration after being disabled Query Captur
91. cted at full speed can cause data to be lost and corruption of capture data 6 4 2 Buffering Host Buffer Size bg host buffer size int bg host buffer size Beagle beagle u32 size bytes Set the amount of buffering that is to be allocated on the analysis PC Arguments beagle handle of a Beagle analyzer num bytes number of bytes in buffer Return Value This function returns the actual amount of buffering set Specific Error Codes 104 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG STILL ACTIVE An attempt was made to change the configuration while the capture was still active Details This function sets the amount of memory allocated to buffering data that has been siphoned off the Beagle analyzer by the host software library but not yet read by the application The absolute minimum and maximum values for this buffer size are 64 kB and 16 MB respectively The requested buffer size is matched as closely as possible by the function and the function will keep the actual buffer size within these boundaries For example if 32 kB of buffering is requested then 64 kB will actually be set If num bytes is O the function will return the amount of buffering currently set on the PC and will leave the amount of buffering unmodified This function can be called in this fashion even when the capture is active as it does not attempt to change the configuration It is important to note that bg Latency and bg sample rate ca
92. d capture on each of the analyzers 1 Follow steps 1 4 in Section 3 2 to place an analyzer in the SYNC STANDBY state The order of analyzers on which this step is performed is not important 66 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 2 Repeat step 1 for each analyzer in the sync chain Capture will automatically start on each analyzer once step 1 is completed for every analyzer in the sync chain Trigger Capture Cross Analyzer Sync allows multiple analyzers to be triggered advancing from pre trigger to post trigger in a synchronized manner An analyzer connected via Cross Analyzer Sync will output a trigger signal to other analyzers in the chain when its capture is triggered The trigger signal can be ignored on a per analyzer basis by software configuration Section 6 8 6 1 allowing an analyzer to remain in pre trigger even if other analyzers connected by Cross Analyzer Sync have triggered An analyzer configured to ignore incoming trigger signals will still output a trigger signal to other analyzers on its own capture trigger Stop Capture Cross Analyzer Sync allows multiple analyzers to stop capturing at the same time An analyzer connected via Cross Analyzer Sync will output a stop signal to other analyzers in the chain when its capture is stopped The stop signal can be ignored on a per analyzer basis by software configuration Section 6 8 6 1 allowing an analyzer to continue capture even if other analyz
93. d connect the target device to the USB A receptacle on the Capture side of the Beagle USB analyzer See Section 2 2 1 for more details This is the setup illustrated in panels a c of Figure 40 In some cases the target bus is fully internal to an embedded system If so it is simply necessary to tap off the lines through the use of a parallel connector One can plug in the tapped off cable into either the Target host or Target device port of the analyzer both are equivalent This is illustrated in Figure 40 d Figure 40 Beagle USB Protocol Analyzer Connections Beagle USB analyzer may be connected to the same bus as it is monitoring panel a or to a different bus panel b Multiple host controllers may reside in separate host controllers panel c Panel d shows the case of sniffing a self contained embedded bus The connections of the Beagle USB analyzer are complicated somewhat by the fact that the Beagle analyzer is monitoring USB signals and then communicating the monitored data back though another USB port Thus the issue of the host broadcasting as 58 9 TOTAL PHASE Beagle Protocol Analyzer User Manual described in Section 1 1 2 comes into play Because all Beagle analyzers use high speed USB communication this issue is only pertinent when using one of the high speed capable protocol analyzers such as the Beagle USB 480 Protocol Analyzer or the Beagle USB 5000 SuperSpeed Protocol Analyzers to monitor a high speed devic
94. d in place of the bad 10b symbol in the data stream It is possible to select multiple events to match the simple trigger However since a capture can only be triggered once in the case of multiple selected events the first of any of the selected events will trigger the capture When a match occurs in the Simple Triggers it is also possible to assert the External Output The output can be asserted only once when the trigger occurs or every time the simple triggers match USB 3 0 Complex Matching The USB 3 0 complex matching system provides additional matching capabilities There are two variants of the complex matching system The basic variants included with the Standard Beagle USB 5000 analyzer offers a single state with one upstream data match unit one downstream data match unit and one event match unit An optional advanced matching package extends the functionality of the complex matching by providing up to eight states with up to three upstream data match units three downstream data match units one event match unit and one timer match unit per state Actual number of match units available per state will depend on the remaining resources available States The Complex Matching system provides up to 8 states Each state is comprised of one or more match units Each match unit defines a specific matching criteria Since a state can transition to multiple other states the order of precedence is significant If multiple 69
95. d the Beagle USB 480 Protocol Analyzers 1 Hardware based USB statistics system 2 Licensing 3 Memory tests 3 The following functionality is not supported for the Beagle USB 12 and the non Power model of Beagle USB 480 Protocol Analyzers 1 On board triggering capability 2 Controlling Vays provided to target device 4 The following functionality is not supported for the Beagle USB 12 Protocol Analyzers 1 Configuring USB 2 0 target speed 2 Digital I O 3 Hardware Filters 5 Delayed download capture mode is supported only for the Beagle USB 480 Protocol Analyzer 6 Reading data with data level timing and bit level timing is supported only for the Beagle USB 12 Protocol Analyzers 122 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 7 The USB 3 0 API functions are supported only for the Beagle USB 5000 SuperSpeed Protocol Analyzers 8 The USB 5000 API functions are supported only for the Beagle USB 5000 SuperSpeed Protocol Analyzers 9 The first byte of a captured USB 2 0 packet is the packet ID PID An enumeration is provided that defines all the possible PIDs which is listed in Table 18 Table 18 USB 2 0 Packet ID definitions BG USB PID OUT BG USB PID IN BG USB PID SOF BG USB PID SETUP BG USB PID DATAO BG USB PID DATA1 Oxe1 0x69 0xa5 Ox2d Oxc3 Ox4b BG USB PID DATA2 0x87 BG USB PID MDATA OxOf BG USB PID ACK Oxd2 BG USB PID NAK Ox5a BG USB PID STALL Oxie BG USB PID NYET
96. driven A situation like this could occur if a digital input has been enabled but has not been tied to a signal Any other nearby signal i e other digital inputs or outputs could cause the 74 9 TOTAL PHASE Beagle Protocol Analyzer User Manual input to activate It is recommended that all undriven digital inputs be disabled or tied to ground For hardware specifications of the digital inputs refer to Section 3 4 3 3 4 4 Digital Outputs Digital outputs provide a means for users to match certain events and to send output to other devices such as oscilloscopes In this way users can synchronize events on the bus with other signals they may be measuring Digital outputs like digital inputs are susceptible to cross talk if left disabled It is recommended that users do not attempt to use disabled digital outputs on other devices as their characteristics are not specified Either disconnect all connections to disabled digital outputs or tie those outputs to ground There are four digital outputs that are user configurable Each digital output has the option of being enabled active high or active low Furthermore each output can activate on specific conditions described below Digital Output 1 will match whenever the capture is running Digital Output 2 will match whenever a packet is detected on the bus Digital Output 3 will match when the selected PID device address and endpoint match Digital Output 4 will m
97. e Link Management Packet LMP Link Management Packets are used to manage the link between two link partners Image courtesy of USB Implementers Forum The LMP commands to manage a link are listed below Please consult the USB 3 0 specifications for more details Set Link Function U2 Inactivity Timeout Vendor Device Test Port Capability Port Configuration Port Configuration Response Transaction Packets TP Transaction Packets TP are a type of header packet used to control the flow of data packets end to end between the host and device Figure 19 Since these packets may traverse a number of links each TP has a route string which is used by hubs to route the packet directly to the intended device 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Device Address Route String Reserved l Type DWORD 0 Reseved SeqNum NumP HE Rsvd Ept Num D ty Rsvd SubType DwoRD 1 Reserved jp Reserved Stream ID Reserved DWORD 2 Link Control Word CRC 16 DWORD 3 Figure 19 above Transaction Packet TP Transaction Packets are used to control the flow of packets between the host and device Image courtesy of USB Implementers Forum TPs do not contain application data and have a number of different subtypes Acknowledgement ACK Not Ready NRDY 26 TOTAL PHASE Beagle Protocol Analyzer User Manual Endpoint Ready ERDY S
98. e If the Beagle analyzer s analysis port is connected to the same host controller as a high speed device that it is monitoring Figure 40 a then the Beagle analyzer will end up sniffing some of its own traffic This is especially true if the Beagle analyzer is configured to stream back bus traffic to the PC in real time This will be seen in the capture as many IN packets to the Beagle analyzer s device address with occasional downstream handshake packets This phenomenon has two negative consequences The extra traffic on the capture bus from the Beagle analyzer may make it difficult to locate the USB traffic of interest within the volume of data captured Additionally the bus traffic for Beagle analyzer will reduce the bandwidth available to other USB devices on the bus There are a number of ways to deal with this issue One method for dealing with this problem is install another USB host controller to the computer and connect one host controller to the analysis port of the Beagle analyzer and use the other host controller to communicate with the host and device under test Figure 40 b Downstream USB packets are only broadcast on USB links on the same host controller so this technique is another way to ensure that the Beagle analyzer s traffic is not seen on the capture side of the analyzer The disadvantage is that the PC must spend processing time for communicating both with the target device as well as the Beagle analyzer The prefer
99. e the device driver has been installed before plugging in the Beagle analyzer 4 1 2 Windows Compatibility The Beagle software is compatible with Windows XP SP2 or later 32 bit and 64 bit Windows Vista 32 bit and 64 bit and Windows 7 32 bit and 64 bit Windows 2000 and legacy 16 bit Windows 95 98 ME operating systems are not supported 4 1 3 Linux Compatibility The Beagle software is compatible with all standard 32 bit and 64 bit distributions of Linux with kernel 2 6 and integrated USB support When using the 32 bit library on a 64 bit distribution the appropriate 32 bit system libraries are also required 4 1 4 Mac OS X Compatibility The Beagle software is compatible with Intel versions of Mac OS X 10 4 Tiger 10 5 Leopard and 10 6 Snow Leopard Installation of the latest available update is recommended 4 2 Windows USB Driver 4 2 1 Driver Installation To install the appropriate USB communication driver under Windows use the Total Phase USB Driver Installer before plugging in any device The driver installer can be found either on the CD ROM use the HTML based guide that is opened when the CD is first loaded to locate the Windows installer or in the Downloads section of the Beagle analyzer product page on the Total Phase website After the driver has been installed plugging in a Beagle analyzer for the first time will cause the analyzer to be installed and associated with the correct driver The following 81 9
100. e Status bg usb2 capture status int bg usb2 capture status Beagle beagle BeagleCaptureStatus status u32 pretrig remaining u32 pretrig total u32 capture remaining u32 capture total Query the status of USB 2 0 capture Arguments 166 9 TOTAL PHASE Beagle Protocol Analyzer User Manual beagle handle of a Beagle analyzer status filled with enumerated value described in Table 10 pretrig remaining filled with amount of remaining pre trigger data to capture in kB pretrig total filled with pre trigger size set by user in KB capture remaining filled with amount of remaining total capture data to capture in kB capture total filled with total capture size set by user in KB Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG USB2 NOT ENABLED A USB 2 0 capture has not been enabled Details Query the capture status and the states of the pre trigger and capture buffers Analyzers that do not have the on board triggering capability will not return status values indicating pre trigger state For these analyzers the returned pretrig totalandpretrig remaining will always be 0 The Beagle USB 12 and the Beagle USB 480 protocol analyzers will also return 0 for capture total because neither analyzer has the ability to limit the total capture size The BG CAPTURE STATUS POST TRIGGER status indicates that data is being captured post trigger The
101. e handle of a Beagle analyzer version pointer to pre allocated structure Return Value A Beagle status code is returned with BG OK on success Specific Error Codes BG COMMUNICATION ERROR The firmware of the specified device can not be determined Details If the handle is 0 or invalid only the software version is set See the details of bg open ext for the definition of BeagleVersion Capture Latency bg latency int bg latency Beagle beagle u32 milliseconds Set the capture latency to the specified number of milliseconds Arguments beagle handle of a Beagle analyzer 100 9 TOTAL PHASE Beagle Protocol Analyzer User Manual milliseconds new capture latency in milliseconds Return Value A Beagle status code is returned with BG OK on success Specific Error Codes BG STILL ACTIVE An attempt was made to change the configuration while the capture was still active Details Set the capture latency to the specified number of milliseconds The capture latency effectively splits up the total amount of buffering as determined by bg host buffer size into smaller individual buffers Only once one of these individual buffers is filled does the read function return Therefore in order to fulfill shorter latency requirements these individual buffers are set to a smaller size If a larger latency is requested then the individual buffers will be set to a larger size Setting a small latency can increase the responsiveness of
102. e permissions for root and read only permissions for all other users If an non privileged user wishes to use the Beagle analyzer and software one must ensure that proc bus usb is mounted with read write permissions for all users The following steps can help setup the correct permissions Please note that these steps will make the entire USB filesystem world writable 1 Check the current permissions by executing the following command ls al proc bus usb 001 2 If the contents of that directory are only writable by root proceed with the remaining steps outlined below 3 Add the following line to the etc fstab file none proc bus usb usbfs defaults devmode 0666 0 0 Unmount the proc bus usb directory using umount Remount the proc bus usb directory using mount Repeat step 1 Now the contents of that directory should be writable by all users N O oc A Set the environment variable USB_DEVFS_PATH to proc bus usb 4 4 Mac OS X USB Driver The Beagle communications layer under Mac OS X does not require a specific kernel driver to operate Mac OS X 10 5 Leopard 10 6 Snow Leopard 10 7 Lion and 10 8 Mountain Lion are supported It is typically necessary to ensure that the user running the software is currently logged into the desktop No further user configuration should be necessary 84 TOTAL PHASE Beagle Protocol Analyzer User Manual 4 5 USB Port Assignment The Beagle analyzer is assigned a port on a seq
103. e value indicating an error Specific Error Codes BG CONFIG ERROR An attempt was made to set an invalid configuration Details This function is supported only for analyzers with on board triggering capability 144 TOTAL PHASE Beagle Protocol Analyzer User Manual The USB 2 0 hardware capture buffer is 128MB so capture kb may have a maximum value of 131 072 The size of capture kb includes pretrig kb Attempting to set pretrig kb greater than capture kb will return an error To run an infinite capture set capture kb to BG USB CAPTURE SIZE INFINITE If running a simultaneous capture it is possible to copy the pretrig to capture ratio used for the USB 3 0 capture by assigning capture kb to BG USB CAPTURE SIZE SCALE Query Capture Config bg usb2 capture buffer config query int bg usb2 capture buffer config query Beagle beagle u32 pretrig kb u32 capture kb Query the current USB 2 0 hardware capture buffer configuration Arguments beagle handle of a Beagle analyzer pretrig kb filled with USB 2 0 pre trigger size capture kb filled with USB 2 0 total capture size Return Value This function returns the size of the available USB 2 0 hardware capture buffer Specific Error Codes None Details Query the hardware capture buffer configuration set in bg usb2 capture buffer config If an infinite or scaled USB 2 0 capture has been configured capture kb will be filled with the appropriate constant from
104. eagle analyzer power flag enumerated value which controls Vays as detailed in Table 29 Table 29 Target Power Enums BG USB TARGET POWER HOST SUPPLIED Connect target Vays to host Vays BG USB TARGET POWER OFF Disconnect target Vays from host Vays Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is not supported for the Beagle USB 12 and the Beagle USB 480 Protocol Analyzers This function can be used to reset the target device by disconnecting Vg js Read USB bg usb read int bg usb read Beagle beagle u32 status u32 events u64 time sop u64 time duration u32 time dataoffset BeagleUsbSource source int max bytes u08 packet int max k bytes u08 k data Read data from the analyzer Arguments beagle handle of a Beagle analyzer status filled with the status bitmask as detailed in Table 11 and Table 19 134 TOTAL PHASE Beagle Protocol Analyzer User Manual events time sop time duration time dataoffset source max bytes packet max k bytes k data filled with the event bitmask as detailed in Tables 20 21 22 24 25 and 23 filled with the timestamp when data appeared on the bus filled with the number of ticks that it took to read the data this is always 0 filled with source of USB packet as detailed in Table 30 maximum
105. ecise details please refer to the Philips IC specification The sequence of events are as follows 1 The master device issues a start condition This condition informs all the slave devices to listen on the serial data line for their respective address 2 The master device sends the address of the target slave device and a read write flag 3 The slave device with the matching address responds with an acknowledgment signal 4 Communication proceeds between the master and the slave on the data bus Both the master and slave can receive or transmit data depending on whether the communication is a read or write The transmitter sends 8 bits of data to the receiver which replies with a 1 bit acknowledgment 5 When the communication is complete the master issues a stop condition indicating that everything is done Figure 24 shows a sample bitstream of the I C protocol READ NAK e ad M M a LLLBELLLLELLLULLILLLLLIL t S Slave Address ACK Data STOP 32 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Figure 24 PC Protocol Since there are only two wires this protocol includes the extra overhead of the addressing and acknowledgement mechanisms 1 2 3 lC Features I C has many features other important features worth mentioning It supports multiple data speeds standard 100 kbps fast 400 kbps and high speed 3 4 Mbps communications Other features include Built in collision detection 10 bit
106. eing configured is not licensed to use the Cross Analyzer Sync feature BG USB NOT ENABLED Capture has not been enabled Details This function can only be used with a Beagle 5000 v2 00 or later analyzer licensed to use Cross Analyzer Sync This function releases the analyzer from Cross Analyzer Sync in the same way as function bg5000 cross analyzer sync config called with BG5000 CROSS ANALYZER SYNC BYPASS The latter function is only available before capture starts while this function is only available during capture Unlike bg5000 cross analyzer sync config changes to Cross Analyzer Sync made by this function do not persist across captures only the current capture is affected When an analyzer is released from Cross Analyzer Sync the analyzer will no longer accept any Cross Analyzer trigger or stop signals nor will the analyzer output trigger or stop signals to other analyzers 6 9 MDIO API 6 9 1 Notes The MDIO API functions are only available for the Beagle I C SPI MDIO Protocol Analyzer 6 9 2 MDIO Monitor Interface Read MDIO bg mdio read int bg mdio read Beagle beagle u32 status u64 time sop u64 time duration u32 time dataoffset u32 data in 197 TOTAL PHASE Beagle Protocol Analyzer User Manual Read data from the MDIO port Arguments beagle status time sop time duration time dataoffset data in Return Value handle of a Beagle analyzer filled with the status bi
107. en byte N of packet is a K symbol If source is BG USB SOURCE IV MON and events is non zero the packet indicates a Vays trigger event occurred If events is zero packet contains Vays 136 9 TOTAL PHASE Beagle Protocol Analyzer User Manual voltage and current data Callbg iv mon parse to parse the packet and retrieve the values See bg iv mon parse in Section 6 10 2 2 for more details Configure Statistics System bg usb stats config int bg usb stats config Beagle beagle const BeagleUsbStatsConfig config Configure the hardware based USB statistics system Arguments beagle handle of a Beagle analyzer config configuration values for the statistics system Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is used to configure the hardware based USB statistics system on the Beagle USB analyzer This function is not supported for the Beagle USB 12 and the Beagle USB 480 Protocol Analyzers The config field should be used to pass desired configuration parameters Hardware based USB statistics configuration struct BeagleUsbStatsConfig u08 auto config BeagleUsbMatchType source match_type BeagleUsbSource source match val BeagleUsbMatchType ep match type u08 ep_match val BeagleUsbMatchType dev match type u08 dev_match val Table 31 BeagleUsbStatsConf
108. eneral packet types events or errors and trigger the capture or assert the external output in response The next level is Complex Matching which provides the a state based facility to match specific packet types and data patterns in addition to specific events The standard Beagle USB 5000 analyzer provides a single state and limited matching facilities The Advanced trigger option extends the Complex Matching framework with multiple states and extended matching facilities to build complex state machines USB 3 0 Simple Matching With USB 3 0 simple matching the Beagle USB 5000 analyzer is capable of matching Link Commands Header Packets Data Payloads CRC Errors CRC32 CRC12 CRC5 LCW CRC5 Training Sequences TS1 TS2 TSEQ e Vays Detected External Input rising falling Reverse Polarity 68 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Termination Detected Scrambling Disabled e LPFS PHY Error PHY Error is a special case bus event that will match the following errors Disparity Error Elastic Buffer under run or over run 8b 10b Decode Error While the PHY Errors collapses these 4 errors into a single match it is possible to distinguish some of the different errors in the captured data When an elastic buffer under run error occurs an EDB symbol K28 3 is inserted into the data stream to fill the under run When an 8b 10b Decode Error occurs a SUB symbol K28 4 is substitute
109. erflow Protection is essentially identical to real time capture except that it allows for more efficient use of the hardware buffer when it nears full capacity When the buffer is near capacity the Beagle USB 480 analyzer will truncate all incoming packets to 4 bytes The true length of the packet will still be reported to the 77 9 TOTAL PHASE Beagle Protocol Analyzer User Manual user however only the first 4 bytes of the given packet will be returned If the user is using a custom application the remainder of the packet field will be filled with Os However all packets captured when in truncation mode will be tagged with the BG READ USB TRUNCATION MODE status code bit Because packets are truncated to 4 bytes in length only DATA packets have the potential of being truncated All tokens handshakes etc will still be shown in their entirety This mode truncates large packets reducing further usage of the hardware buffer This allows the analysis PC a chance to siphon more data off of the Beagle analyzer before the hardware buffer becomes completely full In other words the analysis port can catch up to the target traffic If the buffer usage drops below a certain threshold the analyzer will automatically return to normal operation and cease the truncation of long packets Delayed download Capture Delayed download capture does not stream data to the analysis computer in real time but instead saves all of the data in the 64 MB hardwa
110. ers connected by Cross Analyzer Sync have stopped capture An analyzer configured to ignore incoming stop signals will still output a stop signal to other analyzers on its own capture stop Software Release An analyzer can be completely released from Cross Analyzer Sync by software configuration before capture Section 6 8 6 1 or during capture Section 6 8 6 2 An analyzer released from Cross Analyzer Sync by software will 1 Not wait on other analyzers connected by Cross Analyzer Sync when capture is started 2 Ignore Cross Analyzer stop and Cross Analyzer trigger signal inputs 67 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 3 Not output Cross Analyzer stop or Cross Analyzer trigger signals Notes Do not change the sync configuration by attaching or detaching HDMI cables from an analyzer when capture is in progress Disrupting HDMI cables during capture may result in termination of capture and disconnection of an analyzer from software Cross Analyzer Sync HDMI ports are only available on hardware v2 00 or later 3 3 8 Match Action System The Beagle USB 5000 Protocol Analyzer features a multi tiered matching system that can perform one or more actions in response to a match The USB 3 0 matching system is separate from the USB 2 0 matching system USB 3 0 Matching Within the USB 3 0 Matching framework there are multiple tiers of matching The first level is Simple Matching which can match the occurrence of g
111. evels and speeds both hosts and devices use termination resistors In addition during the high speed handshake the device must release its full speed pull up resistor But during the high speed handshake often times the host will activate its termination resistors before the device releases its full speed 16 9 TOTAL PHASE Beagle Protocol Analyzer User Manual pull up resistor In these situations the host may not be able to pull the D line below the threshold level of its high speed receivers This may cause the host to see a spurious Chirp J dubbed a Tiny J on the lines This is an artifact on the bus due to the voltage divider effect between the devices 1 5 Kohm pull up resistor and the host s 45 ohm termination resistor Hosts and devices must be robust against this situation Once the device has switched to high speed operation the Tiny J will no longer be present since the device will have released its pull up resistor With USB 3 0 a separate SuperSpeed USB channel co exists in parallel with the normal USB 2 0 bus It is important to point out that SuperSpeed USB is a full duplex bus thus both the host and the device act as a transmitter and receiver In order to communicate over USB 3 0 each transmitter must detect the termination on the receiver side If the termination is not detected the host will downgrade its communications to USB 2 0 If the termination is detected link training begins so that the receiver can synchronize
112. f a Beagle analyzer Return Value The amount of used USB read buffering in bytes Specific Error Codes None Details USB read buffers are used by the analysis computer to receive the incoming data from the Beagle analyzer Calling this function will return the amount of PC buffering filled with received data as of the last bg read call If the amount of used USB buffering comes close to the total buffer size capture data from the device may be lost Communication Speed Benchmark bg commtest int bg commtest Beagle beagle int num samples int delay count Test the Beagle analyzer communication link performance Arguments beagle handle of a Beagle analyzer num samples number of samples to receive from the analyzer delay count count delay on the host before processing each sample Return Value The number of communication errors received during the test 106 TOTAL PHASE Beagle Protocol Analyzer User Manual Specific Error Codes None Details This function tests the host computers ability to process data received from the Beagle analyzer The function commands the given Beagle analyzer to send test packets at the given frequency see bg samplerate to the host computer over the USB interface The delay count variable provides a way for the application programmer to add an artificial counter delay between each sample processed by the host For large delay values it will be harder for the host to kee
113. f a Beagle analyzer ss polarity sets the slave select detection to active low or active high bit polarity see Table 15 117 9 TOTAL PHASE Beagle Protocol Analyzer User Manual sck sampling edge sets data sampling on the leading or trailing edge of the clock signal see Table 16 bitorder sets big endian or little endian bit order see Table 17 Table 15 SPI SS Polarity definitions BG SPI SS ACTIVE LOW Set active low polarity BG SPI SS ACTIVE HIGH Set active high polarity Table 16 SPI SCK Sampling Edge definitions BG SPI SCK SAMPLING EDGE RISING Sample on the leading edge BG SPI SCK SAMPLING EDGE FALLING Sample on the trailing edge Table 17 SPI Bit Order definitions BG SPI BITORDER MSB Big endian bit ordering BG SPI BITORDER LSB Little endian bit ordering Return Value A Beagle status code of BG OK is returned on success or an error code as detailed in Table 74 Specific Error Codes BG STILL ACTIVE An attempt was made to change the configuration while the capture was still active BG FUNCTION NOT AVAILABLE The hardware version is not compatible with this feature Only the I C SPI MDIO device supports SPI configuration Details The SPI standard is much more loosely defined than IC MDIO or USB As a consequence the SPI monitor must be configured to match the parameters of the device being monitored If the configuration of the SPI monitor does not match the 118 TOTAL PHA
114. f data to a device but the device responded with a NAK the host will retry the entire data transaction This requires sending the entire 64 byte data payload repeatedly until the device responds with an ACK This has the potential to waste a significant amount of bandwidth It is for this reason that high speed hosts have an additional feature when the device signals the inability to accept any more data When a high speed host receives a NAK after transmitting data instead of retransmitting the entire transaction it simply sends a 3 byte PING token to poll the device and endpoint in question Alternatively if the device responds to the OUT DATA with a NYET handshake it means that the device accepted the data in the current transaction but is not ready to accept additional data and the host should PING the device before transmitting more data The host will continue to PING the device until it responds with an ACK which indicates to the host that it is ready to receive information At that point the host will transmit a packet in its entirety Hub Transactions Hubs make it possible to expand the number of possible devices that can be attached to a single host There are two types of hubs that are commercially available for wired USB full speed hubs and high speed hubs Both types of hubs have mechanisms for dealing with downstream devices that are not of their speed Full speed hubs can at most transmit at 12 Mbps This means that all
115. f the timing data is measured in ticks of the sample rate clock The Beagle USB 12 analyzer is locked to a 48 MHz sample rate thus each count measures 20 83 ns The first byte of the USB packet is the packet ID An enumeration is provided that defines all the possible packet IDs in Table 18 In addition to the general read status values in Table 11 there are USB specific status values enumerated in Table 19 The user should be aware of the BG READ USB END OF CAPTURE status code which will be returned if the bg usb read function is called after a capture has completed The events enumeration describes specific events that have occurred during the USB capture By masking the events value with the ones detailed in Tables 20 21 22 24 25 and 23 the user can determine whether a specific event has occurred It should also be noted that if a packet is returned when in truncated mode the packet length will be limited to 4 bytes The function will still return the true length of the packet however only up to the first 4 bytes of data will be inserted into the packet array The remaining bytes will be filled with Os Also the use of digital inputs may cause certain bus events to appear out of order See Section 3 4 3 for more information The k data buffer should be 1 8th the size of packet k data is filled with flags which specify that the corresponding data in packet is a D Symbol or K Symbol For example if bit N of Kk data is 1 th
116. finishes using the bus and stops all bus activity The B device detects this and will release its pull up resistor When the A device detects the SEO it responds by activating its pull up Once the B device detects this condition the B device issues reset and begins standard USB communication as the host In order to conserve power A devices are allowed to stop providing power to the USB However there could be situations where the B device wants to use the bus and Vays is turned off It is for this reason that the OTG supplement describes a method for allowing 30 TOTAL PHASE Beagle Protocol Analyzer User Manual the B device to request a session from the A device Upon successful completion of the Session Request Protocol SRP the A device will power the bus and continue standard USB transactions The SRP is broken up into two stages From a disconnected state the B device must begin an SRP by driving one of its data lines high for a sufficient duration This is called data line pulsing If the A device does not respond to this the B device will drive the V gus above a specified threshold and release it thereby completing Vays pulsing If the A device still does not begin a session the B device may start the SRP over again provided the correct initial conditions are met For more details on OTG please see the On The Go Supplement to the USB 2 0 Specification 1 1 4 References USB Implementers Forum 1 2 PC Backgro
117. g 27 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Isochronous Timestamp Type DWORD 0 Reserved ml DWORD 1 Reserved DWORD 2 Link Control Word CRC 16 DWORD 3 Figure 20 Isochronous Timestamp Packet LMP Link Management Packets send timestamps to active devices which is used for synchronization Image courtesy of USB Implementers Forum Only hosts are allowed to send ITPs and only when the host port is already in the UO state Devices are not required to respond to the ITP Enumeration and Descriptors When a device is plugged into a host PC the device undergoes Enumeration This means that the host recognizes the presence of the device and assigns it a unique 7 bit device address The host PC then queries the device for its descriptors which contains information about the specific device There are various types of descriptors as outlined below Configuration 1 Interface O lt Alt Setting 1 8 ace O Setting 2 Interface 1 9 Interface 2 EP g 7 Configuration 2 le g Self Powered 28 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Figure 22 USB Descriptors Hierarchy of descriptors of a USB device A device has a single Device descriptor The Device descriptor can have multiple Configuration descriptors but only a single one can be active at a time The Configuratio
118. g enable to activate the Beagle analyzer and start monitoring data Once the capture has been triggered data may be downloaded from the hardware buffer s by calling bg usb read or for USB 2 0 only captures bg usb2 read 6 8 3 USB Monitor Interface Check Available Features bg usb features int bg usb features Beagle beagle Return licensed features on analyzer 129 TOTAL PHASE Beagle Protocol Analyzer User Manual Arguments beagle handle of a Beagle analyzer Return Value This function returns a positive integer that represents what features are licensed on the analyzer as detailed in Table 26 This function can also return a negative value indicating an error Specific Error Codes None Details The returned integer is a bitmask that indicates the features which are licensed on the Beagle as detailed in Table 26 The Beagle USB 12 and the Beagle USB 480 Protocol Analyzers only return BG USB FEATURE USB2 MON since they cannot be licensed for additional features Vgus Current voltage monitoring is currently only available for the Beagle USB 480 Power Protocol Analyzer Table 26 Beagle USB Features BG USB FEATURE NONE No features are licensed BG USB FEATURE USB2 MON USB 2 0 captures may be performed BG USB FEATURE USB3 MON USB 3 0 captures may be performed BG USB FEATURE SIMUL 23 Simultaneous USB 2 0 amp USB 3 0 captures may be performed BG USB FEATURE USB3 CMP TRIG USB 3 0 Complex triggering l
119. g this function bg disable must be called before a new capture can be enabled 6 5 Notes on Protocol Specific Read Functions All read functions return a status value through the status parameter Table 11 provides a listing of all the status codes that are shared throughout all the protocols Table 11 Read Status definitions BG READ OK Read successful BG READ TIMEOUT No data was seen before the timeout interval occurred This may indicate that no data was seen on the bus or there was a pause in the transmission of data longer than the timeout interval BG READ ERR MIDDLE OF PACKET Data collection was started in the middle of a packet This indicates that a transaction was already being transmitted across the bus when the read function was called BG READ ERR SHORT BUFFER The packet was longer than the buffer size The buffer passed to the read function was too short to contain the full data of the transaction BG READ ERR PARTIAL LAST BYTE The last byte in the buffer is incomplete The number of bits of data captured did not align to the expected data size For example for I C the number of bits received was not a multiple of 9 8 data bits plus 1 ACK NACK bit BG READ ERR UNEXPECTED An unexpected event occurred on the bus The event is still presented to the user however it is tagged with this status flag 112 TOTAL PHASE Beagle Protocol Analyzer User Manual 6 6 C API 6 6 1 Notes The I C API function
120. gative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Details Function not supported by device This function is supported only for the Beagle USB 12 Protocol Analyzer and is an extension of the bg usb2 read function with the added feature of byte level timing All ofthe bg usb2 read arguments and details apply The values in the data timing array give the offset of the start of each data word from time sop For USB a data word is considered a single byte The data timing array should be allocated at least as large as max timing 169 TOTAL PHASE Beagle Protocol Analyzer User Manual Read USB 2 0 with bit level timing bg usb2 read bit timing int bg usb2 read bit timing Beagle u32 u32 u64 u64 u32 int u08 int u32 Read USB 2 0 data from the USB port X beagle status events time sop time duration time dataoffset max bytes packet max timing bit timing Arguments common args see bg usb2 read for common arguments max timing size of b t timing array bit timing an allocated array of u32 which is filled with the timing data for each bit read Return Value This function returns the number of bytes read or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Details Function not supported by device This function is supported only for the Beagle USB 12 Protocol Analyzer and is an extens
121. guration feature on configuration a value of zero on query indicates successful device address configuration Once device address configuration is complete you can check the device address value by inspecting the dev match val field Reset Statistics Counts bg usb stats reset int bg usb stats reset Beagle beagle Reset the hardware based USB statistics counts Arguments beagle handle of a Beagle analyzer Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is used to reset the current hardware based USB statistics system counts on the Beagle USB analyzer This function is not supported for the Beagle USB 12 and the Beagle USB 480 Protocol Analyzers Statistics counts are summed continuously during a capture To reset all of the counts simply call this function with a valid handle Read Statistics Counts bg usb stats read int bg usb stats read Beagle beagle BeagleUsbStats config Read hardware based USB statistics counts 140 TOTAL PHASE Beagle Protocol Analyzer User Manual Arguments beagle handle of a Beagle analyzer stats filled with the hardware based statistics counts Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This funct
122. h pin mask Configure the USB 2 0 simple matching system for triggering Arguments beagle handle of a Beagle analyzer dig in pin pos edge mask bitmask of positive digital input edge s to match on dig in pin neg edge mask bitmask of negative digital input edge s to match on dig out match pin mask bitmask of digital output pins to match on Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG CONFIG ERROR An attempt was made to set an invalid configuration BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is supported only for analyzers with on board triggering capability Only bits 3 0 can be set in either of the input pin edge masks Similarly only bits 3 1 can be setin dig out match pin mask Setting invalid bits will cause this function to return BG CONFIG ERROR When a simple match is detected the capture will be triggered Note that this function is different than enabled digital input which reports an event but does not trigger the capture Enable Hardware Filter bg usb2 hw filter config int bg usb2 hw filter config Beagle beagle u08 filter enable mask Specify hardware filtering modes Arguments beagle handle of a Beagle analyzer 153 9 TOTAL PHASE Beagle Protocol Analyzer User Manual filter enable mask hardware filtering configuration definitions as detailed in Table 45 Table 45 Hardware F
123. h the receiver The transmitter should quickly detect that there is a problem with the link and stop transmitting data At this time the Beagle analyzer will be able to detect the absence of the termination resistor and remove its termination accordingly When the termination is removed the RxTerm LED will be turned off The receiver termination detection system is always operating as long as the Beagle analyzer is powered and in auto detect mode regardless of whether a capture is active As long as the analyzer is set to auto detect the analyzer will properly reflect the termination of the receivers on the bus This allows SuperSpeed hosts and devices to properly transition through the LTSSM even outside the scope of an active capture 3 3 3 Polarity Detection The polarity of a SuperSpeed differential pair is mutable to provide flexibility in the circuit layout design As a consequence of this the receiver must correctly detect the polarity of the transmitters during the link training in order to properly interpret the subsequently transmitted data The Beagle USB 5000 Protocol Analyzer has a robust auto detection system to correctly identify the polarity of the target system By default this auto detection system is enabled As an added feature the polarity of each SuperSpeed differential pair can be manually configured as well When the polarity is manually controlled the analyzer will force the desired setting in the hardware At thi
124. he match will always evaluate to true and then be modified by the match modifier Table 66 BeagleUsb3DataMat chModifier enumerated values BG USB3 MATCH MODIFIER 0 TYPE amp Pattern amp Data Property BG USB3 MATCH MODIFIER 1 TYPE amp Pattern amp Data Property BG USB3 MATCH MODIFIER 2 TYPE amp Pattern amp Data Property BG USB3 MATCH MODIFIER 3 TYPE amp Pattern amp Data Property Resource Limitations Due to internal optimizations and constraints certain resource limitations apply to data match units The total data memory space shared across all states available is 3072 bytes per stream upstream downstream The maximum allowable length of any data array in a single data match unit is 1024 bytes 189 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Additional restrictions on data properties objects apply As a result when data properties are specified non zero data properties valid the total available memory per stream may be less than the 3072 bytes mentioned above Timer Match Units The BeagleUsb3TimerMatchUnit should be used to create a timer match unit Timer match unit configuration struct BeagleUsb3TimerMatchUnit BeagleUsbTimerUnit timer unit u32 timer val u08 action mask u08 goto selector The BeagleUsbTimerUnit enumerated type is used to define the unit of time for the timer val field The different enumerated types are described in Table 67 Table 67
125. he target host continues to send data regardless of the presence of the target device the analyzer will assume that the device is still connected to the bus A sophisticated algorithm is used to balance the detection of the termination status of the line and maintaining data capture fidelity In situations where there is a conflict the analyzer will focus on maintaining the data capture at the expense of a delayed receiver termination detection For more detailed information about receiver termination detection please refer to Section 3 3 1 in the Device Operation Section USB 3 0 Activity The USB 3 0 Activity LEDs are illuminated when there is USB 3 0 bus activity and a data capture is active The LED blink speed is proportional to the amount of USB 3 0 traffic on 41 9 TOTAL PHASE Beagle Protocol Analyzer User Manual the bus If the analyzer is not capturing data the LEDs will not be active even if there is USB 3 0 traffic on the bus Please note that there is a minimum activity threshold to activate the LEDs In general the LEDs will only be active in the UO state Periodic link commands or LFPS traffic may not necessarily be sufficient to cross the activity threshold USB 2 0 Activity The USB 2 0 Activity LED is illuminated when there is USB 2 0 bus activity and the data capture is active The LED blink speed is proportional to the amount of USB 2 0 traffic on the bus If the analyzer is not capturing data the LEDs will no
126. host to device or a OUT transfer was a device to host The Status Stage may end in an ACK if the function completed successfully or STALL if the function had an error It is also possible to see a transaction STALL in the Data Stage if the device is unable to send or receive the requested data Polling Transactions It is possible that when a host requests data or sends data that the device will not be able to service the request This could occur if the device has no new information to provide the host or is perhaps too busy to send receive any data In these situations the device will NAK the host If the data transfer is a Control or Bulk transfer the host will 21 9 TOTAL PHASE Beagle Protocol Analyzer User Manual retry the transaction However if it is Isochronous or Interrupt transfer it will not retry the transaction On a full or low speed bus if the transaction is repeated it is repeated in its entirety This is true regardless of the direction of the data transfer If the host is requesting information it will continue to send IN tokens until the device sends data Until then the device responds with a NAK leading to the multitude of IN NAK pairs that are commonly encountered on a bus This does not have much consequence as an IN token is only 3 bytes and the NAK is only 1 byte However if the host is transmitting data there is the potential for graver consequences For example if the host attempted to send 64 bytes o
127. ice connected BG EVENT USB RESET Bus put into reset state Table 21 USB 480 and 5000 USB 2 0 Event Code definitions Event Codes for USB 480 and USB 5000 BG EVENT USB J CHIRP Chirp J detected BG EVENT USB K CHIRP Chirp K detected BG EVENT USB SPEED UNKNOWN Communication speed is unknown BG EVENT USB LOW SPEED Low speed bus operation detected BG EVENT USB FULL SPEED Full speed bus operation detected High speed bus operation detected BG EVENT USB HIGH SPEED BG EVENT USB LOW OVER FULL SPEED Low over full speed bus operation detected BG EVENT USB SUSPEND Bus has entered suspend state BG EVENT USB RESUME Bus has left suspend state BG EVENT USB KEEP ALIVE Low speed keep alive detected BG EVENT USB OTG HNP OTG HNP detected BG EVENT USB OTG SRP DATA PULSE OTG SRP data line pulse detected BG EVENT USB OTG SRP VBUS PULSE OTG SRP Vg pulse detected BG EVENT USB DIGITAL INPUT One or more digital inputs have changed state BG EVENT USB DIGITAL INPUT MASK Bitmask of line state for each input pin Table 22 USB 5000 USB 2 0 Event Code definitions 125 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Event Codes for USB 5000 BG EVENT USB SMA EXTIN DETECTED External Input change detected BG EVENT USB CHIRP DETECTED Chrip detected 12 Manual triggers are represented by a lone BG EVENT USB TRIGGER event no data or other events 13 Simple triggers are represented by a BG EVENT
128. ice to device connections The previous Mini A plug and Mini AB receptacle have now been deprecated USB 3 0 Connectors The new USB 3 0 connectors serve two purposes First the connectors must be capable of physically interfacing with USB 3 0 signals to provide the ability to send and receive SuperSpeed USB data Secondly the connectors must be backwards compatible with USB 2 0 cables 11 TOTAL PHASE Beagle Protocol Analyzer User Manual Figure 6 USB 3 0 Standard A Connector USB 3 0 Standard A plug and receptacle Image courtesy of USB Implementers Forum The USB 3 0 Standard A connector Figure 6 is very similar in appearance to the USB amp 2 0 Standard A connector However the USB 3 0 Standard A connector and receptacle have 5 additional pins a differential pair for transmitting data a differential pair for receiving data and the drain USB 3 0 Standard A plugs and receptacles are often colored blue to help differentiate it from USB 2 0 The USB 3 0 Standard A connector has been designed to be able to be plugged into either a USB t 2 0 or USB 3 0 receptacle Similarly the USB 3 0 Standard A receptacle is designed to accept both the USB 3 0 and the USB 2 0 Standard A plugs p s eM 77 5 contact blades 0 7 wide 1 0 pitch Y Figure 7 USB 3 0 Standard B Connector USB 3 0 Standard B plug and receptacle Image courtesy of USB Implementers Forum The USB 3 0 Standard B connector Figure 7 is simil
129. icensed BG USB FEATURE USB3 4G MEM 4GB buffer memory available BG USB FEATURE USB2 CMP TRIG USB 2 0 Complex triggering licensed BG USB FEATURE CROSS ANALYZER SYNC Analyzers may be synchronized using back panel HDMI ports 130 TOTAL PHASE Beagle Protocol Analyzer User Manual BG USB FEATURE IV MON LITE Vgug Current voltage monitoring licensed Read License Key bg usb license read int bg usb license read Beagle beagle int length u08 license Read the license key from the device Arguments beagle handle of a Beagle analyzer length should be BG USB LICENSE LENGTH license filled with buffer license string Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is not supported for the Beagle USB 12 and the Beagle USB 480 Protocol Analyzers Function will only write license to buffer if Length is BG USB LICENSE LENGTH and the License buffer is large enough to accomodate a string of that size Write License Key bg usb license write int bg usb license write Beagle beagle int length const u08 A license Write the license key to the device Arguments beagle handle of a Beagle analyzer length should be BG USB LICENSE LENGTH license buffer which contains license string 131 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Return Value This function re
130. ices that are in use are ORed with BG PORT NOT FREE 0x8000 Under Linux such devices correspond to Beagle analyzers that are currently in use Under Windows such devices are currently in use but it is not known if the device is a Beagle analyzer Example Devices are attached to port 0 1 2 ports 0 and 2 are available and port 1 is in use array gt 0x0000 0x8001 0x0002 If the input array is NULL it is not filled with any values If there are more devices than the array size as specified by nelem only the first nelem port numbers will be written into the array Find Devices bg find devices ext int bg find devices ext int num devices ul6 devices int num ids u32 unique ids Get a list of ports and unique IDs to which Beagle devices are attached Arguments num devices maximum number of devices to return devices array into which the port numbers are returned num ids maximum number of device IDs to return unique ids array into which the unique IDs are returned Return Value This function returns the number of devices found regardless of the array sizes Specific Error Codes None Details 93 TOTAL PHASE Beagle Protocol Analyzer User Manual This function is the same as bg_find devices except that it also returns the unique IDs of each Beagle device The IDs are guaranteed to be non zero if valid The IDs are the unsigned integer representation of the 10 digit serial numbers The nu
131. ier 1 Tier 2 Tier 3 Tier 4 Tier 5 Tier Tier 7 Downstream Traffic T Traffic Figure 1 Sample USB Bus Topology A USB can only have a single USB host device This host can support up to 127 different devices on a single port There is an upper limit of 7 tiers of devices which means that a maximum of 5 hubs can be connected inline The USB has a tiered star topology Figure 1 At the root tier is the USB host All devices connect to the host either directly or via a hub According to the USB spec a USB host can only support a maximum of seven tiers USB 2 0 Specific Architecture F i E d a b t E a gt Q Low speed Device E Full speed Device High speed Device 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Figure 2 USB Broadcast A USB 2 0 host broadcasts information to all the devices below it Low speed and high speed enabled devices will only see traffic at their respective speeds Full speed devices can see both their speed and low speed traffic USB 2 0 works through a unidirectional broadcast system When a host sends a packet all downstream devices will see that traffic If the host wishes to communicate with a specific device it must include the address of the device in the token packet Upstream traffic the response from devices are only seen by the host or hubs that are directly on the return path to the host There are however a few caveats
132. ig field descriptions auto config A non zero value enables automatic device address configuration 137 9 TOTAL PHASE Beagle Protocol Analyzer User Manual source match type Enable or disable stream direction matching The source stream TX RX on which to match ep match type Configure or disable endpoint matching ep match val The endpoint number on which to match dev match type Configure or disable device address matching dev match val The device address on which to match Connection Specific USB 3 0 Statistics In addition to tracking USB 3 0 and USB 2 0 bus level statistics the hardware based USB statistics system is capable of tracking statistics that are specific to a particular USB 3 0 device endpoint and stream direction This capability should be configured before starting a capture Each connection parameter is represented by two separate fields type and value The BeagleUsbMatchType enumerated type is used to determine whether a connection value field should be disabled match on equal or match on not equal The different enumerated values are listed below Restrictions on usage are indicated by footnotes e BG USB MATCH TYPE DISABLED e BG USB MATCH TYPE EQUAL BG USB MATCH TYPE NOT EQUAL 1 1 Only valid when used in the dev match typeorep match type fields The BeagleUsbSource enumerated type is used to choose between the TX and RX stream directions The different enumerated values are listed below
133. ignaling The advantage of this is that rather than radiating all energy in a small frequency band at a high level a spread spectrum clock spreads its energy in a slightly larger frequency band which reduces the peak level at any specific frequency This is done to help meet EMC regulations Low Frequency Periodic Signaling LFPS LFPS signal is a side band of communication sent on the normal SuperSpeed data lines at a lower frequency 10 50 MHz instead of 5 Gbps This side band helps to manage signal initiation and low power management on the bus on a link between two ports Elastic Buffer USB 3 0 devices do not share the exact same clock source Therefore they must be able to tolerate small variations between reference clocks on the transmitter and receiver To compensate for such differences receivers implement elasticity buffers that add or throw away dummy data called SKP ordered sets based on the state of the buffer at the time that the SKP ordered sets were received USB 3 0 Link Layer The Link Layer is responsible for establishing and maintaining a reliable channel between a host and a device There are a number of key concepts in this layer Link Commands Link Commands are used to ensure the successful transfer of a packet link flow control and link power management Link Training and Status State Machine LTSSM Beagle Protocol Analyzer User Manual TOTAL PHASE LTSSM is a state machine that defines link con
134. ilter Enable bit mask BG USB2 HW FILTER PID SOF Filter SOF packets BG USB2 HW FILTER PID IN Filter IN ACK IN NAK packet groups BG USB2 HW FILTER PID PING Filter PING NAK packet groups BG USB2 HW FILTER PID PRE Filter PRE packet groups BG USB2 HW FILTER PID SPLIT Filter SPLIT packet groups BG USB2 HW FILTER SELF Filter packets intended for Beagle analyzer Return Value A Beagle status code of BG OK is returned on success or an error code as detailed in Table 74 Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is not supported for the Beagle USB 12 Protocol Analyzers The Beagle USB Analyzer is capable of filtering out data less transactions before being saved for capture This option can be especially useful for saving memory on the analysis PC and on the hardware buffer To enable the filtering simply use the bitmask detailed in Table 45 By using a bit wise OR operation multiple filters can be enabled It is important to note that calling this function will disable all filters that are not explicitly set in the filter config input For more detailed information on the hardware filters please refer to Section 3 4 5 Configure External Output bg usb2 extout config int bg usb2 extout config Beagle beagle BeagleUsbExtoutType extout modulation Configure Output Pin 1 settings used for match action EXTOUT Arguments 154 TOTAL PHASE Beagle Pr
135. ing system See Section 3 3 8 for a description of how that is used 3 4 8 Current Voltage Monitoring The Beagle USB 480 Power Protocol Analyzers can capture Vays current and voltage readings in addition to USB data The readings are embedded in the same data stream as the USB traffic returned by the analyzer This functionality is tightly integrated into the Data Center Software which has been expanded to include a monitor window for real time display and continuous tracking of the data The monitor also offers an interactive bi directional way to correlate events on the Vay and USB traffic Hardware specifications for Current Votage Monitoring are provided in Section 2 2 5 3 4 9 Vays Trigger The Beagle USB 480 Power Protocol Analyzer Ultimate Edition extends Complex Matching to include the ability to monitor Vgys voltage or current Users can configure the analyzer to trigger on the rising and or falling edge s of a pre set voltage or current threshold of the Vas The pre set threshold can be included in any state of the Complex Matching state machine and each state can vary the edge s of the threshold it detects It is another tool for engineers to perform complex debugging and optimize the power consumption profile of their devices 3 5 Beagle l C SPI MDIO Protocol Analyzer Specifics 3 5 1 Sampling Rate Unlike the Beagle USB analyzers the sampling rate of the Beagle I C SPI MDIO analyzer is configurable In order to accurately capt
136. intervals These tokens do not cause any device to respond and can be used by devices for timing reasons The SOF provides two pieces of timing information Because of the precisely timed intervals of SOFs when a device detects an SOF it knows that the interval 23 9 TOTAL PHASE Beagle Protocol Analyzer User Manual time has passed All SOF s also include a frame number This is an 11 bit value that is incremented on every new frame SOFs are also used to keep devices from going into suspend Devices will go into suspend if they see an idle bus for an extended period of time By providing SOF s the host is issuing traffic on the bus and keeping devices from entering their suspended state Full speed hosts will send 1 SOF every millisecond High speed hosts divide the frame into 8 microframes and send an SOF at each microframe i e every 125 microseconds However the high speed hub will only increment the frame number after an entire frame has passed Therefore a high speed host will repeat the same frame number 8 times before incrementing it Low speed devices are never issued SOFs as it would require too much bandwidth on an already slower speed bus Instead to keep low speed devices from going into suspend hosts will issue a keep alive every millisecond These keep alives are short SEO events on the bus that last for approximately 1 33 microseconds They are not interpreted as valid data and have no associated PID Extended T
137. ion is not supported for the Beagle USB 12 and the Beagle USB 480 Protocol Analyzers This function is used to read hardware based USB statistics counts from the Beagle USB analyzer Top level and children statistics structures are detailed below Hardware based USB statistics counts top level structure struct BeagleUsbStats BeagleUsb3GenStats usb3 tx gen BeagleUsb3GenStats usb3 rx gen BeagleUsb3ConnStats usb3 tx conn BeagleUsb3ConnStats usb3 rx conn BeagleUsb2Stats usb2 Table 32 BeagleUsbStats field descriptions USB 3 0 TX general counts USB 3 0 RX general counts USB 3 0 TX connection specific counts USB 3 0 RX connection specific counts USB 2 0 counts Table 33 BeagleUsb3GenStats field descriptions 141 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Any transaction packets Any link management packets LGO Ux link commands U1 U2 U3 Any data packets it Any isochronous timestamp packets shp crc16 crc5 CRC16 CRC5 failing in SHP sdp crc32 CRC32 failing in SDP slc frm err SLC framing errors shp frm err SHP framing errors sdp end edb frm err SDP END EDB framing errors iso ips Isolated inter packet signaling packets para ips Parasitic inter packet signaling packets carry 1k dp Number of times data was transferred in chunks of 1 KB Table 34 BeagleUsb3ConnStats field descriptions Qualified transaction packets Idp Qualified data packets Qualified ACK tr
138. ion of the bg usb2 read function with the added feature of bit level timing All ofthe bg usb2 read arguments and details apply The values in the bit timing array give the offset of each bit from time sop 170 TOTAL PHASE Beagle Protocol Analyzer User Manual The bit timing array should be allocated at least as large as max timing Use the function bg bit timing size in Section 6 4 3 4 to determine how large an array to allocate for b t timing Reconstruct Bit Timing bg usb2 reconstruct timing int bg usb2 reconstruct timing u32 target config int num bytes u08 packet int max timing u32 bit timing Reconstruct the bit level timing of a packet Arguments target config the bus speed of the packet num bytes number of bytes to do the reconstruction on packet an array containing the packet bytes max timing maximum number of bits to do the reconstruction on bit timing allocated array of u32 which is filled with the duration of each of the bits Return Value A Beagle status code of BG OK is returned on success or an error code as detailed in Table 74 Specific Error Codes None Details All Beagle analyzers except for the Beagle USB 12 analyzer are restricted to packet level timing of the capture data However this function provides a bit level timing reconstruction based upon the data and the speed of the bus The bit timing array will be filled with the duration of each of the bits in the
139. is new data This is used by input devices such as mice and keyboards Isochronous 17 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Periodic and continuous transfer for time sensitive data There is no error checking or retransmission of the data sent in these packets This is used for devices that need to reserve bandwidth and have a high tolerance to errors Examples include multimedia devices for audio and video Bulk General transfer scheme for large amounts of data This is for contexts where it is more important that the data is transmitted without errors than for the data to arrive in a timely manner Bulk transfers have the lowest priority If the bus is busy with other transfers this transaction may be delayed The data is guaranteed to arrive without error If an error is detected in the CRCs the data will be retransmitted Examples of this type of transfer are files from a mass storage device or the output from a scanner USB 2 0 Packets All USB packets are prefaced by a SYNC field and then a Packet Identifier PID byte Packets are terminated with an End of Packet EOP The SYNC field which is a sequence of KJ pairs followed by 2 K s on the data lines serves as a Start of Packet SOP marker and is used to synchronize the devices transceiver with that of the host This SYNC field is 8 bits long for full low speed and 32 bits long for high speed The EOP field varies depending on the bus speed For low or fu
140. is function is an extension of the bg mdio read function with the added feature of bit level timing All of the bg mdio read arguments and details apply The values in the bit timing array give the offset of each bit from time sop The bit timing array should be allocated at least as large as max timing Use the function bg bit timing size in Section 6 4 3 4 to determine how large an array to allocate for bit_ timing The bit time for the final bit of the frame is always zero This is due to the fact that the bit times are measured between rising edges of the MDC line The first bit time is measured from the first rising edge of the MDC line to the next rising edge For the last bit of a frame there may not be a subsequent rising edge of the MDC line until the next frame Therefore no bit time value can be determined for final bit of a frame Parse MDIO data bg mdio parse int bg mdio parse u32 packet u08 clause u08 opcode u08 addrl u08 addr2 ul6 data Parses packet into field values Arguments packet the MDIO frame to parse 199 9 TOTAL PHASE Beagle Protocol Analyzer User Manual clause filled with the clause of the frame as detailed in Table 72 opcode filled with the OP code of the frame as detailed in Table 73 addr1 filled with the value of the first address field PHY in Clause 22 port in Clause 45 addr2 filled with the value of the second address field reg in Clause 22 device in Clause 45
141. l fan which automatically turns on as needed 3 3 2 Receiver Termination Detection Termination resistors on the SuperSpeed receivers are required for good signal integrity The SuperSpeed transmitter uses the presence of the termination resistors to detect the presence of a SuperSpeed receiver According to the USB 3 0 specification if the termination resistor is not detected the SuperSpeed transmitter should not send any SuperSpeed packets The Beagle USB 5000 analyzer uses a sophisticated algorithm to detect the presence of the termination resistor When the termination resistor is detected the Beagle analyzer will illuminate the RxTerm activity LED on the front panel and apply a termination resistor on the lines presented to the transmitter Receiver detection can take up to 500 us however this should have no affect on the USB 3 0 data According to the USB 3 0 specification the transmitter should not send any USB 3 0 data until the termination resistor is detected The net effect of the delay introduced by the detection system would be as if the cable insertion was delayed by 500 us and should have no affect on the USB 3 0 data The Beagle USB 5000 analyzer s receiver termination detection system is set to auto detect by default It is also possible to manually set the receiver termination to be always on or always off in the upstream or downstream direction If the termination resistor is set manually the auto detection system will be
142. le in a case where the bus is idle for 8 ms the analyzer will return 5 ms for the duration of the suspend this 73 9 TOTAL PHASE Beagle Protocol Analyzer User Manual corresponds with the fact that the device can only enter the suspend state after 3 ms of bus idle and is therefore suspended for 5 ms For resume events the Beagle analyzer will return the duration of the K portion of the resume signaling Rather than combine this duration with the ensuing SEO this scheme provides users with the ability to determine the individual durations of each segment of the resume event Specifically the user can refer to the start time of the resume event the duration of the resume event time of K state and the start time of the subsequent event or packet For more details on USB bus events refer to Section 1 1 2 and the USB 2 0 spec 3 4 2 OTG Events The Beagle USB 480 analyzer has the ability to detect On The Go OTG events These events include the Host Negotiation Protocol HNP and each stage of the Session Request Protocol SRP For more details on these protocols see Section 1 1 3 11 A HNP event will be returned upon seeing the correct initial conditions and then detecting a correctly timed SEO followed by the full speed J If the new host does not issue a reset within the specified time the HNP event will be returned with an error indication There are two stages of the SRP and a separate event is returned for each of them
143. le analyzer will be returned The configuration will be described by the same values as in the table above Specific Error Codes BG FUNCTION NOT AVAILABLE The hardware version is not compatible with this feature Only the Beagle I C SPI MDIO monitor supports switchable target power pins Details This function is only available on the Beagle I C SPI MDIO Protocol Analyzer Both target power pins are controlled together Independent control is not supported This function may be executed in any operation mode For the most part target power should be left off as the Beagle analyzer is normally passively monitoring the bus Host Interface Speed bg host ifce speed int bg host ifce speed Beagle beagle 103 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Query the host interface speed Arguments beagle handle of a Beagle analyzer Return Value This function returns enumerated values specifying the USB speed at which the analysis computer is communicating with the given Beagle analyzer See Table 8 Table 8 Interface Speed definitions BG HOST IFCE FULL SPEED Full speed 12 Mbps interface BG HOST IFCE HIGH SPEED High speed 480 Mbps interface Specific Error Codes None Details Used to determine the USB communication rate between the Beagle analyzer and the analysis PC The Beagle analyzers require a high speed USB connection with the host Capturing from a Beagle analyzer that is conne
144. le to service the token that it received Finally in the Handshake phase the receiver can send an ACK NAK or STALL indicating the success or failure of the transaction All of the transfers described above follow this general scheme with the exception of the Isochronous transfer In this case no Handshake phase occurs because it is more important to stream data out in a timely fashion It is acceptable to drop packets occasionally and there is no need to waste time by attempting to retransmit those particular packets Control Transfers Control transfers are a group of transactions that occur on the control pipe The control pipe is the only type of pipe which is allowed to use SETUP transactions A control transfer consists of at least two stages called the Setup Stage and the Status Stage Optionally control transfers may also include a Data Stage The Setup Stage always consists of a single SETUP transaction This transaction contains 8 bytes of data of which some of the bytes specify the length of the control transfer and its direction The direction may either be host to device or device to host If the length is not zero then the control transfer will have a Data Stage The Data Stage is always comprised of either IN transactions or OUT transactions depending on the direction of the control transfer The Data Stage will never be made a mix of the two Lastly the Status Stage consists of an IN transaction if the control transfer was a
145. le to access up to 32 registers in 32 different PHY devices These registers provide status and control information such as link status speed ability and selection power down for low power consumption duplex mode full or half auto negotiation fault signaling and loopback To meet the needs the expanding needs of 10 Gigabit Ethernet devices Clause 45 of the 802 3ae specification provided the following additions to MDIO Ability to access 65 536 registers in 32 different devices on 32 different ports Additional OP code and ST code for Indirect Address register access for 10 Gigabit Ethernet End to end fault signaling Multiple loopback points Low voltage electrical specification 1 4 2 MDIO Theory of Operation The MDIO bus has two signals Management Data Clock MDC and Managment Data Input Ouput MDIO MDIO has specific terminology to define the various devices on the bus The device driving the MDIO bus is identified as the Station Management Entity STA The target devices that are being managed by the MDC are referred to as MDIO Manageable Devices MMD 36 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The STA initiates all communication in MDIO and is responsible for driving the clock on MDC MDC is specified to have a frequency of up to 2 5 MHz 1 4 3 Clause 22 Clause 22 defines the MDIO communication basic frame format Figure 27 which is composed of the following elements ST OP
146. led in Table 74 Specific Error Codes 146 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG STILL ACTIVE An attempt was made to change the configuration while the capture was still active BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is not supported for the Beagle USB 12 Protocol Analyzers since the Beagle 12 always performs in auto detection mode for full and low speed buses The target config option specifies the speed of communication on the target bus and whether the analyzer should operate without the target host Vays The Beagle USB Analyzer may be configured to auto detect the speed or may alternatively be locked to monitor only a single communication speed Additionally the Analyzer also monitors the target host Vgys to detect if a host is present and it will not start capturing traffic if there is no Vgus or if Vays is under 5 V This requirement can be overridden by the BG USB2 VBUS OVERRIDE flag the speed constants are mutually exclusive but BG USB2 VBUS OVERRIDE is a bit mask For more details please refer to Knowledge Base Article 10058 Enable Digital Output bg usb2 digital out config int bg usb2 digital out config Beagle beagle u08 out enable mask u08 out polarity mask Enable Beagle analyzer to output a specific match type on output pins for USB 2 0 Arguments beagle handle of a Beagle analyzer out enable mask bitmask of enabled output pins as de
147. lications 4 7 1 Overview The Beagle Rosetta language bindings make integration of the Beagle API into custom applications simple Accessing a Beagle analyzer s functionality simply requires function calls to the Beagle API This API is easy to understand much like the ANSI C library functions e g there is no unnecessary entanglement with the Windows messaging subsystem like development kits for some other embedded tools First choose the Rosetta bindings appropriate for the programming language Different Rosetta bindings are included with the software distribution on the distribution CD They can also be found in the software download package available on the Total Phase website Currently the following languages are supported C C Python Visual Basic 6 Visual Basic NET and C4 Next follow the instructions for each language binding on how to integrate the bindings with your application build setup As an example the integration for the C language bindings is described below For information on how to integrate the bindings for other languages please see the example code included on the distribution CD and also available for download on the Total Phase website 1 Include the beagle h file included with the API software package in any C or C source module The module may now use any Beagle API call listed in beagle h 2 Compile and link beagle c with your application Ensure that the include path for compilation also li
148. ll speed buses the EOP consists of an SEO for two bit times For high speed buses because the bus is at SEO when it is idle a different method is used to indicate the end of the packet For high speed the transmitter induces a bit stuff error to indicate the end of the packet So if the line state before the EOP is J the transmitter will send 8 bits of K The exception to this is the high speed SOF EOP in which case the high speed EOP is extended to 40 bits long This is done for bus disconnect detection The PID is the first byte of valid data sent across the bus and it encodes the packet type The PID may be followed by anywhere from 0 to 1026 bytes depending on the packet type The PID byte is self checking in order for the PID to be valid the last 4 bits must be a ones complement of the first 4 bits If a received PID fails its check the remainder of the packet will be ignored by the USB device There are four types of PID which are described in Table 2 Table 2 USB Packet Types Host to device transfer Device to Host transfer Start of Frame marker 18 9 TOTAL PHASE Beagle Protocol Analyzer User Manual NAK Receiver cannot accept data or the transmitter could not send data ERR Eror handshake tor Spit Transacion The format of the IN OUT and SETUP Token packets is shown in Figure 11 The format of the SOF packet is shown in Figure 12 The format of the Data packets is shown in Figure 13 Lastly the
149. mber of devices and IDs returned in each of their respective arrays is determined by the minimum of num_devices and num_ids However if either array is NULL the length passed in for the other array is used as is and the NULL array is not populated If both arrays are NULL neither array is populated but the number of devices found is still returned Open a Beagle analyzer bg open Beagle bg open int port number Open the Beagle port Arguments port number The Beagle analyzer port number This port number is the the same as the one obtained from the bg find devices function It is a zero based number Return Value This function returns a Beagle handle which is guaranteed to be greater than zero if valid Specific Error Codes BG UNABLE TO OPEN The specified port is not connected to a Beagle analyzer or the port is already in use BG INCOMPATIBLE DEVICE There is a version mismatch between the DLL and the hardware The DLL is not of a sufficient version for interoperability with the hardware version or vice versa See bg open ext in Section 6 4 1 4 for more information Details This function is recommended for use in simple applications where extended information is not required For more complex applications the use of bg open ext is recommended 94 TOTAL PHASE Beagle Protocol Analyzer User Manual Open a Beagle analyzer bg_open_ext Beagle bg open ext int port number BeagleExt bg ext Ope
150. multiplexing multiple data streams through a standard bulk pipe Bus Speed The bus speed determines the rate at which bits are sent across the bus There are currently four speeds at which wired USB operates low speed 1 5 Mbps full speed 12 Mbps high speed 480 Mbps and SuperSpeed 5 Gbps In order to determine the bus speed of a full speed or low speed device the host must simply look at the idle state of the bus Full speed devices have a pull up resistor on the D line whereas low speed devices have a pull up resistor on the D line Therefore if the D line is high when idle then full speed connectivity is established If the D line is high when idle then low speed connectivity is in effect A full speed device does not have to be capable of running at low speed and vice versa A full speed host or hub however must be capable of communicating with both full speed and low speed devices With the introduction of high speed USB high speed hosts and hubs must be able to communicate with devices of all speeds Additionally high speed devices must be backward compatible for communication at full speed with legacy hosts and hubs To facilitate this all high speed hosts and devices initially operate at full speed and a high speed handshake must take place before a high speed capable device and a high speed capable host can begin operating at high speed The handshake begins when a high speed capable host sees a full speed device a
151. n descriptor can define one or more Interface descriptors Each of the Interface descriptors can have one or more alternate settings but only one setting can be active at a time The Interface descriptor defines one or more Endpoints Device Descriptor Each USB device can only have a single Device Descriptor This descriptor contains information that applies globally to the device such as serial number vendor ID product ID etc The device descriptor also has information about the device class The host PC can use this information to help determine what driver to load for the device Configuration Descriptor device descriptor can have one or more configuration descriptors Each of these descriptors defines how the device is powered e g bus powered or self powered the maximum power consumption and what interfaces are available in this particular setup The host can choose whether to read just the configuration descriptor or the entire hierarchy configuration interfaces and alternate interfaces at once Interface Descriptor A configuration descriptor defines one or more interface descriptors Each interface number can be subdivided into multiple alternate interfaces that help more finely modify the characteristics of a device The host PC selects particular alternate interface depending on what functions it wishes to access The interface also has class information which the host PC can use to determine what driver to use Endp
152. n event will be sent to the analysis PC The digital input may not oscillate at a rate faster than 30 MHz Any faster and the events may not be passed to the PC Also when an active data packet is on the bus only one input event will be recorded and sent back to the analysis PC Once the packet has completed the latest state of the lines if changed will be sent back to the PC Digital inputs are rated for 3 3 V Digital outputs allow users to output events to external devices such as an oscilloscope or logic analyzer especially to trigger the oscilloscope to capture data Digital outputs can be set to activate on various conditions that are described more thoroughly in Section 3 4 4 The digital outputs are rated to 3 3 V and 10 mA 2 2 3 On board Buffer The Beagle USB 480 analyzer contains a 64 MB on board buffer This buffer serves two purposes It helps buffer large data flows during real time capture when the analysis computer can not stream the data off the Beagle analyzer fast enough It is also used during a delayed download capture to store all of the captured data 48 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 2 2 4 Hardware Filters The Beagle USB 480 analyzer provides six different hardware filters These will filter out data less transactions in the hardware such as IN NAK and PING NAK combinations The unwanted data is thrown away reducing the amount of captured data on the device the amount of analysis t
153. n have an effect on the total buffer size Therefore to accurately determine how much buffering has been set on the PC this call should be made after all the configurations have been set If the application does not read data from the software library quickly enough the entire host side buffer will fill For most of the Beagle analyzers this means that any new traffic on the target bus will be dropped The Beagle USB 480 analyzer however has a large on board memory buffer to solve this issue To understand the operation of the Beagle USB 480 analyzer and how it relates to the API please refer to Section 6 8 Available Read Buffering bg host buffer free int bg host buffer free Beagle beagle Query the amount of read buffering available Arguments beagle handle of a Beagle analyzer Return Value The amount of available USB read buffering in bytes Specific Error Codes None Details 105 9 TOTAL PHASE Beagle Protocol Analyzer User Manual USB read buffers are used by the analysis computer to receive the incoming data from the Beagle analyzer Calling this function will return the amount of PC buffering available to receive data as of the last bg read call If the amount of available USB buffering drops close to zero capture data from the device may be lost Used Read Buffering bg host buffer used int bg host buffer used Beagle beagle Query the amount of used USB read buffering Arguments beagle handle o
154. n returns BG OK or a negative value indicating an error Specific Error Codes BG CONFIG ERROR An attempt was made to configure the Beagle with invalid settings BG FUNCTION NOT AVAILABLE The Beagle analyzer being configured is not licensed to use the Cross Analyzer Sync feature Details This function can only be used with a Beagle 5000 v2 00 or later analyzer licensed to use Cross Analyzer Sync When BG5000 CROSS ANALYZER SYNC BYPASS is used to completely bypass the Cross Analyzer Sync feature the analyzer will no longer accept any Cross Analyzer trigger or stop signals nor will the analyzer output trigger or stop signals to other analyzers Using BG5000 CROSS ANALYZER IGNORE to ignore a Cross Analyzer trigger or stop signal will not affect the output of that signal by the analyzer If the analyzer is participating in Cross Analyzer Sync the trigger and stop signals will be outputted even if one or both of those signals is being ignored on input Release from USB 5000 Cross Analyzer Sync bg5000 cross analyzer sync release int bg5000 cross analyzer sync release Beagle beagle Release the analyzer from Cross Analyzer Sync for the remainder of the current capture Arguments beagle handle of a Beagle analyzer Return Value This function returns BG OK or a negative value indicating an error 196 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Specific Error Codes BG FUNCTION NOT AVAILABLE The Beagle analyzer b
155. n the Beagle port returning extended information in the supplied structure Arguments port number same as bg open bg ext pointer to pre allocated structure for extended version information available on open Return Value This function returns a Beagle handle which is guaranteed to be greater than zero if valid Specific Error Codes BG UNABLE TO OPEN The specified port is not connected to a Beagle analyzer or the port is already in use BG INCOMPATIBLE DEVICE There is a version mismatch between the DLL and the hardware The DLL is not of a sufficient version for interoperability with the hardware version or vice versa The version information will be available in the memory pointed to by bg ext Details If O is passed as the pointer to the structure bg ext this function will behave exactly like bg open The BeagleExt structure is described below struct BeagleExt BeagleVersion version Feature bitmap for this device int features The features field denotes the capabilities of the Beagle analyzer See the API function bg_features for more information 95 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The BeagleVersion structure describes the various version dependencies of Beagle components It can be used to determine which component caused an incompatibility error struct BeagleVersion Software firmware and hardware versions ul6 software ul6 firmware ul6 hardware
156. nalysis port is a SuperSpeed USB downlink The Beagle analyzer must be connected with a standard USB 3 0 or USB 2 0 cable to the Analysis computer 43 TOTAL PHASE Beagle Protocol Analyzer User Manual Power The Beagle USB 5000 analyzer includes a 36 W AC power adapter To ensure the proper operation of the Beagle analyzer it must be powered on before any devices are connected to the analyzer The DC connector has positive polarity and has a barrel plug with dimensions of 5 5 mm x 3 5 mm x 9 5 mm HDMI Ports The Beagle USB 5000 analyzer has two HDMI ports labeled SYNC OUT and SYNC IN on the back panel These HDMI ports are provided to allow capture synchronization between two or more Beagle USB 5000 analyzers Do not connect the HDMI ports to any arbitrary HDMI compatible device The HDMI ports on a Beagle USB 5000 analyzer back panel should only be connected to the HDMI ports on another Beagle USB 5000 analyzer For details on using the Cross Analyzer Sync feature refer to Section 3 3 7 Note Cross Analyzer Sync HDMI ports are only available on hardware v2 00 or later 2 1 3 On board Buffer The Beagle USB 5000 analyzer includes a 2 B USB 3 0 memory buffer This memory buffer can be upgraded to 4 GB with an optional upgrade package The Beagle USB 5000 analyzer has a parallel 128 MB USB 2 0 buffer which is used for USB 2 0 only captures and simultaneous USB 2 0 3 0 captures The memory provides a temporary FIFO storage
157. ndle of a Beagle analyzer validate validate a configuration state without actually programming the Beagle analyzer extout enable EXTOUT assertion on complex match state N data timer and async match units corresponding to state N use null value for empty states Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes NO STATES DATA PACKET TYPE DATA FIELD ERR MATCH FIELD DATA RESOURCES DP MATCH TYPE DP MATCH VAL DP REQUIRED DP RESOURCES TIMER UNIT TIMER BOUNDS ASYNC EVENT All of the following error codes are prefixed by BG COMPLEX CONFIG ERROR e g Eg BG COMPLEX CONFIG ERROR NO STATES No valid BeagleUsb3ComplexMatchState was supplied A BeagleUsb3PacketType value is invalid Adata Length field does not match its data valid length The err match field was populated incorrectly Insufficient data resources to satisfy configuration A BeagleUsbMat chType value is invalid A source match val field is invalid A required Beag LeUsb3DataProperties object was not supplied for a BG USB3 MATCH PACKET SHP SDP packet type Insufficient data properties resources to satisfy configuration A BeagleUsb3TimerUnit value is invalid A timer value is out of the allowable range A BeagleUsb3AsyncEventType value is invalid 184 TOTAL PHASE Beagle Protocol Analyzer User Manual ASYNC EDGE ACTION FILTER ACTION G
158. ne Details Complex matching must first be configured in bg usb3 complex match config before it can be enabled Disable Complex Matching bg usb3 complex match disable int bg usb3 complex match disable Beagle beagle 193 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Disable the USB 3 0 complex matching system Arguments beagle handle of a Beagle analyzer Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes None Details Since complex matching only requires a single configuration complex matching can be re enabled without reconfiguration after being disabled Test Memory bg usb3 memory test int bg usb3 memory test Beagle beagle BeagleUsb3MemoryTestType test Test the USB 3 0 capture buffer hardware Arguments beagle handle of a Beagle analyzer test an enumerated value which determines what kind of memory test is run as specified in Table 69 Table 69 BeagleUsbMemoryTestType enumerated values BG USB MEMORY TEST FAST Fast memory test BG USB MEMORY TEST FULL Thorough memory test BG USB MEMORY TEST SKIP Memory test not performed Return Value This function returns a memory test result listed in Table 54 or a negative value indicating an error Specific Error Codes None 194 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Details This function is used to verify that the USB 3 0 circular buffer hardware is
159. nectivity and link power management LTSSM consists of 12 states 4 operational link states UO U1 U2 US 4 link initialization and training states Rx Detect Polling Recovery Hot Reset 2 link test states Loopback and Compliance Mode SS Inactive which is a link error state where USB 3 0 is non operable and SS Disabled where the SuperSpeed bus is disabled and operates as USB 2 0 only Figure 4 maps out all the states of LTSSM and defines how the link transitions between states Directed From Any Other States Z ET X SSinacive 3 u N A Directed PowerOn Reset 4 P d USB2 Bus Reset _ y A rep A i ss Disabled A are Roc N Disable ff Absent Rx Detect v d L A Overton ay L y X US Port ONLY T d x Warm Reset di i bu o Rx Detect IE di PowerOnReset vum j 2b S Ens S a e wa Rx Timeout gt lt eb r Timeout C LFPS Timeout u A Warm Reset Directed F Removal 7 E f DS Port ONLY Y N LFPS gt a e X Handshake _ um uM du HR EA eu m Timeout L u Y recoverable Polling x gt Loopback X U3 P 7 Directed Timeout A j FN Training r Wi A an LGO_U3 N gt N popee 9 N idle Symbol Hot Reset Di Fa N LGO U2 N a Handshake Eu 1l f LJ U2 pya UO ih 3 Timeout y o x i NS l Directed end LGO U1 Training
160. nough edge transitions for clock recovery Disparity is kept low by taking advantage of the increased number space that 10b has to offer Since all the 8b values would only take a subset of the 10b number space multiple 10b symbols can be used encode a single 8b value Often times two different 10b symbols will be used to encode an 8b value where the two 10b symbols have different number of 1s and Os The 10b symbol that is chosen to be sent will minimize the existing disparity on the line with the goal of having a net 50 50 distribution of 1s and Os For 9 TOTAL PHASE Beagle Protocol Analyzer User Manual example if a line has a running disparity of 2 1s the next symbol on the line will have a bit pattern that has more Os In addition the increased number space allows for the use of certain control symbols called K symbols which do not map to any 8b data value USB 3 0 uses these control symbols for a number of purposes including packet framing elastic buffer mitigation and data scrambler control Training Sequences To accomodate for the various signaling characteristics of all manufactured transmitters cables and connectors SuperSpeed receivers must be trained upon connection to a transmitter This training sequence helps configure the receiver equalization polairty and data scrambler in order to establish a successful communications link Spread Spectrum Clocking SuperSpeed USB employs spread spectrum clocking on its s
161. nput can be used to trigger the capture and insert events into the data stream After the capture has been triggered subsequent external input events can be inserted into the capture The USB 3 0 input can capture external signals up to 125 MHz 8 ns pulse width However in the interest of preserving capture fidelity the analyzer may throttle the external input signal if the rate of the input events are judged to be too high WARNING The USB 2 0 Input is only rated for 3 3 V Applying signals with higher voltage will damage your analyzer and is not covered by the warranty The USB 2 0 external inputs are available on pins 1 through 4 on the Mini DIN 9 connector These digital input lines are 3 3 V tolerant Each input can be configured individually to be monitored in the capture Each input can also be independently 64 9 TOTAL PHASE Beagle Protocol Analyzer User Manual configured to trigger the capture on either the rising edge falling edge or both A USB 2 0 digital input does not need to be monitored to function as a trigger Besides the ability to trigger the capture and the voltage level the USB 2 0 inputs have the same basic behavior as the digital inputs of the Beagle USB 480 analyzer described in Section 3 4 3 3 3 6 Digital Output The digital outputs provide a mechanism to synchronize the Beagle USB 5000 analyzer with other devices such as an oscilloscope or logic analyzer on events of interest WARNING The USB 3
162. number of data bytes to read an allocated array of u08 which is filled with the received data number of k data bytes to read filled with k data flags Table 30 BeagleUsbSource enumerated values BG USB SOURCE USB3 RX USB 3 0 Upstream BG USB SOURCE USB3 TX USB 3 0 Downstream BG USB SOURCE USB2 USB 2 0 BG USB SOURCE IV MON Vgus Voltage and current stream Return Value This function returns the number of bytes read or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Beagle is not running a capture or function not supported by device BG CAPTURE NOT TRIGGERED Capture has not been triggered yet Details This function can be called to download data from any Beagle USB analyzer The argument list is the superset of what is required for USB 2 0 and USB 3 0 traffic If the analyzer does not support USB 3 0 or is not enabled for USB 3 0 capture the irrelevant arguments will be unused and can optionally be set to 0 135 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The function will block until the requested amount of data is captured a complete packet with the appropriate end of packet condition is observed or the bus is idle for longer than the timeout interval set See Section 6 4 1 12 for information on the bg latency and bg timeout functions which affect the behavior of this function The packet array should be allocated at least as large as max bytes All o
163. o the Analysis PC is only high speed USB operating at 480 Mbps Theoretically the SuperSpeed USB front end is able to operate at up to 5 Gbps Given this disparity there are several key technologies involved in providing as close to a real time experience as possible When capturing data the Beagle analyzer has a highly efficient data stream that adds very little overhead to the USB 3 0 and 2 0 data streams it is monitoring This low overhead reduces the amount of data that needs to be uploaded The high speed USB driver has been highly optimized to deliver as close to the theoretical maximum performance as possible The Beagle analyzer is able to sustain download speeds of up to 40 MB s Given that USB traffic being monitored tends to occur in bursts the Beagle analyzer is able to catch up quickly and eventually be up to date during gaps in the USB bus being monitored When there are large streams of the USB 3 0 data the Beagle USB 5000 analyzer will make full use of its 2 GB buffer to keep pace with the bus under analysis However the analyzer may reach a point where the memory buffer will be filled and no additional data can be captured At this point the capture of new data will stopped and all remaining data will be downloaded to the PC Capture Modes The Beagle USB 5000 analyzer is able to capture USB 3 0 or USB 2 0 data With an additional upgrade the Beagle analyzer can capture both USB 3 0 and USB 2 0 simultaneously Captu
164. o their host PC For example input devices such as mice keyboards and joysticks are all part of the HID Human Interface Device class Another example is the Mass Storage class which covers removable hard drives and keychain flash disks All of these devices use the same Mass Storage driver which simplifies their use However a device does not necessarily need to belong to a specific device class In these cases the USB device will require its own USB driver that the host PC must load to make the functionality available to the host On The Go OTG The OTG supplement to the USB 2 0 spec provides methods for mobile devices to communicate with each other actively switch the role of host and device and also request sessions from each other when power to the USB is removed The initial role of host and device is determined entirely by the USB connector itself All OTG capable peripherals will have a 5 pin Micro AB receptacle which can receive either the Micro A or Micro B plug If the peripheral receives the Micro A plug then it behaves as the host If it receives the Micro B plug then it behaves as the device However there may be certain situations where a peripheral received the Micro B plug but needs to behave as the host Rather than request that the user swap the cable orientation the two peripherals have the ability to swap the roles of host and device through the Host Negotiation Protocol HNP The HNP begins when the A device
165. of packet to be matched 157 9 TOTAL PHASE Beagle Protocol Analyzer User Manual prefix The PID that should appear before the packet type handshake Mask of handshakes that should follow the packet type data length Length of the data array data Byte array of data on which to match data valid length Length of the data valid array data valid Array specifying which bytes in the data array are valid non zero and which are dont cares zero err match Dictates which CRC error conditions must be valid or invalid for a match Options are listed in Table 51 data properties valid data properties is valid data properties Specific match information for supplied data match modifier Modify the matching criteria The BeagleUsb2PacketType enumerated type is used in data match units to denote which type of packet is to be matched The different enumerated types are described in the Table 48 Table 48 BeagleUsb2PacketType enumerated values BG USB2 MATCH PACKET IN Match on IN packets BG USB2 MATCH PACKET OUT Match on OUT packets BG USB2 MATCH PACKET SETUP Match on SETUP packets BG USB2 MATCH PACKET SOF Match on SOF packets BG USB2 MATCH PACKET DATAO Match on DATAO packets BG USB2 MATCH PACKET DATA1 Match on DATA1 packets BG USB2 MATCH PACKET DATA2 Match on DATA2 packets BG USB2 MATCH PACKET MDATA Match on MDATA packets BG USB2 MATCH PACKET ACK Match on ACK packets BG USB2 MATCH PACKET NAK Match on NAK packets 15
166. oint Descriptor An interface descriptor defines one or more endpoints The endpoint descriptor is the last leaf in the configuration hierarchy and it defines the bandwidth requirements transfer type and transfer direction of an endpoint For transfer direction an endpoint is either a source IN or sink OUT of the USB device String Descriptor Some of the configuration descriptors mentioned above can include a string descriptor index number The host PC can then request the unicode encoded string for a specified index This provides the host with human 29 9 TOTAL PHASE Beagle Protocol Analyzer User Manual readable information about the device including strings for manufacturer name product name and serial number Device Class USB devices vary greatly in terms of function and communication requirements Some devices are single purpose such as a mouse or keyboard Other devices may have multiple functionalities that are accessible via USB such as a printer scanner fax device The USB IF Device Working Group defines a discreet number of device classes The idea was to simplify software development by specifying a minimum set of functionality and characteristics that is shared by a group of devices and interfaces Devices of the same class can all use the same USB driver This greatly simplifies the use of USB devices and saves the end user the time and hassle of installing a driver for every single USB device that is connected t
167. oken Transactions The new Link Power Management addendum to the USB 2 0 Specification has expanded the number of PIDs through the use of the previously reserved PID OxFO The extended token format is a two phase transaction that begins with a standard token packet that has the EXT PID Following this packet is the extended token packet which takes a similar form It begins with an 8 bit SubPID and ends with a 5 bit CRC however the 11 remaining bits in the middle will have different meaning depending on the type of SubPID TOKEN Phase Token Packet Extended Token Packet Figure 17 above Extended Token Transaction In an extended token transaction the token phase of the transaction has two token packets The first packet uses the EXT PID The content of the second packet will depend on the particular SubPID specification The subsequent Data and Handshake phases will depend on the value of the SubPID as well Following this token phase the device will respond with the appropriate data or handshake depending on the protocol associated with that SubPID Currently the only defined SubPID is for link power management LPM For more details please refer to the Link Power Management addendum 24 9 TOTAL PHASE Beagle Protocol Analyzer User Manual USB 3 0 Packets USB 3 0 supports the same types of data transfers control interrupt bulk and isochronous However the packet structure has changed to support the new features in US
168. onsumption Speed The Beagle USB 12 Protocol Analyzer supports full and low speed capture It does not support high speed protocols for capture The downlink to the analysis PC must be high speed ESD protection The Beagle analyzer has built in electrostatic discharge protection to prevent damage to the unit from high voltage static electricity Power consumption The Beagle analyzer consumes a maximum of approximately 15 mA from the capture host This is a minimal overhead in addition to the current draw of the target device Note that if a capture target reports itself as a 100 mA device and draws almost all of that current the Beagle analyzer s extra power consumption will cause the overall power consumption to be out of spec Furthermore the Beagle analyzer consumes a maximum of approximately 125 mA of power from the analysis PC However it reports itself to the analysis PC as a low power device This reporting allows the Beagle analyzer to be used when its analysis port is connected to a bus powered hub which are only technically specified to supply 100 mA per port Normally this extra amount of power consumption should not cause any serious problems since other ports on the hub are most likely not using their full 100 mA budget If there are any concerns regarding the total amount of available current supply itis advisable to plug the Beagle analyzer s directly into the analysis PC s USB host port or to use a self powered hub
169. ords if you use auto configuration at one point and want to use it again later say to detect a new device address you will need to re enable the feature with a callto bg usb stats config Query Statistics System Configuration bg usb stats config query int bg usb stats config query Beagle beagle BeagleUsbStatsConfig config Query the hardware based USB statistics system for its current configuration Arguments beagle handle of a Beagle analyzer config filled with the current statistics system configuration Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is used to query the current configuration of the hardware based USB statistics system on the Beagle USB analyzer This function is not supported for the Beagle USB 12 and the Beagle USB 480 Protocol Analyzers 139 TOTAL PHASE Beagle Protocol Analyzer User Manual The config field is populated with the current configuration Most of the fields in the BeagleUsbStatsConfig Table 31 structure will be the same as the values you passed into the bg usb stats config function The main use case of this function is to query the status of automatic device address configuration Pay close attention to the auto config dev match type and dev match val fields If auto config was set to a non zero value enabling the automatic confi
170. otocol Analyzer User Manual beagle handle of a Beagle analyzer extout modulation mode of EXTOUT signal modulation Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG CONFIG ERROR An attempt was made to set an invalid configuration BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is supported only for analyzers with on board triggering capability The EXTOUT modulation specified in this function only applies to Output Pin 1 When the complex match system is enabled it will override the Output Pin 1 settings as configured in the usb2 digital out functions Any assertions of the external output by the match action system are done through Output Pin 1 The modulation on Output Pin 1 in these scenarios is set using this function The BeagleUsbExtoutType enumerated type is used to set the mode of EXTOUT signal modulation The different enumerated types are described in the table below Note that these values are a subset of the values available in USB 3 0 Section 6 8 5 7 Table 46 BeagleUsbExtoutType enumerated values BG USB EXTOUT POS PULSE BG USB EXTOUT NEG PULSE Negative pulse BG USB EXTOUT TOGGLE Toggle initial value LOW BG USB EXTOUT TOGGLE 1 Toggle initial value HIGH Configure Complex Matching bg usb2 complex match config int bg usb2 complex match config Beagle beagle u08 validate u08 digout BeagleU
171. output By configuring the levels sent by the transmitter it is possible to test the sensitivity of the receiver of the USB 3 0 device The characteristics of the transmitter can also be modified by changing the output pre emphasis Setting for each channel are provided to this function through a BeagleUsb3Channel structure as described below Channel Configuration struct BeagleUsb3Channel u08 input equalization short u08 input equalization medium u08 input equalization long u08 pre emphasis short level u08 pre emphasis short decay 175 9 TOTAL PHASE Beagle Protocol Analyzer User Manual u08 pre emphasis long level u08 pre emphasis long decay u08 output level Input equalization can be used to improve the detection of SuperSpeed USB signals which have been degraded from traveling through lossy media Three time constants short medium and long may be configured independently using the enumerated values listed in Table 56 Table 56 Input equalization enumerated values BG USB3 EQUALIZATION OFF Filtering off BG USB3 EQUALIZATION MIN Minimum filtering BG USB3 EQUALIZATION MOD Moderate filtering BG USB3 EQUALIZATION MAX Maximum filtering Output pre emphasis modifies the SuperSpeed signals output by the Beagle USB analyzer to compensate for the effects of transmission through lossy media Short pre emphasis compenstates for transmission through small impedance discontinuities Long pre emphasi
172. p up with the data rate over the USB bus thereby leading to more communication errors 6 4 3 Monitoring API Enable Monitoring bg enable int bg enable Beagle beagle BeagleProtocol protocol Start monitoring packets on the selected interface Arguments beagle handle of a Beagle analyzer protocol enumerated values specifying the protocol to monitor see Table 9 Table 9 BeagleProtocol enumerated values BG PROTOCOL NONE BG PROTOCOL COMMTEST BG PROTOCOL USB USB Protocol BG PROTOCOL I2C 12C Protocol BG PROTOCOL SPI SPI Protocol BG PROTOCOL MDIO MDIO Protocol Return Value A Beagle status code of BG OK is returned on success 107 TOTAL PHASE Beagle Protocol Analyzer User Manual Specific Error Codes BG FUNCTION NOT AVAILABLE The connected Beagle analyzer does not support capturing for the requested protocol BG UNKNOWN PROTOCOL A protocol was requested that does not appear in the enumeration detailed in Table 9 Details This function enables monitoring on the given Beagle analyzer See the section on the protocol specific APIs Functions for retrieving the capture data from the Beagle analyzer are described therein Stop Monitoring bg disable int bg disable Beagle beagle Stop monitoring of packets Arguments beagle handle of a Beagle analyzer Return Value A Beagle status code of BG OK is returned on success Specific Error Codes None Details Stops monitoring on the given
173. packet capture as detailed in Table 36 Table 36 BeagleUsb2CaptureMode enumerated values BG USB2 CAPTURE REALTIME Configure to real time capture BG USB2 CAPTURE REALTIME WITH PROTECTION Configure to real time capture with overflow protection BG USB2 CAPTURE DELAYED DOWNLOAD Configure to delayed download mode Return Value 143 TOTAL PHASE Beagle Protocol Analyzer User Manual A Beagle status code of BG_OK is returned on success or an error code as detailed in Table 74 Specific Error Codes BG STILL ACTIVE An attempt was made to change the configuration while the capture was still active BG CONFIG ERROR An attempt was made to set an invalid configuration Details The capture mode option specifies whether the capture will be in real time real time with truncation or delayed download mode For more details on the different modes of capture refer to Section 3 4 6 All Beagle USB analyzers support real time capture mode but only the Beagle USB 480 analyzers support real time with truncation and delayed download modes Configure Capture bg usb2 capture buffer config int bg usb2 capture buffer config Beagle beagle u32 pretrig kb u32 capture kb Configure USB 2 0 hardware capture buffer Arguments beagle handle of a Beagle analyzer pretrig kb amount in kB of pre trigger data to capture capture kb total amount in kB of data to capture Return Value This function returns BG OK or a negativ
174. packet of any type that is not an LGOOD n To do this the match unit has the ability to match or not 70 9 TOTAL PHASE Beagle Protocol Analyzer User Manual match any other packet types For example it is possible to match a situation where an ITP is followed by any packet that is not an LGOOD n by setting the match unit to match any packet that is NOT LGOOD n For data packets a specific data pattern is the basis of the match It is possible to restrict the scope of the match by limiting the match criteria to a specific device stream endpoint and or the length of the data packet Event Match Unit The event match unit can match any of the following events in either the upstream or downstream direction LFPS Polarity Inversion RX Termination and Disable Scrambling The event match unit can also match Vgus detection and the external input Timer Match Units The timer match unit will match after a specific amount of time has elapsed The timer begins upon entering the state which declared it and can run anywhere from a few nanoseconds to half a minute Using a multi state trigger a match can occur a set amount of time after a specific event Counters The execution of an a match units action can also be controlled by a counter All match units can be configured to execute its action only after a specific number of matches have been made For example a match unit may not trigger the capture until 20 TS1 packets are seen A
175. passed to bg iv mon parse to be parsed into voltage and current values There is no separate API for reading current voltage monitoring data only See section 6 8 3 6 for the interface of bg usb read Parse Current Voltage Monitoring data bg iv mon parse int bg iv mon parse int length u08 packet f32 voltage f32 current Parses packet into voltage and current values Arguments packet from bg usb read when BeagleUSBSource is BG USB SOURCE IV MON length from bg usb read when BeagleUSBSource is BG USB SOURCE IV MON voltage filled with the voltage value captured in the packet current filled with the current value captured in the packet Return Value A Beagle status code of BG OK is returned on success or an error code as detailed in Table 74 Specific Error Codes 201 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG IV MON NULL PACKET packet is NULL or length is O BG IV MON INVALID PAKCET LENGTH length too small to be a valid current voltage monitor packet Details FVoltage is returned in units of Volts V and current in Amperes A 6 11 Error Codes Table 74 Beagle API Error Codes Literal Name Value bg status string return value meo o ow o couPaTBLE DRIVER 3 ieompatbediververson se une TO OPEN f S webeipopendwis BG_UNABLE To CLOSE S webeiodessdwics BG COMMTEST NOT AVAILABLE 100 comm test feature not available 202 9 T
176. port is a SuperSpeed USB A receptacle While this receptacle may appear to be a USB 2 0 port this receptacle features the 5 extra conductors required for SuperSpeed USB This receptacle is compatible with both USB 2 0 and USB 3 0 cables However in order to monitor USB 3 0 traffic a USB 3 0 cable must be used to connect to a USB 3 0 host The Target Device port is a SuperSpeed USB B receptacle This receptacle is compatible with both USB 2 0 and USB 3 0 cables However in order to monitor USB 3 0 traffic a USB 3 0 cable must be used to connect to a USB 3 0 device The Beagle USB analyzer must be powered to ensure that the USB 3 0 ports function properly Failure to power the Beagle USB analyzer before attaching the target USB host and device may result in unexpected behavior As long as the analyzer is powered on the USB 3 0 connectors will be active and will transmit USB 3 0 data even if the analyzer is not actively capturing data This is true even if the analyzer is not connected to the Analysis computer Activity Indicators Between the Target Host and Target Device ports there are a number of LED indicators RxTerm RxTerm or receiver termination indicators are illuminated when the presence of the USB 3 0 termination resistor is detected During normal operation it is possible that the receiver termination indicator for the Target Device may remain illuminated even though the device may have been removed from the analyzer If t
177. puts and outputs hardware filtering as well as multiple capture modes 3 4 1 Bus Events The Beagle USB 480 analyzer provides users with insight into events that occur on the bus These bus events include suspend resume reset speed changes including high speed handshake and connect disconnect events Furthermore events that are unexpected i e do not conform to the USB spec are tagged with a specific status code to bring that to the attention of the user The Beagle USB 480 analyzer also has the ability to identify imperfect resets like a Tiny J associated with the high speed handshake A Tiny J or K may also be tagged when not in a high speed handshake situation if the reset is not fully at an SEO but is instead floating above the high speed receiver threshold This allows users to see if the host is driving a reset signal that is close enough to ground voltage Alternatively if this amount of detail on reset signals is not desired the auto speed detection could be disabled and locked to the specific speed of interest Where applicable bus events are also returned with a duration In most cases this duration is self explanatory such as in the duration of a Chirp K or a keep alive bus state However some clarification is required for the reported duration of suspend and resume events For suspend events the Beagle USB 480 analyzer will return the duration of the event as it is measured from the devices perspective For examp
178. puts on the Digital I O port for USB 2 0 Arguments beagle handle of a Beagle analyzer in enable mask bitmask of enabled input pins as detailed in Table 44 Table 44 Digital Input Pin Enable bit mask BG USB2 DIGITAL IN ENABLE PINI Enable input pin 1 BG USB2 DIGITAL IN ENABLE PIN2 Enable input pin 2 BG USB2 DIGITAL IN ENABLE PIN3 Enable input pin 3 BG USB2 DIGITAL IN ENABLE PINA Enable input pin 4 Return Value A Beagle status code of BG OK is returned on success or an error code as detailed in Table 74 Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is not supported for the Beagle USB 12 Protocol Analyzers The Beagle USB analyzer digital I O port has four pins allocated for digital inputs These digital inputs will display events in line with collected data For further details on the digital inputs refer to Section 3 4 4 and Section 3 4 3 The in enable mask is a bitmask of the parameters listed in Table 44 By using a bit wise OR operation multiple input pins can be enabled It is important to note that calling this function will disable all pins that are not explicitly set in the enable mask input Enable Simple Matching bg usb2 simple match config int bg usb2 simple match config Beagle beagle u08 dig in pin pos edge mask u08 dig in pin neg edge mask 152 9 TOTAL PHASE Beagle Protocol Analyzer User Manual u08 dig out matc
179. r Manual 5 Firmware 5 1 Philosophy The firmware included with the Beagle analyzer provides for the analysis of the supported protocols It is installed at the factory during manufacturing Some parts of the firmware can be updated automatically by the software Other pieces of the firmware require a device upgrade utility In those cases the Beagle software automatically detects firmware compatibility and will inform the user if an upgrade is required 5 2 Procedure Firmware upgrades should be conducted using the procedure specified in the README txt that accompanies the particular firmware revision 90 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 6 API Documentation 6 1 Introduction The API documentation describes the Beagle Rosetta C bindings 6 2 General Data Types The following definitions are provided for convenience The Beagle API provides both signed and unsigned data types as well as single and double precision floating point numbers typedef unsigned char u08 typedef unsigned short ul6 typedef unsigned int u32 typedef unsigned long long u64 typedef signed char s08 typedef signed short s16 typedef signed int s32 typedef signed long long s64 typedef float f32 typedef double f64 6 3 Notes on Status Codes Most of the Beagle API functions can return a status or error code back to the caller The complete list of status codes is provided at the end of this chapter All of the error codes
180. r using this utility can be found below Alternatively the Uninstall option found in the driver installer can also be used to remove the driver from the system Note it is critical that all Total Phase devices have been removed from your system before removing the USB drivers Windows XP 1 Select Control Panel Add or Remove Programs 2 Select Total Phase USB Driver and select Change Remove 82 TOTAL PHASE Beagle Protocol Analyzer User Manual 3 Follow the instructions in the uninstaller Windows Vista 7 1 Select Control Panel Uninstall a program 2 Right click on Total Phase USB Driver and select Uninstall Change 3 Follow the instructions in the uninstaller 4 3 Linux USB Driver The Beagle communications layer under Linux does not require a specific kernel driver to operate However the user must ensure independently that the libusb library is installed on the system since the Beagle library is dynamically linked to libusb Most modern Linux distributions use the udev subsystem to help manipulate the permissions of various system devices This is the preferred way to support access to the Beagle analyzer such that the device is accessible by all of the users on the system upon device plug in For legacy systems there are two different ways to access the Beagle analyzer through USB hotplug or by mounting the entire USB filesystem as world writable Both require that proc bus usb is mounted on
181. raffic back to the analysis PC and the processing overhead on the analysis PC A more detailed overview of the hardware filters is available in Section 3 4 5 2 2 5 Current Voltage Monitoring For the Beagle USB 480 Power Protocol Analyzer Standard and Ultimate Editions the USB A and USB B capture inputs are rated 1A continuous current and 0 to 24V The analyzer samples Vgys current voltage measurements every 12 x 216 clock cycles which is approximately every 13 1 ms The maximum current voltage measurement error is 50 mV and 5 mA at 5 V and for current up to 500 mA A more detailed overview of Current Voltage Monitoring is available in Section 3 4 8 Disclaimer When using the Beagle 480 USB Power Protocol Analyzer above the rated current and voltage extreme caution is advised Customers who choose to do so are at their own risk and may cause permanent damage to the analyzer Total Phase is not liable for damages caused by applying current and voltage in excess of the warranted operating range 2 2 6 Vays Trigger The Beagle USB 480 Power Protocol Aanlzyer Ultimate Edition has the additional capability to trigger on a rise or drop in Vays current or voltage The USB A and USB B capture inputs of the analyzer are rated 1A continuous current and 0 to 24V Although the analyzer can be configured to trigger on a current level from 3A to 3A the continuous current should not exceed 1A The voltage trigger level can be configured from 0 to 24
182. re Buffer The Beagle USB 5000 analyzer includes a standard 2 GB memory buffer In the future the amount of memory can be upgraded to 4 GB Not all the memory needs to be used when capturing USB data The amount of memory allocated to capturing data in the Beagle analyzer can be configured to limit the size of the overall capture The memory dedicated to capturing data can be further allocated into pre trigger and post trigger buffers 72 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Infinite Capture Since the Beagle analyzer constantly streams data to the Analysis PC it is possible for the Beagle analyzer to be configured for infinite capture As long as the Beagle analyzer is able to keep up with the USB 3 0 traffic it can theoretically continue capturing data indefinitely The total capture size will eventually be limited by the amount of memory in the Analysis computer 3 3 10 Capture Issues Signal Integrity The Beagle USB 5000 analyzer achieves bit lock and symbol lock with the signal received from the host and device like any other device Bad signals on the USB 3 0 bus can cause problems for the analyzer For this reason it is recommended that high quality short cables are used with large gauge conductors 3 4 Beagle USB 480 Protocol Analyzer Specifics Aside from standard real time capture the Beagle USB 480 analyzer provides a number of other features These features include bus event monitoring digital in
183. re buffer until the user is ready to download it The size of the capture is clearly limited by the hardware buffers max capacity so it is recommended to use the hardware filters to limit data less transactions when appropriate The delayed download capability will especially benefit those users that are analyzing high speed traffic but are only using a single computer with a single host controller for both the analysis computer and the target host computer As described previously devices on the same host controller must share the available bandwidth Also all high speed devices on the same host controller will see all downstream traffic Therefore using delayed download will limit the Beagle analyzer s participation on the bus In fact if no other functions are called between the enable of the capture and the disable there will be nearly no traffic at all between the PC and analyzer The only traffic will be at the very start and end of the capture session The delayed download will stop automatically once the buffer has reached capacity It may also be stopped at any time by the user by calling the bg usb480 read function Polling of the status of the buffer is possible through bg usb480 hw buffer stats function call Polling the Beagle analyzer will create traffic on the bus and thus take up some of the available bandwidth Faster polling rates will clearly take up more bandwidth and thus if users wish to minimize their impact on the bus
184. read Driven by MMD during read increment address The primary change in Clause 45 is how the registers are accessed In Clauses 22 a single frame specified both the address and the data to read or write Clause 45 changes this paradigm First an address frame is sent to specify the MMD and register A second frame is then sent to perform the read or write The benefits of adding this two cycle access are that Clause 45 is backwards compatible with Clause 2 allowing devices to interoperate with each other Secondly by creating a address frame the register address space is increased from 5 bits to 16 bits which allows an STA to access 65 536 different registers In order to accomplish this several changes were made in the composition of the data frame A new ST code 00 is defined to identify Clause 45 data frames The OP codes were expanded to specify an address frame a write frame a read frame or a read and post read increment address frame Since the register address is no longer needed this field is replaced with DEVTYPE to specify the targeted device type The expanded device type allows the STA to access other devices in addition to PHYs Additional details about Clause 45 can be found on the IEEE 802 3 workgroup website 38 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 1 4 5 MDIO References EEE 802 LAN MAN Standards Committee Use The MDIO Bus To Interrogate Complex Devices Electronic Design Magazine 3
185. red method is to connect separate computers to the analysis port and to the target host port of the Beagle analyzer Figure 40 c This puts the analysis end of the Beagle analyzer on a different bus ensuring that its traffic is not seen on the capture side of the analyzer Furthermore the analysis PC can have full resources to process the incoming data and the test PC will not be encumbered by the analysis software Note All of the USB ports on most computers are on a single host controller so connecting to a different USB port is not sufficient Installing a PCI PCI Express or PC Card USB controller card will ensure there is a second USB host controller on the computer If the user is constrained to the scenario illustrated in Figure 40a there are two features of the Beagle USB 480 and Beagle USB 5000 analyzer that help mitigate the dilemmas previously outlined One feature is a hardware filtering option that runs on the Beagle analyzer to filter packets directed to the Beagle analyzer s device address These packets will be filtered out from the capture by the hardware so it will not be sent back through the analysis port This option does not entirely remove the Beagle analyzer s 59 9 TOTAL PHASE Beagle Protocol Analyzer User Manual traffic from the monitored bus but it will definitely minimize the analyzer s effect on the bus since the IN and ACK tokens sent to the analyzer will not again appear in the analysis traffic In
186. requirements of the Beagle analyzer For example the analysis computer may be running other applications or it may have other devices attached to the same bus There are six different hardware filters that can be used independently or in conjunction with one another They must simply be enabled by the user Their functionality is described below SOF Filtering will remove all Start of Frame SOF tokens from the data stream Please note that enabling the SOF filter will forfeit the ability to detect suspend and high speed disconnects conditions on the bus IN Filtering will attempt to remove all IN ACK and IN NAK pairs PING Filtering will attempt to remove all PING NAK pairs PRE Filtering will remove all PRE tokens SPLIT Filtering will attempt to remove many of the data less SPLIT transactions This filter will attempt to discard SSPLIT IN for isochronous and interrupt transfers SSPLIT IN ACK for bulk and control transfers CSPLIT OUT NYET CSPLIT SETUP NYET CSPLIT IN NAK CSPLIT IN NYET Self Filtering will remove all packets intended for devices with the same device address as the Beagle analyzer Due to the architecture of USB when the Beagle analyzer is sniffing the same high speed bus on which it is connected it will see its own traffic on the Capture side for more details refer to Section 1 1 2 1 This filter gives the user the opportunity to remove that traffic out of the reported d
187. s are only available for the Beagle I C SPI MDIO Protocol Analyzer 6 6 2 I C Monitor Interface 12C Pullups bg i2c pullup int bg i2c pullup Beagle beagle u08 pullup flag Enables disables and queries the PC pullup resistors Arguments beagle handle of a Beagle analyzer pullup flag the function to perform as detailed in Table 12 Table 12 Pullup definitions BG I2C PULLUP OFF Disable the pullup resistors BG I2C PULLUP ON Enable the pullup resistors BG I2C PULLUP QUERY Query the status of the pullup resistors Return Value A Beagle status code of BG OK is returned on success If the value passed for pullup flag is BG Il2C PULLUP QUERY the state of the pullups is returned Specific Error Codes BG FUNCTION NOT AVAILABLE The hardware version is not compatible with this feature Only I C devices support switchable pullup pins Details Sets and queries the state of the pullup resistors on the I C lines Normally the pullups will be set by the host and target devices so this function will not be used 113 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Read I7C bg i2c read int bg i2c read Beagle beagle u32 status u64 time sop u64 time duration u32 time dataoffset int max bytes ul6 data in Read packet from the FC port Arguments beagle handle of a Beagle analyzer status filled with the status bitmask as detailed in Tables 11 and 13 time sop filled with the timestamp
188. s compenstates for signals which will travel through a long transmission line Please see below for more details on these struct elements e pre emphasis short level value may be between 0 and 15 corresponding to a pre emphasis long level range of 0 dB to 6 dB pre emphasis short decay value may be between 0 and 7 corresponding to a pre emphasis decay range of 500 ps to 1500 ps e pre emphasis long level value may be between 0 and 15 corresponding to a pre emphasis long level range of 0 dB to 6 dB pre emphasis long decay value may be between 0 and 7 corresponding to a pre emphasis decay range of 500 ps to 1500 ps The output level of the SuperSpeed signals can be configured to have a differential peak to peak voltage between 405 mV to 990 mV by setting output leveltoa value between 2 low and 13 high 176 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The sum of output level and all the pre emphasis settings may not exceed 15 Configure Capture bg usb3 capture buffer config int bg usb3 capture buffer config Beagle beagle u32 pretrig kb u32 capture kb Configure USB 3 0 hardware capture buffer Arguments beagle handle of a Beagle analyzer pretrig kb amount in kB of pre trigger data to capture capture kb total amount in kB of data to capture Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG CONFIG ERROR An attempt was made to set an in
189. s enabled they just wont be applied until the complex match system is disabled Timer Match Units The BeagleUsb2TimerMatchUnit should be used to create a timer match unit Timer match unit configuration struct BeagleUsb2TimerMatchUnit BeagleUsbTimerUnit timer unit u32 timer val u08 action mask u08 goto selector The BeagleUsbTimerUnit enumerated type is used to define the unit of time for the timer val field The different enumerated types are described in Table 67 162 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The validity of timer val depends on the selected units The timer must be at least 16 ns and at most 71 sec Asynchronous Event Match Units The BeagleUsb2AsyncEventMatchUnit should be used to create an asynchronous event match unit Async match unit configuration struct BeagleUsb2AsyncEventMatchUnit BeagleUsb2AsyncEventType event type u08 edge mask ul6 repeat_count u08 sticky_action u08 action_mask u08 goto selector BeagleUsb2VbusTriggerType vbus trigger type 132 vbus trigger val The BeagleUsb2AsyncEventType enumerated type is used to define the event type to match on The different enumerated types are listed below Restrictions on edge mask are based on the selected event type and are indicated by footnotes e BG USB2 COMPLEX MATCH EVENT DIGIN1 e BG USB2 COMPLEX MATCH EVENT DIGIN2 e BG USB2 COMPLEX MATCH EVENT DIGIN3 e BG USB2 COMPLEX MATCH EVENT DIG
190. s large as max timing Read SPI with bit level timing bg spi read bit timing int bg spi read bit timing Beagle beagle u32 status u64 time_sop u64 time duration u32 time dataoffset int mosi max bytes u08 data mosi int miso max bytes u08 data miso int max timing u32 bit timing Read data from the SPI port Arguments common args see bg spi read for common arguments max timing size of bit timing array bit timing an allocated array of u32 which is filled with the timing data for each bit read Return Value This function returns the number of bytes read or a negative value indicating an error Specific Error Codes None Details This function is an extension of the bg spi read function with the added feature of bit level timing All of the bg spi read arguments and details apply 121 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The values in the bit timing array give the offset of each bit from time sop The bit timing array should be allocated at least as large as max timing Use the function bg bit timing size in Section 6 4 3 4 to determine how large an array to allocate for b t timing 6 8 USB API 6 8 1 Notes 1 All USB functions can be used with any Beagle USB analyzer but an error code will be returned if the analyzer s hardware does not support the required functionality 2 The following functionality is not supported for the Beagle USB 12 an
191. s made to enable an unlicensed or unsupported feature Details Only the Beagle USB 5000 SuperSpeed Protocol Analyzers support USB 3 0 captures Only Beagle 5000 units with the option A upgrade are capable of performing simultaneous USB 2 0 and USB 3 0 captures Only analyzers with on board triggering capability support triggering on match event The default trigger mode is trigger immediate for all Beagle USB abalyzers When called with the Beagle USB 12 or the Beagle USB 480 analyzer the only acceptable values are cap mask BG USB CAPTURE USB2 and trigger mode BG USB TRIGGER MODE IMMEDIATE since these devices only have USB 2 0 capture capability and do not have on board triggering In fact it is not necessary to call this function for either the Beagle 12 or 480 since these settings are default upon opening the analyzer with bg open BG USB CAPTURE IV MON LITE is currently supported by the Beagle USB 480 Power Protocol Analyzer only and it must be specified in conjunction with BG USB CAPTURE USB2 The bitmask will enable the monitoring and delivery of V gus Current and voltage measurements in the USB2 data stream See bg usb read in Section 6 8 3 6 for more details Configure USB Target Power bg usb target power int bg usb target power Beagle beagle BeagleUsbTargetPower power flag Control Vays provided to target device 133 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Arguments beagle handle of a B
192. s point the data received will be of the forced polarity and cannot be changed in the software Once the handle to the Beagle analyzer is closed the state of the polarity detection system will revert to the default setting of auto detect Even when the polarity is manually controlled the analyzer will still track what it believes to be the correct polarity Reverting the polarity setting to auto detect will cause the polarity on the analyzer to be set to this auto detected configuration Furthermore the polarity detection system is running even when a capture is not active This ensures that the analyzer is always up to date with the current requirements of the devices even when these settings change outside of the scope of an active capture 62 9 TOTAL PHASE Beagle Protocol Analyzer User Manual It is important to note that the Beagle analyzer is detecting the polarity on the tapped signal and does not in any way influence or modify the signal sent between the transmitter and receiver By manually changing the polarity of the lines the analyzer is simply changing its perception of the tapped signal and is not modifying the data sent between the transmitter and receiver 3 3 4 Data Scrambling Detection Data scrambling is used to minimize interference on the data lines When data scrambling is enabled nearly all symbols from the transmitter are scrambled before they are 8b 10b encoded The receiver must then decode the 8b 10b and descr
193. s that are not explicitly set in the out enable mask input The out polarity mask input configures the polarity of the output Like out enable mask this bitmask allows the user to configure multiple pins through a bit wise OR operation The default configuration is active low If a pin is attempted to be configured as both active low and active high then it will only actually configure to active high Digital output lines will activate as soon as their triggering event is fully confirmed 148 TOTAL PHASE Beagle Protocol Analyzer User Manual Match Digital Output bg usb2 digital out match int bg usb2 digital out match Beagle beagle BeagleUsb2DigitalOutMatchPins pin num BeagleUsb2PacketMatch packet match BeagleUsb2DataMatch data match Enable Beagle analyzer to output match on a particular bus data for USB 2 0 Arguments beagle handle of a Beagle analyzer pin num output pins to be enabled as detailed in Table 41 packet match USB packet header information and Boolean operations that the Beagle analyzer can match packet headers with data match USB packet data and Boolean operations that the Beagle USB analyzer can match incoming packet data with Return Value A Beagle status code of BG OK is returned on success or an error code as detailed in Table 74 Specific Error Codes BG STILL ACTIVE An attempt was made to change the configuration while the capture was still active BG CONFIG ERROR An a
194. sb2ComplexMatchState state 0 BeagleUsb2ComplexMatchState state 1 BeagleUsb2ComplexMatchState state 2 155 TOTAL PHASE Beagle Protocol Analyzer User Manual BeagleUsb2ComplexMatchState BeagleUsb2ComplexMatchState BeagleUsb2ComplexMatchState BeagleUsb2ComplexMatchState BeagleUsb2ComplexMatchState state 3 state 4 state 5 state 6 state 7 Configure the USB 2 0 complex matching system for triggering validate a configuration state without actually programming enable EXTOUT assertion through digital output pin 1 on Arguments beagle handle of a Beagle analyzer validate the Beagle analyzer digout complex match state N Return Value data timer and async match units corresponding to state N use null value for empty states This function returns BG OK or a negative value indicating an error Specific Error Codes See Section 6 8 5 9 Identical error codes are used Details This function is used to configure the USB 2 0 complex matching system This function is supported only for analyzers with on board triggering capability and licensed for USB 2 0 Complex triggering The BeagleUsb2ComplexMatchState fields should be used to form a valid complex matching state machine The default state state 0 is the entry point of the state machine Complex match state configuration struct BeagleUsb2ComplexMatchState u08 BeagleUsb2DataMatchUnit u08 BeagleUsb2DataMatchUnit 08 BeagleUsb
195. set the total capture size and how much pre trigger data will be captured These functions are supported only for analyzers with on board triggering capability Error code of BG FUNCTION NOT AVAILABLE will indicate that the current analyzer does not have this capability 5 Call bg usb configure to configure the capture settings The input arguments determine if a USB 2 0 USB 3 0 or a simultaneous capture is to be performed This function is also used to set how the capture will be triggered by an event or immediately Event triggers are supported only for analyzers with on board triggering capability and only the Beagle USB 5000 SuperSpeed Protocol Analyzers support USB 3 0 and simultaneous captures It is not necessary to call this function for either the Beagle 12 or 480 since the only supported settings are default upon opening the analyzer with bg open 6 Call one or more of the following functions to setup the capture trigger for analyzers with on board triggering capability bg usb2 simple match config trigger on GPIO input or USB 2 0 event setin bg usb2 digital out match bg usb2 complex match config enable trigger on USB 2 0 complex match bg usb3 simple match config trigger on simple USB 3 0 match event bg usb3 complex match config enable trigger on USB 3 0 complex match It is not necessary to call any of these functions if the capture has been set to trigger immediately in bg usb configure 7 Call b
196. sis computer 2 Obtain a Beagle handle by calling bg open on the appropriate port number All other software operations are based on this Beagle handle 3 Configure the Beagle analyzer as necessary The API documentation provides complete details about the different configurations 4 Start the capture by calling the bg enable function 5 Retrieve monitored data by using the read functions that are appropriate for the monitored bus type There are different functions available for retrieving additional data such as byte and bit level timing 6 End the capture by calling the bg disable function At this point the capture is stopped and no new data can be obtained 7 Close the Beagle handle with the bg close function 60 9 TOTAL PHASE Beagle Protocol Analyzer User Manual If the Beagle analyzer is disabled and then re enabled it does not need to be re configured However upon closing the handle all configuration settings will be lost Example code is available for download from the Total Phase website These examples demonstrate how to perform the steps outline above for each of the serial bus protocols supported 3 3 Beagle USB 5000 Protocol Analyzer Specifics 3 3 1 Heat Dissipation Power is provided to the Beagle USB 5000 Protocol Analyzer by an external AC adapter During its operation it is normal for the Beagle analyzer to become warm to the touch To help dissipate heat the analyzer includes an interna
197. situations where the maximum bandwidth is required by the target device avoid using this option The second feature is the ability to perform a delayed download capture In this capture mode the capture data is not streamed out of the analysis port of the Beagle analyzer until after the analyzer has stopped monitoring the bus This greatly reduces the amount of USB traffic going to the Beagle analyzer while the capture is active These features are mentioned later in this section where appropriate 3 1 2 Beagle I C SPI MDIO Protocol Analyzer The Beagle I C SPI MDIO analyzer uses a standard USB cable to connect the protocol analyzer to the analysis computer The data line s clock and ground of the communication protocol in question must be properly connected to the Beagle analyzer s data line s clock and ground respectively 3 2 Software Operational Overview There are a series of steps required for a successful capture These steps are handled by the Beagle Data Center software automatically but must be explicitly followed by an application programmer wishing to write custom software The application programmer interface API is documented extensively in Section 6 but the following is meant to provide a high level overview of the operation of the Beagle analyzers 1 Determine the port number of the Beagle analyzer The function bg find devices returns a list of port numbers for all Beagle analyzers that are attached to the analy
198. sts the directory in which beagle h is located if the two files are not placed in the same directory 3 Place the Beagle DLL included with the API software package in the same directory as the application executable or in another directory such that it will be found by the previously described search rules 87 TOTAL PHASE Beagle Protocol Analyzer User Manual 4 7 2 Versioning Since a new Beagle DLL can be made available to an already compiled application it is essential to ensure the compatibility of the Rosetta binding used by the application e g beagle c against the DLL loaded by the system A system similar to the one employed for the DLL Firmware cross validation is used for the binding and DLL compatibility check Here is an example DLL v1 20 compatible with Binding gt v1 10 Binding v1 15 compatible with DLL gt v1 15 The above situation will pass the appropriate version checks The compatibility check is performed within the binding If there is a version mismatch the API function will return an error code BG INCOMPATIBLE LIBRARY 4 7 3 Customizations While provided language bindings stubs are fully functional it is possible to modify the code found within this file according to specific requirements imposed by the application designer For example in the C bindings one can modify the DLL search and loading behavior to conform to a specific paradigm See the comments in beagle c for more details
199. t be active even if there is USB 2 0 traffic on the bus Please note that unlike the Beagle USB 480 analyzer the LED will not be illuminated if there is no USB 2 0 activity Capture The Capture LED indicator will be illuminated when a capture is active Once the capture has ended the Capture indicator will continue to blink while data is being transferred to the Analysis computer The Capture LED will turn off once the data transfer is complete Trigger The Trigger LED indicator will be illuminated once the trigger occurs The indicator will remain active until all the data has been downloaded to the Analysis PC External Inputs and Outputs The Beagle USB 5000 analyzer features two separate sets of external inputs and outputs USB 3 0 Input and Output The USB 3 0 input and output are the two SMA connectors located on the front panels Both the input and the output have an impedance of 50 ohms and are rated for 1 8 V 12 mA WARNING The USB 3 0 Digital Input and Output are only rated for 1 8 V The USB 3 0 input and output of the Beagle USB 5000 analyzer have been optimized for maximum edge performance at 125 MHz Applying signals with higher voltage will damage your analyzer and is not covered by the warranty The external USB 3 0 input has a latency of 0 to 25 ns from when the input is asserted to when the analyzer detects the assertion This input can be used as an external capture trigger or as a way to synchronize USB 3 0
200. t be configured with current voltage monitoring enabled by calling bg usb configure with BG USB CAPTURE USB2 BG USB CAPTURE IV MON LITE Only a single threshold voltage or current is supported BG COMPLEX CONFIG ERROR NO MULTI VBUS TRIGGERS will be returned if the API is called with multiple states containing different Vays trigger types or thresholds For a rising edge trigger Vays voltage or current the specified threshold must be at or above the initial condition If this is not the case a multi state trigger can be used The first state is to set a falling edge trigger followed by a rising edge trigger both at the desired threshold Match Actions For a description of the actions available for match units see Table 68 for more details 164 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Configure Matching bg usb2 complex match config single int bg usb2 complex match config single Beagle beagle u08 validate u08 digout BeagleUsb2ComplexMatchState state Configure the USB 2 0 complex matching system for triggering Arguments beagle handle of a Beagle analyzer validate validate a configuration state without actually programming the Beagle analyzer digout enable EXTOUT assertion through digital output pin 1 on complex match state data timer and async match units corresponding to the initial state Details Same as bg usb2 complex match config except that only one state can be provided This is a
201. t is possible to power a downstream target such as an lC or SPI EEPROM with the Beagle analyzer s power which is provided by the analysis PC s USB port It is ideal if the downstream device does not consume more than 20 30 mA The Beagle analyzer is compatible with USB hubs as well as USB host controllers Bus powered USB hubs are technically only rated to provide 100 mA per USB device If the Beagle analyzer is directly plugged into a USB host controller or a self powered USB hub it can theoretically draw up to 500 mA total leaving approximately 375 mA for any downstream 55 TOTAL PHASE Beagle Protocol Analyzer User Manual target However the Beagle analyzer always reports itself to the host as a low power device Therefore drawing large amounts of current from the host is not advisable 2 4 2 Signal Specifications Power Consumption Speed The Beagle I C SPI MDIO is capable of monitoring 1 C bus bit rates of up to 4 MHz SPI bit rates of up to 24 MHz and MDIO bit rates of up to 2 5 MHz Both IC and MDIO monitoring can sustain their respective maximum speeds however SPI monitoring at the maximum bit rate may not be possible for sustained traffic The exact limitations of SPI monitoring are dependent on the target bus conditions and the CPU of the host PC For example the worst case situation is a sustained sequence of short SPI packets at the maximum bus bit rate of 24 MHz It is important to note that in order to properly
202. t map Specific Error Codes None Details None Get Port bg port int bg port Beagle beagle Return the port number for this Beagle handle Arguments beagle handle of a Beagle analyzer 98 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Return Value The port number corresponding to the given handle is returned It is a zero based number Specific Error Codes None Details None Get Unique ID bg unique id u32 bg unique id Beagle beagle Return the unique ID of the given Beagle analyzer Arguments beagle handle of a Beagle analyzer Return Value This function returns the unique ID for this Beagle analyzer The IDs are guaranteed to be non zero if valid The ID is the unsigned integer representation of the 10 digit serial number Specific Error Codes None Details None Status String bg status string const char bg status string int status Return the status string for the given status code Arguments status status code returned by a Beagle API function Return Value 99 9 TOTAL PHASE Beagle Protocol Analyzer User Manual This function returns a human readable string that corresponds to status If the code is not valid it returns a NULL string Specific Error Codes None Details None Version bg version int bg version Beagle beagle BeagleVersion version Return the version matrix for the device attached to the given handle Arguments beagl
203. ta Property BG USB2 MATCH MODIFIER 3 PID amp Pattern amp Data Property Resource Limitations 161 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Due to internal optimizations and constraints certain resource limitations apply to data match units The total data memory space shared across all states available is 4096 bytes The maximum allowable length of any data array in a single data match unit is 1024 bytes In addition some features of the complex match action system are multiplexed with the simple mode features These resource limitations affect the following items Output Pin 1 Output Pin 4 pattern matching When the complex match system is enabled it will override the Output Pin 1 setting as configured in the usb2 digital out functions Instead the configuration as defined by the bg usb2 extout config and bg usb2 complex match config functions are used Any assertions of the external output by the match action system are done through Output Pin 1 When the complex match system is enabled it will disable the ability for Output Pin 4 to match on specific patterns It will still have the ability to match on PID device and endpoints including the ability to match on various DATA PID types If the complex match system is disabled these features will automatically revert to the latest simple mode configured option Note that simple mode configurations can be updated even when the complex match system i
204. tailed in Table 39 out polarity mask bitmask of polarity on outputs pins as detailed in Table 40 Table 39 Digital Output Pin Enable bit mask BG USB2 DIGITAL OUT ENABLE PIN1 Enables Output Pin 1 BG USB2 DIGITAL OUT ENABLE PIN2 Enables Output Pin 2 BG USB2 DIGITAL OUT ENABLE PIN3 Enables Output Pin 3 BG USB2 DIGITAL OUT ENABLE PIN4 Enables Output Pin 4 Table 40 Digital Output Pin Polarity bit mask 147 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG USB2 DIGITAL OUT PIN3 ACTIVE LOW Output Pin 3 idles high BG USB2 DIGITAL OUT PIN4 ACTIVE HIGH Output Pin 4 idles low BG USB2 DIGITAL OUT PIN4 ACTIVE LOW Output Pin 4 idles high Return Value BG USB2 DIGITAL OUT PIN3 ACTIVE HIGH Output Pin 3 idles low A Beagle status code of BG OK is returned on success or an error code as detailed in Table 74 Specific Error Codes BG CONFIG ERROR An attempt was made to set an invalid configuration BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is not supported for the Beagle USB 12 Protocol Analyzers Pins are triggered by particular events which are detailed in Section 3 4 4 Please refer to Section 3 4 4 for the hardware specifications of the output pins The out enable mask input is a bitmask of the parameters listed in Table 39 By using a bit wise OR operation multiple output pins can be enabled It is important to note that calling this function will disable all pin
205. te slave select signal SS This means that as devices are added the circuit increases in complexity Three signals are shared by all devices on the SPI bus SCLK MOSI and MISO SCLK is generated by the master device and is used for synchronization MOSI and MISO are the data lines The direction of transfer is indicated by their names Data is always transferred in both directions in SPI but an SPI device interested in only transmitting data can choose to ignore the receive bytes Likewise a device only interested in the incoming bytes can transmit dummy bytes Each device has its own SS line The master pulls low on a slave s SS line to select a device for communication The exchange itself has no pre defined protocol This makes it ideal for data streaming applications Data can be transferred at high speed often into the range of the tens of 34 9 TOTAL PHASE Beagle Protocol Analyzer User Manual megahertz The flipside is that there is no acknowledgment no flow control and the master may not even be aware of the slave s presence 1 3 3 SPI Modes Although there is no protocol the master and slave need to agree about the data frame for the exchange The data frame is described by two parameters clock polarity CPOL and clock phase CPHA Both parameters have two states which results in four possible combinations These combinations are shown in Figure 26 Clock Phase CPHA CPHA 0 CPHA 1 POMON KIMO 0 CPOL
206. the read functions It is important to keep in mind that there is a fixed cost to processing each individual buffer that is independent of buffer size Therefore the trade off is that using a small latency will increase the overhead per byte buffered A large latency setting decreases that overhead but increases the amount of time that the library must wait for each buffer to fill before the library can process their contents This setting is distinctly different than the timeout setting The latency time should be set to a value shorter than the timeout time Timeout Value bg timeout int bg timeout Beagle beagle u32 milliseconds Set the read timeout to the specified number of milliseconds Arguments beagle handle of a Beagle analyzer milliseconds new timeout value in milliseconds Return Value A Beagle status code is returned with BG OK on success Specific Error Codes 101 9 TOTAL PHASE Beagle Protocol Analyzer User Manual None Details Set the idle timeout to the specified number of milliseconds This function sets the amount of time that the read functions will wait before returning if the bus is idle If a read function is called and there has been no new data on the bus for the specified timeout interval the function will return with the BG READ TIMEOUT flag of the status value set and the return value will indicate the number of bytes of data that the Beagle analyzer was able to capture prior to the timeout
207. the system which is the case on most standard distributions 4 3 1 UDEV Support for udev requires a single configuration file that is available on the software CD and also listed on the Total Phase website for download This file is 99 totalphase rules Please follow the following steps to enable the appropriate permissions for the Beagle analyzer 1 As superuser unpack 99 totalphase rules to etc udev rules d 2 chmod 644 etc udev rules d 99 totalphase rules 3 Unplug and replug your Beagle analyzer s 4 3 2 USB Hotplug USB hotplug requires two configuration files which are available on the software CD and also listed on the Total Phase website for download These files are beagle and beagle usermap Please follow the following steps to enable hotplugging 1 As superuser unpack beagle and beagle usermap to etc hotplug usb 83 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 2 chmod 755 etc hotplug usb beagle 3 chmod 644 etc hotplug usb beagle usermap 4 Unplug and replug your Beagle analyzer s 5 Set the environment variable USB DEVFS PATH to proc bus usb 4 3 3 World Writable USB Filesystem Finally here is a last ditch method for configuring your Linux system in the event that your distribution does not have udev or hotplug capabilities The following procedure is not necessary if you were able to exercise the steps in the previous subsections Often the proc bus usb directory is mounted with read writ
208. tmask as detailed in Table 11 filled with the timestamp when the frame preamble begins filled with the number of ticks that from time sop to the last bit of the MDIO frame filled with the number of ticks from time sop until the end of the preamble a pointer to a u32 value which is filled with the received MDIO data This function returns the number of bytes read or a negative value indicating an error Specific Error Codes None Details The function will block until a complete frame is captured or the bus is idle for longer than the timeout interval set See Section 6 4 1 12 for information on the bg latency and bg timeout functions which affect the behavior of this function All of the timing data is measured in ticks of the sample clock Read MDIO with bit level timing bg mdio read bit timing int bg mdio read bit timing Beagle beagle Read data from the MDIO port Arguments u32 status u64 time sop u64 time duration u32 time dataoffset u32 data in int max timing u32 bit timing 198 TOTAL PHASE Beagle Protocol Analyzer User Manual common args see bg mdio read for common arguments max timing size of b t timing array bit timing an allocated array of u32 which is filled with the timing data for each bit read Return Value This function returns the number of bytes read or a negative value indicating an error Specific Error Codes None Details Th
209. to detect It is also possible to manually turn data scrambling on or off for each of the analyzed streams The manual control of the scrambler can be especially useful in situations of bad signal integrity When poor signals are on the bus it is possible for the scrambling control bit of the TS1 or TS2 to be corrupted and thus unintentionally mis inform the receiver of the true scrambling mode In the worst case this corruption occurs on the final TS2 transmitted and puts the analyzer in a bad state for all subsequent data By forcing the scrambling mode users can test and correct for this rare but possible error When the data scrambling is manually controlled the analyzer will force the desired setting in the hardware At this point the data received will be descrambled according to the forced setting and cannot be changed in the software Once the handle to the Beagle 63 9 TOTAL PHASE Beagle Protocol Analyzer User Manual analyzer is closed the state of the scrambling system will revert to the default setting of auto detect Even when the scrambling is manually controlled the analyzer will still track what it believes to be the proper scrambling mode as well as the proper state of the LFSR Reverting the scrambling setting to auto detect will cause the scrambling on the analyzer to be set to this auto detected configuration Furthermore the data scrambling system is running even when a capture is not active This ensures th
210. to modify the receiver equalization settings though often this is not necessary On the transmitter side users are able to adjust the signal level of the output By configuring the levels sent by the transmitter it is possible to test the sensitivity of the receiver of the USB 3 0 device The characteristics of the transmitter can also be modified by changing the output pre emphasis 2 1 5 Signal Specifications and Power Consumption Speed The Beagle USB 5000 Protocol Analyzer supports capture of all wired USB speeds The analyzer has automatic speed detection as well as manual speed locking ESD Protection The Beagle analyzer has built in electrostatic discharge protection to prevent damage to the unit from high voltage static electricity Power consumption When the Beagle analyzer is connected it consumes a maximum of approximately 2 5 mA from the capture host 2 2 Beagle USB 480 Protocol Analyzer The Beagle USB 480 series of protocol analyzers consist of the following Beagle USB 480 Protocol Analyzer Beagle USB 480 Power Protocol Analyzer Standard Edition Beagle USB 480 Power Protocol Analyzer Ultimate Edition 45 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Beagle USB 480 Power Protocol Analyzers feature larger on board memory buffers and Vgus Current Voltage Monitoring The Ultimate Edition includes Advanced USB 2 0 Match Action Triggers and Filters All Beagle USB 480 Protocol Analyzers have identi
211. token is now incorporated in the data packet In the case of INs the token is replaced by a handshake There are also a number of significant changes in the USB 3 0 protocol layer to improve the efficiency of data transfers Unicast Communications Packets are no longer broadcast on the USB bus to allow for lower power states In USB 2 0 packets are broadcast consequently every device must decode the packet to determine if it needs to respond In USB 3 0 packets are unicast meaning that packets are sent on a directed path between the host and device as specified by routing information in the packet There is one exception Isochronous Timestamp Packets ITP are broadcast on the bus and provide timing information to all devices in lieu of Start of Frame packets See Figure 20 for more information about ITP packets Asynchronous Notifications Device polling has been eliminated in USB 3 0 to reduce bus overhead and allow for lower power states When data is requested from a device and it is not able to respond it can send a Not Ready packet NRDY When the device has freed its resources and can service the data request it issues an Endpoint Ready packet ERDY informing the host that it can send another request for data Data Streaming 15 9 TOTAL PHASE Beagle Protocol Analyzer User Manual To improve data transfer performance USB 3 0 introduces streams for bulk transfer endpoints Streams are a protocol supported method of
212. traffic with external logic It is possible to capture a 125 MHz signal pulse with the external input however if these events are too 42 9 TOTAL PHASE Beagle Protocol Analyzer User Manual frequent the analyzer will throttle the external input signal in order to maintain capture fidelity The USB 3 0 external output allows users to output USB 3 0 events to external devices such as a oscilloscope or logic analyzer The output has a short latency of 50 to 75 ns from when an event occurs to when the output is asserted on the external output SMA connector Please see Section 3 3 5 for more information about External Output behavior USB 2 0 Inputs and Outputs The USB 2 0 External Inputs and Outputs are available through the Mini DIN9 port The output level is 3 V and the input is 3 3 V tolerant The pin out and functionality of this connector is the same as the Beagle USB 480 analyzer which is described in Section 2 2 1 WARNING The USB 2 0 Inputs and Outputs are only rated for 3 3 V Applying signals with higher voltage will damage your analyzer and is not covered by the warranty 2 1 2 Back Panel The back panel Figure 30 of the Beagle USB 5000 Protocol Analyzer provides the power connector and downlink connector to the Analysis PC 12V 2A CE E ON ANALYSIS P On Off Power Switch DC Power Cross Analyzer Sync Ports Analysis Port Figure 30 Beagle USB 5000 SuperSpeed Protocol Analyzer v2 Back Analysis The A
213. ttached Because high speed devices must initially operate at full speed when first connected they must pull the D line high to identify as a full speed device The host will then issue a reset on the bus and wait to see if the device responds with a Chirp K which identifies the device as being high speed capable If the host does not receive a Chirp K it quits the high speed handshake sequence and continues with normal full speed operation However if the host receives a Chirp K it responds to the device with alternating pairs of Chirp K s and Chirp J s to tell the device that the host is high speed capable Upon recognizing these alternating pairs the device switches to high speed operation and disconnects its pull up resistor on the D line The high speed connection is now established and both the host and the device begin communicating at high speed See the USB specification for more details on the high speed handshake To accommodate high speed data rates and avoid transceiver confusion the signaling levels of high speed communication is much lower than that of full and low speed devices Full and low speed devices operate with a logical high level of 3 3 V on the D and D lines For high speed operation signaling levels on the D and D lines are reduced to 400 mV Because the high speed signaling levels are so low full and low speed transceivers are not capable of seeing high speed traffic To accommodate the high speed signaling l
214. ttempt was made to set an invalid configuration BG FUNCTION NOT AVAILABLE Function not supported by device Details This function is not supported for the Beagle USB 12 Protocol Analyzers The function is used to configure the output pins of the digital I O port to trigger on specific events This function should be called repeatedly for each pin that must be configured Output pins 1 and 2 do not use the packet match and data match inputs as they do not require that extra information They are therefore completely 149 9 TOTAL PHASE Beagle Protocol Analyzer User Manual configurable from the bg usb2 digital out config function and calling this function on either of those pins will return BG CONFIG ERROR Output pin 3 does not use the data match input because it does not have that functionality A dummy structure or null can be used for the data match argument In either case the argument is ignored The BeagleUsb2PacketMatch and BeagleUsb2DataMatch must be used to correctly configure the matching capabilities of Output Pins 3 and 4 The BeagleUsb2PacketMatch structure describes the packet parameters that need to be matched Table 41 BeagleUsb2DigitalOutMatchPins enumerated values BG USB2 DIGITAL OUT MATCH PIN3 Selects Output Pin 3 BG USB2 DIGITAL OUT MATCH PINA Selects Output Pin 4 Digital ouput matching configuration struct BeagleUsb2PacketMatch BeagleUsb2MatchType pid match type u08 pid match
215. turns BG OK or a negative value indicating an error Specific Error Codes BG FUNCTION NOT AVAILABLE Function not supported by device BG INVALID LICENSE License key was invalid or length was not the proper size Details This function is not supported for the Beagle USB 12 and the Beagle USB 480 Protocol Analyzers Function will only write license string if Length is BG USB LICENSE LENGTH and the license string is valid Configure USB Capture bg usb configure int bg usb configure Beagle beagle u08 capture_mask BeagleUsbTriggerMode trigger mode Configure the capture Arguments beagle handle of a Beagle analyzer capture mask bitmask specifying what kind of capture to perform as shown in Table 27 trigger mode enumerated value specifying how capture is triggered as shown in Table 28 Table 27 Capture Masks BG USB CAPTURE USB2 Capture USB 2 0 traffic BG USB CAPTURE USB3 Capture USB 3 0 traffic BG USB CAPTURE IV MON LITE Capture Vays voltage and current readings Table 28 BeagleUsbT riggerMode enumerated values BG USB TRIGGER MODE EVENT Trigger on match event 132 9 TOTAL PHASE Beagle Protocol Analyzer User Manual BG USB TRIGGER MODE IMMEDIATE Trigger immediately Return Value This function returns BG OK or a negative value indicating an error Specific Error Codes BG CONFIG ERROR An attempt was made to configure the Beagle with invalid settings BG FUNCTION NOT AVAILABLE An attempt wa
216. u32 u32 u64 u64 u32 int u08 X beagle status events time sop time duration time dataoffset max bytes packet Read USB 2 0 data from the USB port Arguments common args seebg usb read for common arguments Return Value This function returns the number of bytes read or a negative value indicating an error Specific Error Codes BG CONFIG ERROR BG FUNCTION NOT AVAILABLE BG CAPTURE NOT TRIGGERED Details USB 3 0 capture is enabled Beagle is not running a capture or function not supported by device Capture has not been triggered yet 168 TOTAL PHASE Beagle Protocol Analyzer User Manual This function is very similar to bg usb read in Section 6 8 3 6 but it will works only with USB 2 0 only captures If it is run with a USB 3 0 enabled capture the function will return an appropriate error code Read USB 2 0 with data level timing bg usb2 read data timing int bg usb2 read data timing Beagle beagle u32 status u32 events u64 time sop u64 time duration u32 time dataoffset int max bytes u08 packet int max timing u32 data timing Read USB 2 0 data from the USB port Arguments common args see bg usb2 read for common arguments max timing size of data timing array data timing an allocated array of u32 which is filled with timing data for each data word read Return Value This function returns the number of bytes read or a ne
217. uential basis The first analyzer is assigned to port 0 the second is assigned to port 1 and so on If a Beagle analyzer is subsequently removed from the system the remaining analyzers shift their port numbers accordingly Hence with n Beagle analyzers attached the allocated ports will be numbered from 0 to n1 4 5 1 Detecting Ports As described in following API documentation chapter the bg find devices routine can be used to determine the mapping between the physical Beagle analyzers and their port numbers 4 6 Beagle Dynamically Linked Library 4 6 1 DLL Philosophy The Beagle DLL provides a robust approach to allow present day Beagle enabled applications to interoperate with future versions of the device interface software without recompilation For example take the case of a graphical application that is written to monitor I C SPI MDIO or USB through a Beagle analyzer At the time the program is built the Beagle software is released as version 1 2 The Beagle interface software may be improved many months later resulting in increased performance and or reliability it is now released as version 1 3 The original application need not be altered or recompiled The user can simply replace the old Beagle DLL with the newer one How does this work The application contains only a stub which in turn dynamically loads the DLL on the first invocation of any Beagle API function If the DLL is replaced the application simply loads the new one
218. und 1 2 1 I C History When connecting multiple devices to a microcontroller the address and data lines of each devices were conventionally connected individually This would take up precious pins on the microcontroller result in a lot of traces on the PCB and require more components to connect everything together This made these systems expensive to produce and susceptible to interference and noise To solve this problem Philips developed Inter IC bus or I C in the 1980s 1 C is a low bandwidth short distance protocol for on board communications All devices are connected through two wires serial data SDA and serial clock SCL SDA SCL 31 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Figure 23 Sample FC Implementation Regardless of how many slave units are attached to the FC bus there are only two signals connected to all of them Consequently there is additional overhead because an addressing mechanism is required for the master device to communicate with a specific slave device Because all commnication takes place on only two wires all devices must have a unique address to identify it on the bus Slave devices have a predefined address but the lower bits of the address can be assigned to allow for multiples of the same devices on the bus 1 2 2 I C Theory of Operation I C has a master slave protocol The master initiates the communication Here is a simplified description of the protocol For pr
219. upted before being passed to the offending API function Finally any API call that communicates with a Beagle analyzer can also return the error BG COMMUNICATION ERROR This means that while the Beagle handle is valid and the communication channel is open there was an error communicating with the device This is possible if the device was unplugged while being used If either the IC SPI MDIO or USB subsystems have been disabled by bg disable all other API functions that interact with IC SPI MDIO and USB will return BG I2C NOT ENABLED BG SPI NOT ENABLED BG MDIO NOT ENABLED or BG USB NOT ENABLED respectively These common status responses are not reiterated for each function Only the error codes that are specific to each API function are described below All of the possible error codes along with their values and status strings are listed following the API documentation 6 4 General 6 4 1 Interface Find Devices bg find devices int bg find devices int num devices ul6 devices Get a list of ports to which Beagle devices are attached Arguments num devices maximum number of devices to return devices array into which the port numbers are returned Return Value This function returns the number of devices found regardless of the array size Specific Error Codes None 92 9 TOTAL PHASE Beagle Protocol Analyzer User Manual Details Each element of the array is written with the port number Dev
220. ure data the sampling rate must be properly set For SPI and MDIO analysis all data lines are registered using the clock line 79 TOTAL PHASE Beagle Protocol Analyzer User Manual of the bus The internal sampling clock is then used to retrieve the data The sampling rate should be set to at least twice the bit rate but preferably faster 4 5 times if possible Higher sampling rates can have the added benefit of increasing timing precision Due to the architecture of I C there are specific bus events that occur between the standard bit times In order to capture these transitions the bus must be oversampled independent of the clock line of the bus A sampling rate of five to ten times the bus bit rate is recommended This should not be a problem however since the minimum sampling rate of the Beagle I C SPI MDIO analyzer is 10 MHz and I C buses usually operate at less than 1 MHz frequencies The one caveat to setting the sampling rate to very high values is that higher sampling rates create more traffic on the analysis USB that connects the analyzer to the host PC This may or may not affect performance depending on the analysis PC configuration 80 9 TOTAL PHASE Beagle Protocol Analyzer User Manual 4 Software 4 1 Compatibility 4 1 1 Overview The Beagle software is offered as a 32 bit or a 64 bit Dynamic Linked Library or shared object The specific compatibility for each operating system is discussed below Be sur
221. val set See Section 6 4 1 12 for information on the bg latency and bg timeout functions which affect the behavior of this function The data mosi array should be allocated at least as large as mosi max bytes The data miso array should be allocated at least as large as miso max bytes All of the timing data is measured in ticks of the sample clock Read SPI with data level timing bg spi read data timing int bg spi read data timing Beagle beagle u32 status u64 time sop u64 time duration u32 time dataoffset int mosi max bytes u08 data mosi int miso max bytes u08 data miso int max timing u32 data timing Read data from the SPI port Arguments common args see bg spi read for common arguments max timing size of data timing array data timing an allocated array of u32 which is filled with timing data for each data word read Return Value This function returns the number of bytes read or a negative value indicating an error Specific Error Codes None Details 120 9 TOTAL PHASE Beagle Protocol Analyzer User Manual This function is an extension of the bg spi read function with the added feature of byte level timing All of the bg spi read arguments and details apply The values in the data timing array give the offset of the start of each data word from time sop For SPI a data word is considered a single byte The data timing array should be allocated at least a
222. valid configuration Details The USB 3 0 hardware buffer is 2 GB for standard units and 4 GB for units with an option B upgrade so capture kb may have a maximum value of 2 097 152 for standard units or 4 194 304 for option B units The size of capture kb includes pretrig kb Attempting to set pretrig kb greater than capture kb will return an error To run an infinite capture set capture kb to BG USB CAPTURE SIZE INFINITE Query Capture Config bg usb3 capture buffer config query int bg usb3 capture buffer config query Beagle beagle u32 pretrig kb u32 capture kb Query the current USB 3 0 hardware capture buffer configuration 177 TOTAL PHASE Beagle Protocol Analyzer User Manual Arguments beagle handle of a Beagle analyzer pretrig kb filled with USB 3 0 pre trigger size capture kb filled with USB 3 0 total capture size Return Value This function returns the size of the USB 3 0 memory as shown in Table 57 Table 57 USB 3 0 memory size constants BG USB3 BUFFER SIZE 2GB 2GB buffer size BG USB3 BUFFER SIZE 4GB 4GB buffer size Specific Error Codes None Details Very similar to bg usb2 capture buffer config query See Section 6 8 4 3 for more details Query Capture Status bg usb3 capture status int bg usb3 capture status Beagle beagle u32 timeout ms BeagleCaptureStatus status u32 pretrig remaining u32 pretrig total u32 capture remaining u32 capture total
223. vice polling and packets are no longer broadcast on the bus It is now possible for devices to enter low power states when idle in USB 3 0 because they no longer have to manage the reception of these packets Low power levels are configurable on the device level and the function level A device can suspend all or some of this functionality when it is idle therefore reducing its power consumption With Latency Tolerance Messaging devices can report their latency tolerance to the host allowing the host system to enter lower power states without negatively affecting the USB devices on the bus USB 3 0 Physical Layer In USB 3 0 the physical layer specifies the electrical characteristics of SuperSpeed USB signals how information is scrambled and encoded and special signal sequences used by other layers Here is a brief overview of some of the new technologies specific to SuperSpeed USB Receiver Termination USB 3 0 receivers terminate the transmission line by placing a small resistor to ground Transmitters will check for this termination resistor on the receiver as a way for detecting the presence of a USB 3 0 receiver Data Scrambling The physical layer uses bit scrambling to reduce electrical interference problems on the lines However it is possible for a transmitter to disable this feature 8b 10b encoding 8b 10b encoding maps 8 bit symbols to 10 bit symbols with the purpose of keeping a low disparity while continuing to have e
224. when dealing with devices that are of different speeds Low speed and high speed devices are isolated from traffic at speeds other then their own They will only see traffic that is at their respective speeds Referring to Figure 2 this means that downstream traffic to device H1 will be seen by device H2 and vice versa Also downstream traffic to device L1 will be seen by L2 and vice versa However full speed devices can see traffic at its own speed as well as low speed traffic using a special signaling mode dubbed low speed over full speed This means that downstream traffic to F1 will be seen by F2 and vice versa with standard full speed signaling and downstream traffic to either L1 or L2 will also be seen by both F1 and F2 through the special low speed over full speed signaling USB 3 0 Specific Architecture USB 3 0 marks a significant change from the existing USB infrastructure and affects the protocol at nearly all levels The major features of USB 3 0 will be covered briefly in this datasheet For detailed information please consult the USB specifications from the USB IF USB 3 0 Physical Interface Due to limitations of the differential signaling of USB 2 0 in order to be able to support 5 Gbps data communications the physical interface has been upgraded In addition to the normal USB 2 0 signals USB 3 0 cables and connectors have two additional pairs of differential signals one pair for transmit and one pair for receive as
225. when the packet begins time duration filled with the number of ticks that it took to read the data time dataoffset filled with the timestamp when data appeared on the bus max bytes maximum number of bytes to read data in an allocated array of u16 which is filled with the received data Table 13 C Specific Read Status definitions BG READ I2C NO STOP The I C stop condition was not observed on the bus This can be caused either by a read timeout or by a I C repeated start condition Return Value This function returns the number of bytes read or a negative value indicating an error Specific Error Codes None Details 114 9 TOTAL PHASE Beagle Protocol Analyzer User Manual The function will block until the requested amount of data is captured a complete packet with a stop or repeated start condition is observed or the bus is idle for longer than the timeout interval set See Section 6 4 1 12 for information on the bg latency and bg timeout functions which affect the behavior of this function For each u16 written to data in by the function the lower 8 bits represent the value of a byte of data sent across the bus and bit 8 represents the ACK or NACK value for that byte A 0 in bit 8 represents an ACK and a 1 in bit 8 represents a NACK See Table 14 for constants that may be used as bit mask to access the appropriate fields in data in All of the timing data is measured in ticks of the sample rate clock
226. with the transmitter Once the link is established the link enters UO and data communications can begin Endpoints and Pipes The endpoint is the fundamental unit of communication in USB All data is transferred through virtual pipes between the host and these endpoints All communication between a USB host and a USB device is addressed to a specific endpoint on the device Each device endpoint is a unidirectional receiver or transmitter of data either specified as a sender or receiver of data from the host A pipe represents a data pathway between the host and the device A pipe may be unidirectional consisting of only one endpoint or bidirectional consisting of two endpoints in opposite directions A special pipe is the Default Control Pipe It consists of both the input and output endpoints O It is required on all devices and must be available immediately after the device is powered The host uses this pipe to identify the device and its endpoints and to configure the device Endpoints are not all the same Endpoints specify their bandwidth requirements and the way that they transfer data There are four transfer types for endpoints Control Non periodic transfers Typically used for device configuration commands and status operation Interrupt This is a transaction that is guaranteed to occur within a certain time interval The device will specify the time interval at which the host should check the device to see if there
Download Pdf Manuals
Related Search
Related Contents
Manuel d`Utilisation & Technique DIESEL SYSTEM TREATMENT Technical Service Manual Installation Manual - E2S Warning Signals Haier T60-32 User's Manual Operation, Maintenance and Service Manual みゆき配水池 加圧ポンプ設備 更新工事 特記仕様書 四日市市上下水道局 [三橋公民館]基準表(PDF形式:38KB) 2 DOF Helicopter Lab Manual Copyright © All rights reserved.
Failed to retrieve file