Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Embedding USB - The Implementation Challenges and Limitations Micriµm © 2012 Renesas Electronics America Inc. All rights reserved.2 Micriµm Renesas Technology & Solution Portfolio © 2012 Renesas Electronics America Inc. All rights reserved.3 Micriµm Hardware Architecture Mechanical Specifications Electrical Specifications Software Specifications Compliance Final Comments Agenda © 2012 Renesas Electronics America Inc. All rights reserved.4 Micriµm Universal Serial Bus: Serial bus standard to interface devices. Peripheral communication protocol of choice for keyboards, printers, and memories Automatic error detection and recovery. Large number of devices. (127) Replaced RS-232 This document covers USB and differentiate USB Host protocol stack from USB Device protocol stack and On-The- Go. It goes over the design implications and some solutions. USB for Embedded Systems © 2012 Renesas Electronics America Inc. All rights reserved.5 Micriµm USB Products © 2012 Renesas Electronics America Inc. All rights reserved.6 Micriµm 1969 Serial port (RS-232C) 1995 The USB consortium is formed by Compaq, DEC, IBM, Intel, Microsoft, NEC and Nortel. 1996 USB 1.0 standard was released. Plug Fest 1999 USB 1.1 was released. Corrected bugs 2000 USB 2.0 was released specifying the implementation of a 480 Mbps bus 2001 USB On-The-Go (OTG) supplement was added which allowed devices to talk to each other 2005 Wireless USB standard was released which is a point to point wireless communications link 2008 USB 3.0 delivers over 10 times the speed of USB 2.0 Brief History © 2012 Renesas Electronics America Inc. All rights reserved.7 Micriµm USB 2.0 Star network configuration Only one host Maximum of seven levels of tiers, hub at center Host and hubs provide power to slaves Maximum of 5m per cable Maximum of 127 devices (hubs included) Host schedules and initiates data transfers Devices implements one or more functions Architecture Topology USB Speed Low Speed Full Speed High Speed Speed 1.5 Mbits/sec 12 Mbits/sec 480 Mbits/sec USB 1.1 © 2012 Renesas Electronics America Inc. All rights reserved.8 Micriµm USB 1.1 OHCI – Compaq, Microsoft, and National; hardware burden UHCI – Intel, software burden USB 2.0 EHCI – USB with Intel, simplified software and reduced cost USB 3.0 SuperSpeed - Hewlett-Packard, Intel, Microsoft, NEC, NXP Semiconductors and Texas Instruments November 17, 2008 The first certified USB 3.0 consumer products were announced January 5, 2010 Host Controllers © 2012 Renesas Electronics America Inc. All rights reserved.9 Micriµm Device A device is a logical or physical entity that performs one of more functions. Composite device A composite device has one address but multiple interfaces or association of interfaces each providing a function (i.e. a multi- function printer, scanner, fax, copier) Compound device A compound device contains a hub with one or more permanently attached devices. A host treats the hub and its functions as if they were separate physical devices. Device © 2012 Renesas Electronics America Inc. All rights reserved.10 Micriµm Compound Device Host Root Hub Device Device Device Device Device Device Device Hub Hub Root Hub (RH) = embedded hub part of the Host Provides 1 or more attachment points (i.e. ports) Equivalent to external Hub – Presents standard hub functions – Presents standard states as other USB devices Host and Root Hub Responsible for: Device connection/disconnection Device reset Port power [...]... that there are 2 data lines, many different conditions are signaled using them: Bus State Levels Differential '1' D+ high, D- low Differential '0' D- high, D+ low Single Ended Zero (SE0) D+ and D- low Single Ended One (SE1) D+ and D- high Data J State: Low-speed Full-speed Data K State: Low-speed Full-speed Idle State: Low-speed Full-speed Resume State Start of Packet (SOP) End of Packet (EOP) D- high,... modes to the USB specification Powered USB (aka Retail USB, USB Plus Power, and USB + Power) +5 volts DC at up to 6 amps per connector (up to 30 watts) +12 volts DC at up to 6 amps per connector (up to 72 watts) +24 volts DC at up to 6 amps per connector (up to 144 watts) Powered USB uses standard USB signaling with the addition of extra power lines for point-of-sale terminals IBM owns the intellectual... Device Detection USB Cable Vbus Current Limiter 1.5K Vbus D+ D- D- Gnd Host Controller D+ Gnd 15K Device Controller 15K Current is limited to 100mA Either the D+ or the D- line will be pulled high D+ is high, the device is a full or high speed D- is high, the device is a low speed High Speed negotiation protocol occurs during the Bus Reset phase After detecting the reset signal, the high speed... capacitance between Vbus and GND will cause a dip in voltage across the other ports of the hub For the same reason, the hub port supply must be bypassed with at least 120uF 22 © 2012 Renesas Electronics America Inc All rights reserved Micriµm Self-Powered Devices If you pull, say D+, high in the absence of Vbus then you will risk faulty operation with On -The- Go hosts When designing a self-powered device,... Payload and CRC – Not present in handshake packets The EOP is indicated by having both D+ and D- low for 3 bits (full-/lowspeed) or 8 bits (high-speed) 32 © 2012 Renesas Electronics America Inc All rights reserved Micriµm USB Packet Fields SYNC SYNC All packets must start with a SYNC field The SYNC field is 8 bits long at low and full speed or 32 bits long for high speed and is used to synchronize the. .. Engine The complexities and speed of the USB protocol are such that it is not practical to expect a general purpose microcontroller to be able to implement the protocol using an instruction-driven basis Dedicated hardware is required to deal with the time-critical portions of the specification, and the circuitry grouping which performs this function is referred to as the Serial Interface Engine... INFORMATION EOP PID The fundamental element of communications is the packet A packet is made of three parts: START, INFORMATION, and END-OFPACKET (EOP) At the START of a packet will be a sequence of transitions which is called SYNC The SYNC pattern is a chirp of either 8 bits (full-/low-speed) or 32 bits (high-speed) where each bit is a J or K state: KJKJKJKJKJKJKJKJKJKJKJKJKJKJKJKJKK The INFORMATION... Renesas Electronics America Inc All rights reserved Micriµm Mini-B Plug Mini connectors were added in USB 2.0 and OTG supplement An alternative to the standard B connector on handheld and portable devices The mini-B connecter has a fifth pin, named ID It is not connected 14 Vbus Gnd D+ DShell ID Power Power Data Data 12 345 Mini-B USB Connector Red Black Green White Drain wire No connection... America Inc All rights reserved Micriµm USB Packet Fields PID The first byte in every packet is the Packet Identifier (PID) byte This byte needs to be recognized quickly by the USB controller This is why it is not included in any CRC checks It has its own validity check There are 4 bits to the PID The check method uses the PID 4 bits by repeating and complementing them, making an 8 bit PID field in... least once before the device is configured 21 © 2012 Renesas Electronics America Inc All rights reserved Micriµm Hot-Pluggable Place a capacitance of at least 1uF across Vbus and GND to prevent from flyback voltage when unplugging a cable at the far end from the device The maximum value of the shunt capacitor across Vbus and GND is limited by the specification to 10uF This is to avoid other devices . Replaced RS-232 This document covers USB and differentiate USB Host protocol stack from USB Device protocol stack and On -The- Go. It goes over the design implications and some solutions. USB for. Nortel. 1996 USB 1.0 standard was released. Plug Fest 1999 USB 1.1 was released. Corrected bugs 2000 USB 2.0 was released specifying the implementation of a 480 Mbps bus 2001 USB On -The- Go (OTG). America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Embedding USB - The Implementation Challenges and Limitations Micriµm © 2012 Renesas Electronics America Inc. All rights