Preview only show first 10 pages with watermark. For full document please download

Usb Communication Analysis.

   EMBED


Share

Transcript

USB Communication Analysis Within this lab you will analyze communication between the USB device (flash disk) and the host PC. The analysis is provided by the oscilloscope with dedicated firmware used to interpret signals acquired from the bus. For the correct interpretation the minimum oscilloscope sampling frequency is 100 MS/s. Use maximum size (10 MB) of acquisition memory to get maximum length records (Acquire button). Two oscilloscope input probes must be connected to the measuring tool – one to BP and second to BM USB signal wire. Before you start working, acquaint yourself with the USB technology (use either the lecture slides or USB standard, especially chapter 8 – communication protocol and chapter 9 – standard USB requests and descriptors). You can store the oscilloscope screens on your private USB FLASH or to make pictures using camera for the lab report. USB Channel Coding To interpret the physical layer data it is necessary to understand physical layer channel coding. Data stream is first encoded using bit-stuffing (after the 6 consecutive bits of log.1 single log.0 bit is inserted). Then the NRZI encoder (log.0 – change, log.1 – no change) is applied. During the reception the stuffing bit level is checked and then it is removed from the received stream. Measurement tasks 1. Switch on the PC and oscilloscope and check interconnection between the scope and measurement tool. Acquaint yourself with the oscilloscope settings for USB analysis, select the USB bus analysis (B1 button), check the inputs assignment and bus speed setting (full speed). Insert the USB flash and try to capture any USB packet to check the correct configuration. 2. Record and decode StartOfFrame packet. To do it, set the trigger condition to the bus type and try to trigger the scope at StartOfFrame packet type. Decode the packet also manually to the lab report – you will not always have available such a scope! 3. Evaluate the frame number in two consecutive StartOfFrame packets. To find the next packet you can either use the Search button or the table of bus events (setting available after pressing B1 button). 4. Disconnect the USB FLASH. Set the scope to trigger at Setup token with address 0. Start the acquisition (Single button) and connect the USB FLASH. Identify particular control transfers and try to find the transfer used to assign new USB device address. Write this address down to the lab report. 5. Disconnect the USB FLASH again. Set the scope to trigger at Setup token with address observed in previous point (the same address will be assigned after reconnection). Start the acquisition (Single button) and connect the USB FLASH. Try to evaluate all control transfers and to interpret the content of requests from PC and answers from the USB device (Plug&Play enumeration). Go to the next page. Try to find and interpret especially: a. Device descriptor request and answer b. Configuration descriptor request and answer c. Text descriptor request and answer – what languages are supported? To do it use USB packets description either from lecture or from the USB standard (chapter 8 of the USB standard, pages 159 and 160), and tables with standard requests and descriptors (chapter 9 of the USB standard).