ECE 471 Embedded Systems Lecture 30

Similar documents
Microprocessors LCD Parallel Port USB Port

David Harrison, Design Engineer for Model Sounds Inc.

More on IO: The Universal Serial Bus (USB)

Course 10: Interfaces Agenda

ECE 471 Embedded Systems Lecture 30

Chapter 11: Input/Output Organisation. Lesson 17: Standard I/O buses USB (Universal Serial Bus) and IEEE1394 FireWire Buses

USB Complete. The Developer's Guide Fifth Edition. Jan Axelson. Lakeview Research LLC Madison, WI 53704

SERIAL BUS COMMUNICATION PROTOCOLS USB

Computer Organization

USB for Embedded Devices. Mohit Maheshwari Prashant Garg

Module Introduction. Purpose This training module covers 68K/ColdFire Ethernet and USB

Computer Organization

USB Framework, IP Core and related software Tropea S.E., Melo R.A.

ADVANCED OPERATING SYSTEMS USB in a microkernel based operating system

Understand USB (in Linux)

4 Multiplexer. Y Fig Keyboard Scan Matrix

Essential Components for Today s Industrial Connections

Serial Communications

ECE 471 Embedded Systems Lecture 20

PDF created with pdffactory Pro trial version How USB Ports Work by Marshall Brain. Introduction to How USB Ports Work

ID 221C: USB for Embedded Systems Viewed from the Embedded Target Side

Signals and Encoding

Serial Communications

USB (Universal Serial Bus) Presentation to UCHUG - 2/06/08 G. Skalka

ARM Cortex core microcontrollers

USB. The Universal Serial Bus. Most of the material is taken from Jan Axelsson: USB Complete, third edition Lakeview Research ISBN:

USB2.0 Type-C & Regular USB Device Electrical Compliance test procedure

USB Compliance Checklist

USB Type-C TM, IEEE CSNV

USB for Embedded Device ASHWINI MISHRA

Compliance test method and detailed spec for - USB2.0. Tektronix Korea YJ.PARK

USB: Features and Circuits Manoj Purohit ( ) Supervisor: Prof P.C.Pandey

ECE 471 Embedded Systems Lecture 22

ECE 598 Advanced Operating Systems Lecture 4

ECE 571 Advanced Microprocessor-Based Design Lecture 3

USB 3.0 Software Architecture and Implementation Issues. Terry Moore, CEO MCCI Corporation

Serial Communication. Simplex Half-Duplex Duplex

ECE 571 Advanced Microprocessor-Based Design Lecture 20

Part 1 - Introduction to USB

4 Independent Port PCI Express PCIe SuperSpeed USB 3.0 Controller Card Adapter with UASP - SATA Power

ECE 571 Advanced Microprocessor-Based Design Lecture 18

Raspberry Pi - I/O Interfaces

USB Compliance Checklist Hubs (Excluding Root Hubs) USB Device Product Information

Displayport, as shown, has 20 pins and can be used for audio, video, or both audio and video transmission.

How to fix Usually Slightly Broken devices and drivers?

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

USB-1208LS Specifications

ECE 471 Embedded Systems Lecture 20

ECE 471 Embedded Systems Lecture 16

Interrupt transfers & USB 2.0 & USB 3.0. Group Members Mehwish Awan Mehwish Kiran

ECE 471 Embedded Systems Lecture 16

Universal Serial Bus - USB 2.0

2 Port ExpressCard SuperSpeed USB 3.0 Card Adapter with UASP Support

Data Communications & Computer Networks. Digital Data Communications Techniques

An Introduction to Universal Serial Bus

This 4-port RS-422/485 Adapter is provided with an external switching power adapter in the package.

USB-COMi-TB USB to Industrial Single RS-422 / 485 Adapter Manual. Specifications and Features

Lattice USB Type-C Solution Design Document

Intel Thunderbolt. James Coddington Ed Mackowiak

Manual MB86R01. JADE Evaluation Board Extension Video Output. Version PA5.1 November 20, 2007

4 Port PCI Express (PCIe) SuperSpeed USB 3.0 Card Adapter w/ 4 Dedicated 5Gbps Channels - UASP - SATA / LP4 Power

4 Port PCI Express (PCIe) SuperSpeed USB 3.0 Card Adapter w/ 2 Dedicated 5Gbps Channels - UASP - SATA / LP4 Power

TA0357. Overview of USB Type-C and Power Delivery technologies. Technical article. Introduction

4 Port PCI Express (PCIe) SuperSpeed USB 3.0 Card Adapter w/ 2 Dedicated 5Gbps Channels - UASP - SATA / LP4 Power

Computer buses and interfaces

Specifications minilab 1008

USB-16COMi-M 16-Port RS-422/485 USB Serial Adapter User Manual. Features and Specifications. Power Supply

4 Port PCI Express (PCIe) SuperSpeed USB 3.0 Card Adapter w/ 4 Dedicated 5Gbps Channels - UASP - SATA / LP4 Power

ECE 471 Embedded Systems Lecture 12

4 Port Quad Bus PCI Express (PCIe) SuperSpeed USB 3.0 Card Adapter with UASP - SATA/LP4 Power

Design Of Linux USB Device Driver For LPC2148 Based Data Acquisition System Including GSM.

Controller IP for a Low Cost FPGA Based USB Device Core

Manual of ET-LCD SW HAT

Designing a USB Keyboard with the Cypress Semiconductor CY7C63413 USB Microcontroller

Bus Example: Pentium II

ECE 598 Advanced Operating Systems Lecture 6

Unbridled Raw Hex,

Greater port count. Greater scalability.

ECE 571 Advanced Microprocessor-Based Design Lecture 21

The PEXUSB3S2 PCI Express USB 3.0 card lets you add two USB 3.0 ports to your PC through a PCI Express slot.

Debugging Usually Slightly Broken Devices and Drivers

ECE 471 Embedded Systems Lecture 12

ARDUINO YÚN MINI Code: A000108

PANDORA HACKER GUIDE

ECE 471 Embedded Systems Lecture 2

XSFP-T-RJ Base-T Copper SFP Transceiver

Greater port count. Greater scalability.

Hardware OS & OS- Application interface

Overview of the Raspberry Pi Models 3B & 2B

STUDY, DESIGN AND SIMULATION OF FPGA BASED USB 2.0 DEVICE CONTROLLER

AN10035_1 Comparing energy efficiency of USB at full-speed and high-speed rates

Module 5. Input/Output Ports

Today s Schedule. USB 2.0 Overview. USB 2.0 Compliance Testing. Demo of the Agilent Solution Q&A

Click-A-Tune. User Manual

PAN3504 USB OPTICAL MOUSE SINGLE CHIP

Embedded Host High Speed Electrical Test Procedure

ARDUINO YÚN Code: A000008

USB to RS-422/485 Serial Adapter

7-Port PCI Express USB 3.0 Card - Standard and Low-Profile Design

USB 2.0 Test Report For Peripheral

Transcription:

ECE 471 Embedded Systems Lecture 30 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 28 November 2018

HW#10 was posted Announcements Feel free to return borrowed hardware. 1

PWM Linux Available on GPIO18 (pin 12) (also GPIO19 on newer) Assuming 4.9 kernel or later (sets up proper clock) just edit config.txt and add dtoverlay=pwm reboot. lsmod should show pwm bcm2835 loaded https://www.kernel.org/doc/documentation/pwm.txt sysfs interface cat /sys/class/pwm/pwmchip0/npwm echo "0" > /sys/class/pwm/pwmchip0/export echo "1000" > /sys/class/pwm/pwmchip0/pwm0/period 2

echo "500" > /sys/class/pwm/pwmchip0/pwm0/duty cycle echo "1" > /sys/class/pwm/pwmchip0/pwm0/enable Feel free to use wiring-pi or similar 3

USB Universal Serial Bus Designed to replace all of the various cables on a PC with one type (keyboard, mouse, printer, serial, SCSI, joystick) How successful was that? Way more complex than most previous interfaces http: //www.usbmadesimple.co.uk/index.html 4

USB 1.0 1996 Low Speed 1.5Mbit/s (keyboard, mouse, etc) Thinner, flexible cable Full Speed 12Mbit/s (disk, USB key) USB 1.1? 5

USB Physical Layer 2-5m cables 4 pins. 5V, GND, D+, D-. Differential signaling (subtract). More resistant to noise. Micro connectors have extra pin for on-the-go (says if A end or B end gnd vs v+) Unit load, 100mA. Can negotiate up to 500mA (2.5W) (more USB 3.0) Up to 127 devices (by using hubs). Up to 6 levels of hubs. Powered vs not. 6

Enumeration, vendor and device Connectors. A/B. Designed so only one end goes to host. Micro, mini. 7

2000 High Speed 480Mbit/s USB 2.0 8

USB More Recent USB 3.0 2008 SuperSpeed 5GBit/s (though hard to hit that) Full Duplex (earlier half duplex) USB 3.1 2014 SuperSpeed+ 10Gbit/s Backwards compatible, has 5 extra pins next to standard micro with GND, SSTX+/- and SSRX+/- (full duplex) USB-C 2014 24-pin: 4 power/ground pairs, two differential nonsuper-speed pairs, four pairs of high-speed data bus, two 9

sideband pins, two pins for cable orientation cables can be USB2, USB3, USB3.1, up to 5A(20V=100W) but 3A more common wrong pullup can cause cable that damages hardware 10

USB 1.1 and 2.0 Signaling Differential signaling, twisted pair, 90Ohm impedance Low+Full = 0V low, 3.3V high, not terminated High = 0V low, 400mV high, terminated with resistor Device Detection Host, 15k pulldown pulls data lines to 0 (nothing connected, SE0) USB device pulls line high with 1.5k which overpowers pulldown. Full bandwidth D+ high, low bandwidth D- high 11

Some chargers use special resistors across D lines to indicate power they can draw. J and K states. NRZI line coding 0 signaled by J to K (switching state). 1 signaled by leaving as is Bit stuffing after six consecutive 1s must include 0 starts with 8 bit synch 00000001 which is KJKJKJKK. Data then sent. End marked by 00J. Reset by 10ms SE0 Highspeed uses chirping to negotiate speeds, during reset chirps J and K 12

Example from Wikipedia CC0: 13

USB 3.0 SuperSpeed, separate lines, but original lines used to config SuperSpeed uses 8b/10b encoding (limits bandwidth), CRC, other features SuperSpeed+ uses 128b/132b encoding 14

Latency For Low and Full shortest transaction time is 1ms. Can this be a problem? Low latency gaming keyboards https://danluu. com/keyboard-latency/ Keyboard latency (scan keys, report keycode) USB latency to system Interrupt latency OS update screen LCD monitors often buffer a few frames 15

Old Apple II (1MHz 8-bit) could go from keypress to screen faster than modern keyboards even finish scanning 16

Various packets sent Huge list of them Checked by CRC USB Protocol Low power suspend mode, no more than 2.5mA Signal sent to all devices on USB bus, all but addressed one ignores 17

Each device has endpoint USB Design isochronous guaranteed data rate but with some potential data loss (video) interrupt low-latency, like keyboards bulk disk access 18

USB Linux Linux drivers Device classes HID, audio, etc. One common driver can handle all devices of a class Specific device driver is board specific and must have a list of all vendor/device IDs that are supported libusb Allow direct userspace access to USB interface Used by low-level things that might not need driver 19

old cameras (not standardized), custom hardware 20

USB on Rasp-pi USB-OTG on the go. Allows device to act like a host (so can hook up devices as per normal) or as normal USB device. Decides which based on whether A or B cable plugged in, check ID pin (micro/mini have 5th pin) The Pi-B does not support running in gadget mode externally (a hub in the way) and the OTG hardware requires more software support than (it is simpler) than regular USB. 21

USB 2.0 (sorta). Cannot supply full power (why? Only 1A power supply typical). Also cannot handle highbandwidth things like audio cards and USB-cameras well. USB-host standard USB port. Cannot provide high current, so use a powered hub if using anything more than keyboard or mouse 22