Advertisement

Quick Links

TWR-MCF52259-Ethenet
Hareesh S
Sr.FAE
TM
Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks
of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.

Advertisement

Table of Contents
loading

Summary of Contents for Freescale Semiconductor TWR-MCF52259-Ethenet

  • Page 1 TWR-MCF52259-Ethenet Hareesh S Sr.FAE Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 2: Ethernet Switch

    Ethernet Switch Ethernet Cables Ethernet Connector Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 3 Through VPN only (i.e. secure tunnel) • Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 4 Ethernet is defined by the IEEE 802.3 standard Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 5 Line Voltage Levels +2.8V or -2.8VDC Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 6 Line Voltage Levels +2.8V or -2.8VDC Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 7 Four unbounded twisted pairs Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 8 Wire pair #4: White/Brown Brown Source: http://www.netspec.com/helpdesk/wiredoc.html Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 9 Pin 6 wire color: orange Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 10 Requires using external PHY Duplex Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 11 Half Duplex Full Duplex Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 12: Star Topology

    Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 13 Co-axial based Ethernet connection daisy chain connection Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 14 Collisions Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 15 Centralized connection Can bypass not connected Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 16 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 17 Note: Ethernet to WiFi is a router functionality. Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 18 Media status signals: Carrier Presence & Collision Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 19 10 Base-T Full Duplex 10 Base-T Half Duplex Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 20 1 Byte 1 Byte ½ Byte Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 21 MAU - Medium Attachment Unit Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 22 Ethernet") is also increasingly common Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 23: Web Sites

    Charles E. Spurgeon O'Reilly 2000 ISBN 1-56592-660-9 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 24 A IPv6 node is defined by its IP address 2001:0DB8:0000:0000:0000:0000:1428:57ab • Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 25 Class E = 1111, or 240 to 254 • Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 26 Uses 192.168.1.99/24 nomenclature ( 24 = # of ones from left ) Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 27 Reserved RFC 1700 268,435,456 255.255.255.255 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 28 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 29: Default Gateway

    The internet sees a packet from 10.1.2.3 to 207.68.172.246 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 30 Some routers/gateways always default to x.x.x.1 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 31 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 32 A lower level protocol required to match IP addresses and Ethernet MAC addresses • Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 33 All People Seems To Need Data Processing”. Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 34 New Host-Host Protocol. S.D. Crocker. Feb-12-1970. (Format: TXT=44167 bytes) (Obsoletes RFC0011) (Updated by RFC0036, RFC0047) (Status: UNKNOWN) Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 35 Freescale solution for Ethernet Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 36 Encryption MC51FQE Ultra Low Power Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 37 • System Integration (PLL, SW Watchdog) Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 38 MCF52259 –FEC features Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 39 MCF52259-FEC Fetures Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 40 25MHz Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 41 • Supports Loopback modes Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 42 $95K worth of software from day one www.freescale.com/mqx Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 43 64LQFP $3.21 MCF51CN128CLH 48QFN $2.99 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 44 Trivial File Transfer Protocol (TFTP) Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 45 PC-Hosted On-Device Freescale Enablement (MQX) Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 46 HDLC Serial Serial Ethernet Ethernet Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 47 * Complimentary with MCF5225x. Subject to License Agreement Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 48: Boot Strap Protocol

    Domain name server client (DNS) Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 49 TCP/IP stack overview Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 50: Tcp/Ip Stack Structure

    TCP/IP stack structure Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 51 More details about the stack Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 52 Coldfire TCP/IP flash and RAM requirement Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 53 Ethernet LABs Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 54 Install the Given exe file TCP_IPLite_MCF5225xI.exe Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 55: Directory Structure

    Directory Structure Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 56 Directory Structure Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 57: Project File

    Open the Coldifre_Lite7x …*.mcp project file. Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 58 Project file details Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 59 Main.C – setting IP and MAC address Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 60 LAB1 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 61 Flash the program into the controller using codewarrior Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 62 Compiler the code Make button Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 63 Flash progamming Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 64 Flash file selection Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 65 Erase and program the flash Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 66: Hyper Terminal Setting

    Data bit – 8 Parity None Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 67 Reset the board- Should receive the message Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 68 Commands Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 69 Setting IP address at PC side Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 70 Type the command ping “192.168.0.98” from PC side. Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 71: Ip Address Changing

    IP address is working or not. Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 72 LAB2 – Serial to Ethernet and Visa versa Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 73 Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006. Freescale Semiconductor Confidential Proprietary. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
  • Page 74 LAB3 – Web server Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 75 Webserver project Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 76 Webserver demo Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2006.
  • Page 78 TWR-MCF52259-USB April 7, 2010 Hareesh S Sr.FAE...
  • Page 79 K2u/USB Workshops-on-Demand Series This module contains • Introduction to USB • Basic Operation of USB hardware and software • USB Data Structures for K2/3u • USB API Calls for K2/3u...
  • Page 80: Introduction To Usb

    Introduction To USB...
  • Page 81: In This Section

    In This Section: Motivation for the USB Standard History and Evolution of USB USB Topology USB Connectors...
  • Page 82 USB - Universal Serial Bus was born out of the need to provide designers and end-users with: • an alternative to Apple’s 1394 digital link ® standard (FireWire ) • a fast, bi-directional, low-cost, dynamically attachable serial interface • that removes the port availability constraints for the PC and other devices...
  • Page 83 Introduction to USB • and adds true plug-and-play attributes for a wide range of devices simultaneously • with minimal or no user intervention required for configuration • and is very end-user friendly...
  • Page 85 Introduction to USB Current USB Speeds and Limitations Spec Data Rate and Applications Notes Performance USB 1.1 Low- 1.5 Mbps / 10- Keyboard, Low cost but limited speed 100 Kbps mouse, joystick performance; type and number of USB 2.0 Low- endpoints are limited speed USB 1.1 Full-...
  • Page 86 Introduction to USB USB Spec Provides for a Flexible Tiered Star Topology • Single Host – The host controls communication with each device • Up to 127 devices can be attached • Devices are one of the following: – Hubs (provide additional attachment points) –...
  • Page 87 - Tiered Star Host Root Hub...
  • Page 88 Introduction to USB Root Hub A-connector (upstream) B-connector (downstream) Connector types...
  • Page 89 Introduction to USB Software General Concepts...
  • Page 90 In This Section: How Data is Transferred in USB How Does the Host Know the Device’s Requirements? The Enumeration Process: What happens when a device is connected? A More Detailed Look at What Comprises a Frame API Calls: What happens after enumeration?
  • Page 91 How Data is Transferred in USB USB is a token-based (packet) standard. Data is transferred between the host and the device in a series of frames, transfers, transactions, and packets within1 Ms/1500 byte frames. Frame Transfer 1 Transfer 2 Transfer 3 Transaction Transaction 1 Transaction 2...
  • Page 92 How Data is Transferred in USB Frames are made up of transfers, which are made up of transactions, which are made up of packets. The USB host schedules these 1mS frames when communicating with the low and full speed devices. Frame Transfer Transfer...
  • Page 93 How Data is Transferred in USB Frame Transfer Transfer There are 4 types of data transfer: Interrupt Bulk Isochronous Control The type of transfer depends upon the type of device and its data requirements (this is discussed in more detail later).
  • Page 94 How Data is Transferred in USB Transfer Transaction Transaction Each transfer can contain multiple transactions and a transaction can span multiple frames The host schedules transactions within the 1mS frame.
  • Page 95 How Data is Transferred in USB Transaction Transaction For each transaction there are three types of packets that communicate the data between host and device: Token Packet – the header that defines what follows Optional Data Packet – contains the data being transmitted Status/Handshake Packet –...
  • Page 96 How Does the Host Know a Device’s Requirements? When a USB device is plugged into a USB port the host communicates with the device and configures each device according its unique requirements such Type of transfer required (interrupt, bulk, isochronous, or control Who supplies the power (host or device) Maximum packet size The number of configurations (e.g., a single device can be...
  • Page 97 How Does the Host Know a Device’s Requirements? These requirements are communicated to the host through a hierarchy of C program descriptors. The types of descriptors include: Device Descriptors Configuration Descriptors Interface Descriptors Endpoint Descriptors String Descriptors...
  • Page 98 How Does the Host Know a Device’s Requirements? This hierarchy of the most commonly used descriptors looks like this: Device Descriptor Configuration Configuration Descriptor Descriptor Interface Interface Interface Interface Descriptor Descriptor Descriptor Descriptor Endpoint Endpoint Endpoint Endpoint Endpoint Endpoint Endpoint Endpoint Descriptor Descriptor...
  • Page 99 How Does the Host Know a Device’s Requirements? //------------------------------------------------------------ Device Descriptor // Sample Standard Device Descriptor Type // Definition Fields //------------------------------------------------------------ Length (18 bytes) Since the device descriptor Descriptor Type (DEVICE) USB Spec Release Number (0200h) represents the entire device, Device class (hub type…Human Interface defined in there can be only one per other descriptor, CDC described here)
  • Page 100 How Does the Host Know a Device’s Requirements? Configuration //------------------------------------------------------------ Descriptor // Sample Standard Configuration Descriptor Type // Definition Fields //------------------------------------------------------------ The configuration descriptor is a Length (9 bytes) header to the interface descriptors. It Descriptor Type (CONFIGURATION) Total Length (total length in bytes of data returned) specifies how this configuration of the Number of Interfaces (number of interfaces present for this configuration)
  • Page 101: The Device

    How Does the Host Know a Device’s Requirements? //------------------------------------------------------------ // Sample Standard Interface Descriptor Type // Definition Fields Interface //------------------------------------------------------------ Descriptor Length (9 bytes) Descriptor Type (INTERFACE) Interface Number (interface number, zero based, and incremented once for each new interface descriptor.) Alternate Setting (value used to select alternative setting) Number of Endpoints (number of Endpoints used for...
  • Page 102 How Does the Host Know a Device’s Requirements? Endpoint Descriptor //------------------------------------------------------------ // Sample Standard Endpoint Descriptor Type // Definition Fields The endpoint descriptors define //------------------------------------------------------------ what transfer type to use, the Length (7 bytes) Descriptor Type (ENDPOINT) maximum packet size and time End Point Address (indicates what endpoint this descriptor is describing) interval used to poll the frames...
  • Page 103 How Does the Host Know a Device’s Requirements? Device Descriptor Configuration Configuration Descriptor Descriptor Interface Interface Interface Interface Descriptor Descriptor Descriptor Descriptor Endpoint Endpoint Endpoint Endpoint Endpoint Endpoint Endpoint Endpoint Descriptor Descriptor Descriptor Descriptor Descriptor Descriptor Descriptor Descriptor Upon detecting a USB device connection the host, using these descriptors, configures the device and loads the proper driver program.
  • Page 104 The Enumeration Process: What happens when a device is connected? Enumeration -Upon powering up, the host: queries all connected devices to determine the requirements of each (such as, class of device power source, number and types of endpoints) and assigns a unique address for each.
  • Page 105 The Enumeration Process: What happens when a device is connected? Host What device class are you? Here is your unique address. Do you supply the power or do I? What transfer mode do you want? How many and of what type of endpoints do you need? There are 4 types of data transfer:...
  • Page 106 The Enumeration Process: What happens when a device is connected? Host //------------------------------------------------------------ // Sample Standard Device Descriptor Type // Definition Fields //------------------------------------------------------------ Length (18) Descriptor Type (DEVICE, CONFIGURATION, INTERFACE, ENDPOINT, HID) USB Spec Release Number (0200h) Device class (hub type…Human Interface defined in other descriptor, CDC described here) Device Sub-class (00h) Device protocol (00h)
  • Page 107 The Enumeration Process: What happens when a device is connected? Transfer Mode - The host then determines which type of transfer each device requires. There are three transfer modes: Interrupt Transfer - Devices that send very little data such as mice or keyboards would choose this type of transfer.
  • Page 108 The Enumeration Process: What happens when a device is connected? As the host enumerates each device it sets aside bandwidth for the devices that use the interrupt and isochronous transfer modes Interrupt transfer mode and keeps track of the total bandwidth used. These two transfer modes can use up to 90% of the total bandwidth.
  • Page 109 The Enumeration Process: What happens when a device is connected? 5. The available bandwidth is then divided into frames, and the host controls those frames which contain 1,500 bytes. Every millisecond a new frame begins. Within the frame, slots are reserved for isochronous and interrupt devices (up to 90%) so that they are guaranteed the bandwidth they need.
  • Page 110 Frames in More Detail Control, Interrupt, Bulk, Token Data Handshake Isochronous Transfer 1 Transfer 2 Transfer N Transfer 1 Transaction Transaction 1 Transaction 2 Transaction 3 Transaction 1 Transaction … 1 Ms Frame Transfers may span multiple frames. Each frame begins with a Start of The host schedules Frame packet followed by the transactions within 1mS...
  • Page 111 Packets in More Detail Packets are a block of information with a defined data structure. The packet is the lowest level of the USB transfer hierarchy describing the physical layer of the interface. If you were to monitor D+ and D- you would see the packet fields: Packet Identifier Field Address...
  • Page 112 Packets Associated with Each Type of Transfer Transfer Type Stages (Transactions) Phases (Packets) Token Control Setup Data Handshake Token Data (IN or OUT) (optional) Data Handshake Status (IN or OUT) Token Data Handshake Token Bulk Data (IN or OUT) Data Handshake Interrupt Data (IN or OUT)
  • Page 113 • USB uses Non-Return to Zero, Inverted signaling – Separate clock signal not required to be delivered with data – ‘1’ on the data line indicates no change in level of NRZI signal – ‘0’ on the data line indicates transition in level of NRZI signal –...
  • Page 114 After enumeration the device is ready to perform the function it was designed for. It does so by issuing a set of properly sequenced API calls. Definition: Application Program Interface (API): A formalized set of firmware calls and routines that can be referenced by an application program to access driver functions.
  • Page 115 Commonly used API calls for host devices: •host_init() - Initialize the host controller •host_stop() - Disable the host controller •host_reset_bus() - Reset the USB bus and all connected devices •host_send_control() - Send configuration info •host_receive_control() - Get config info •host_send() - Send data on USB channel •host_receive() - Get data on USB channel...
  • Page 116 Commonly used API calls for devices:...
  • Page 117 Note to reviewers…. what happens behind the scenes (after enumeration) between the host and device driver etc. (e.g., the host automatically polling the devices for data, receiving the data, and returning the status code, etc.) …….needs to go here.
  • Page 118 Note to reviewers….A short introduction to the demos should go here.
  • Page 119 Note to reviewers….Here should be a short discussion of what the programmer would have to do to modify the code in the Demo Kit or CMX Offerings for their specific device….e.g. they may just need to modify some descriptors and API calls.
  • Page 120 Introduction to USB Freescale and CMX have collaborated to provide a complimentary USB stack for ColdFire Microcontrollers Complimentary SW for the •Host HID Drivers MCF522xx Family of –Generic HID Microcontrollers: –HID keyboard –HID mouse •USB Basic Device Controller –HID joystick •HID device layer for the USB driver Host Mass Storage –...
  • Page 121 Introduction to USB These additional stacks are available for purchase from CMX USB Device Reviewers: Please update the delivery schedules here •Reliable Bootloader •Embedded Pipe •Mass Storage (for attached SD card or similar) •FAT file System (for attached SD card or similar) USB Host •FAT file System...
  • Page 122 Introduction to USB Appendix A USB On-the-Go...
  • Page 123: Usb On-The-Go

    USB On-the-Go: Introduction to USB What is it? Remember that previously we said that USB: 1. can be implemented as a device or a host 2. there can be only one host but many devices 3. and the host controls the devices. Host Device Device...
  • Page 124 USB On-the-Go: Introduction to USB What is it? By 2001, there was a proliferation of peripheral devices that could be interconnected and pass data to each other. Because of this interaction of peripheral devices, the USB Group saw the need for a USB device to sometimes act as a device and sometimes act as the host.
  • Page 125 USB On-the-Go: Introduction to USB What Applications would use it? Same OTG Device OTG Device in in host mode Peripheral mode Above is a typical applications that would use USB On-the-Go. On the left laptop is acting as the host controlling the flow of data to the camera phone and on the right the camera phone is acting as the host controlling the flow of data to the printer.
  • Page 126 USB On-the-Go: Introduction to USB How does it work? To implement OTG, two new protocols were added in the USB 2.0 addendum. These new protocols allow USB OTG host wake-up and role reversal respectively. They are: SRP = Session Negotiation Protocol HNP = Host Negotiation Protocol SRP introduces these new/expanded states: OTG-A device:...
  • Page 127 USB On-the-Go: Introduction to USB Initial declaration When using A and B plugs, initially the device using the A plug is declared the host and the one using the B plug is declared the device. When using the mini-AB receptacle the ID plug pin declares the initial state of a device as host or device.
  • Page 128 USB On-the-Go: Introduction to USB Negotiation process SRP (Session Request Protocol) Negotiations OTG-B (device) asks OTG-A (host) for a USB OTG session by signaling in one of two ways: • Pulsing an analog data line (D+ or D-), and • Pulsing V through a relatively high impedance ( >...
  • Page 129 USB On-the-Go: Introduction to USB Negotiation process HNP (Host Negotiation Protocol): OTG-A (host) enables OTG-B (device) to become host by sending SetFeature (b_hnp_enable) command to OTG-B (device). OTG-A (host) suspends bus signaling so that OTG-B (device) can now become host. OTG-B (device) detects Suspend condition and turns off pull-up resistor.
  • Page 130 USB On-the-Go: Introduction to USB Negotiation process Host Negotiation Protocol continued: To return control back to OTG-A (host) , OTG-B (device) stops using bus and becomes peripheral/device. OTG-A (host) sees lack of activity, disconnects and becomes host. Note: If the OTG-B (device) does not STALL the SetFeature(b_hnp_enable) command, the OTG-A (host) must give the OTG-B (device) an opportunity to become host before the OTG-A (host) may turn off...
  • Page 132 Freescale USB Solutions...
  • Page 133 The USB Controller Continuum. Only from Freescale. RS08 ColdFire V1 ColdFire V2 ColdFire V3 ColdFire V4 8-bit 32-bit • USB is becoming the standard in Consumer and Industrial applications • Designers want a “one stop shop” USB solution. Freescale provides a complete USB solution to help you ►...
  • Page 134 “A panel of distinguished judges, representing a cross section of Chinese industry and academic specialists, plus EDN China’s editorial board, narrowed the list of award finalists from the total submitted. The award was decided by votes from readers and registered users of EDN China. ” •...
  • Page 135 USB Solutions (Low/Full Speed, Device, Host, OTG) MC9S08JS16/8...
  • Page 136 MCF52259 USB features • Dual Mode USB Controller • USB 1.1 and 2.0 complient full speed device controller • 16 bi-directional end points • DMA or FIFO data stream interface • Low power consumption • OTG protocol logic...
  • Page 138 LABs...
  • Page 139 LABs • LAB1 – HID ( Device operation) • LAB2 – CDC ( Device Operation) • LAB3 – MSD( Host Operation) • LAB4 – HID (Host Operation)
  • Page 140 LAB1 – HID ( Human interface device) • In this Lab the MCF52259 board (USB) will control the PC curser. • Install the “Coldfire_USB_Lite.exe” file, • This Exe will install the required project files for our Labs. • Open the codewarrior for Coldfire. - GO through the code warrior features •...
  • Page 141 Project file - HID Drag the *.mcp file to code warrior...
  • Page 142 Project file details Project files details...
  • Page 143 Compiling and flash programming Flash programmer-Step2 Make-Step1...
  • Page 144: Flash Selection

    Flash selection Select load settings- Step1 Load the MCF52259 flash xml file- Step2...
  • Page 145 Flash selection Proper configuration chosen...
  • Page 146 Flash Erasing Flash erase...
  • Page 147 Flash Erasing Flash Erase...
  • Page 148: Flash Programming

    Flash programming. Program the code...
  • Page 149 Output of the Lab • Insert the USB Cable to MiniA connector on the peripheral board and other side to your system USB port. • Reset the board. • Look at the curser on your system, it should be oscillating.
  • Page 150 LAB2...
  • Page 151 LAB2-CDC • This LAB will demonstrate the USB to serial and visa versa communication. • Open the project file from the installed folder. – D:\Profiles\r63554\Desktop\USB for MCF52259\usb-peripheral\projects\CodeWarrior\mcf52223\cdc- demo • Follow the Steps which we have followed in the LAB1 for flash programming. •...
  • Page 152 PC side drive file installation Driver file installation Choose the second option...
  • Page 153 PC-side driver file installation Location...
  • Page 154: Usb Driver

    USB driver USB detected...
  • Page 155 COM Port at System side USB commport number Step1 – device manager...
  • Page 156 Hyper terminal for USB • Open the Hyper terminal • Select the USB port. • Set the baud rate -19200 • Data bit -8 • Parity -None • Stop bit- NO...
  • Page 157 Hyper terminal for UART • Open one more Hyper Terminal • Set the Baud rate 19200 • Type the character in one terminal, This shold be displayed in other terminal and visa versa.
  • Page 158 Working...
  • Page 159 LAB3...
  • Page 160 LAB3 – MSD(HOST) • In this LAB will achieve reading and writing to thumb drive. This will demonstrate the Host functionality. • Open the Lab from the Installed folder. • D:\Profiles\r63554\Desktop\USB for MCF52259\usb- host\projects\CodeWarrior\mcf52223\mass-storage • Follow the same steps followed in LAB2 for flash programming. •...
  • Page 161: Reset The Board

    Reset the board Message from the board after reset...
  • Page 162 Type Help Command details...
  • Page 163 USB thumb driver detected After thumb driver inserting the detection message...
  • Page 164 Thumb drive contents.
  • Page 165 • AN3560.pdf page 21– for the USB operation...

Table of Contents