How to Handle USB Suspend Mode on Sama5x

How to Handle USB Suspend Mode on Sama5x

AN2457 How to Handle USB Suspend Mode on SAMA5x Introduction This application note describes the USB Suspend mode operation in the SAMA5x series of microprocessors. The document demonstrates the USB Suspend feature, and its implementation and testing in Linux on a SAMA5D2/D3/D4 Xplained Ultra board. References The following items are available on http://www.microchip.com. Type Title Lit. No. Datasheet SAMA5D2 Device Datasheet DS60001476 Datasheet SAMA5D3 Device Datasheet 11121 Datasheet SAMA5D4 Device Datasheet 11238 User Guide SAMA5D2 Xplained Ultra User Guide 44028 User Guide SAMA5D2 Rev. B Xplained Ultra User Guide 44083 User Guide SAMA5D3 Xplained User Guide 11269 User Guide SAMA5D4 Xplained Ultra User Guide 44005 Application Note SAMA5D2 Low-Power Modes Implementation 44042 Application Note Low-power Modes on the SAMA5D3 Series 11185 Software Package SAMA5D2 Software Package – Refer also to Linux Kernel from GitHub on: https://github.com/linux4sam/linux-at91 © 2017 Microchip Technology Inc. Application Note DS00002457A-page 1 AN2457 Table of Contents Introduction......................................................................................................................1 References...................................................................................................................... 1 1. USB Suspend Mode ................................................................................................. 4 2. USB Ports in SAMA5Dx Devices...............................................................................6 2.1. USB Host and Device Ports in SAMA5D2....................................................................................6 2.2. USB Host and Device Ports in SAMA5D3 and SAMA5D4...........................................................7 3. USB High-Speed Device Port (UDPHS)....................................................................9 3.1. Description................................................................................................................................... 9 3.2. Embedded Characteristics........................................................................................................... 9 3.3. UTMI Transceivers Sharing........................................................................................................10 3.4. Working with Host Port A as Device Port................................................................................... 10 4. Entering Suspend Mode from USB Device Port......................................................12 4.1. USB Device Suspend.................................................................................................................12 5. Exiting Suspend Mode from USB Device Port........................................................ 14 5.1. Receiving a Host Resume..........................................................................................................14 5.2. Sending an External Resume.....................................................................................................14 6. USB Host High-Speed Port (UHPHS)..................................................................... 16 6.1. Embedded Characteristics......................................................................................................... 16 6.2. SAMA5D2 USB Host Ports........................................................................................................ 16 6.3. SAMA5D3 USB Host Ports........................................................................................................ 16 6.4. SAMA5D4 USB Host Ports........................................................................................................ 16 6.5. USB Port Sharing.......................................................................................................................16 6.6. Block Diagram............................................................................................................................17 7. Types of USB Suspend........................................................................................... 20 8. USB Global Suspend...............................................................................................21 8.1. USB Global Suspend in SAMA5Dx Devices.............................................................................. 21 9. Suspending USB Host Ports in SAMA5Dx Devices................................................ 22 9.1. USB Suspend Mode Implementation in Linux Kernel................................................................ 22 10. USB Selective Suspend Example........................................................................... 24 10.1. Hardware Setup for USB Selective Suspend.............................................................................24 10.2. USB Selective Suspend Mode on Host Ports ........................................................................... 25 11. USB Global Suspend Example................................................................................33 12. Power Consumption during USB Suspend..............................................................34 © 2017 Microchip Technology Inc. Application Note DS00002457A-page 2 AN2457 13. USB Host Limitations and Corrections.................................................................... 35 14. Revision History.......................................................................................................36 The Microchip Web Site................................................................................................ 37 Customer Change Notification Service..........................................................................37 Customer Support......................................................................................................... 37 Microchip Devices Code Protection Feature................................................................. 37 Legal Notice...................................................................................................................38 Trademarks................................................................................................................... 38 Quality Management System Certified by DNV.............................................................39 Worldwide Sales and Service........................................................................................40 © 2017 Microchip Technology Inc. Application Note DS00002457A-page 3 AN2457 1. USB Suspend Mode According to the USB specification, in absence of bus traffic over USB in powered state for more than 3 milliseconds, all devices that are supplied power through the Universal Serial Bus (USB) must enter Suspend mode. Suspend mode reduces the use of bus power by a device when the host has no reason to communicate with it. This enables the device to enter low-power mode in order to reduce power consumption. Bus- powered devices draw current from the USB. These devices must reduce their power consumption to meet USB specifications when they are inactive. For power consumption values, refer to Section 4 of the USB Specifications datasheet (version 1.1), available on http://www.usb.org. A device in Suspend mode can resume operation when any active signal is received on its upstream port. It can resume operation from the application using an external interrupt. Selective port suspend reduces power, with most suspended devices drawing less than 500 µA, including current from pullup resistors on the bus. All devices below a suspended port are suspended. USB High Speed Device Port (UDPHS) and USB High Speed Host Port (UHPHS) in the SAMA5x series are compliant with the Universal Serial Bus (USB), revision 2.0 High Speed Device Specification and are designed to support Suspend mode when the USB bus is inactive. USB has a start of frame or keep alive packet sent periodically on the bus. This prevents an idle bus from entering Suspend mode in the absence of data. • A high-speed bus has microframes sent every 125.0 µs ±62.5 ns • A full-speed bus has a frame sent every 1.000 ms ±500 ns © 2017 Microchip Technology Inc. Application Note DS00002457A-page 4 AN2457 Figure 1-1. USB Device States Movement from one state to another depends on the USB bus state or on standard requests sent through control transactions via the default endpoint (endpoint 0). The USB bus only has two states - active and suspended - based on traffic over the bus. © 2017 Microchip Technology Inc. Application Note DS00002457A-page 5 AN2457 2. USB Ports in SAMA5Dx Devices This section classifies the available Universal Serial Bus ports and required power supply on SAMA5Dx products. 2.1 USB Host and Device Ports in SAMA5D2 SAMA5D2 devices feature three host ports (A, B, C). Host port A and Host port B support high-speed and full-speed devices as per USB 1.1 and USB 2.0 specifications. Host port A and the device port (UDPHS) share the same transceiver. Host port C is designed for HSIC (High-Speed Inter-Circuit) and supports only high-speed devices. A detailed description is given in USB Inter-chip Transceiver (SAMA5D2 only). Figure 2-1. USB Selection Table 2-1. SAMA5D2 USB Ports Device SAMA5D21/22/23 SAMA5D24 SAMA5D26 SAMA5D27 SAMA5D28 Package TFBGA196 TFBGA256 LFBGA289 USB 2 (2 hosts or 1 host/1 device) 3 (2 hosts/1 2 (2 hosts or 1 3 (2 hosts/1 HSIC, or 1 HSIC, or 1 host / 1 host/ 1 device/ 1 HSIC) host/1 device/ device) 1 HSIC) © 2017 Microchip Technology Inc. Application Note DS00002457A-page 6 AN2457 Table 2-2. SAMA5D2 Power Supplies Name

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    40 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us