1 / 16

NS9750 - Training Hardware

NS9750 - Training Hardware. USB 2.0. USB Overview. USB Device. Full Speed (12Mbps) or Low Speed (1.5Mbps) One bi-directional control EP (end point) and 11 unidirectional programmable EP’s Supported by a DMA controller Select either Usb Host or Device. USB Device Hardware Configuration.

Download Presentation

NS9750 - Training Hardware

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NS9750 - Training Hardware

  2. USB 2.0

  3. USB Overview

  4. USB Device • Full Speed (12Mbps) or Low Speed (1.5Mbps) • One bi-directional control EP (end point) and 11 unidirectional programmable EP’s • Supported by a DMA controller • Select either Usb Host or Device

  5. USB Device Hardware Configuration Negotiate/Configure DMA Setup/Completion Handle Transaction Errors

  6. Negotiate/Configure • Respond to Get Device Configuration Setup Command (see www.usb.org/developers/docs) • Device HW Naks until an IN DMA on Channel zero is created • After Set Device Configuration Setup Command interrupt occurs, read CFG, INTF, and ALT (0x9010_0004) and program endpoint registers (0x9010_3000 - 0x9010_3150)

  7. DMA Setup/Completion • Enable DMA In or Out depending on CIA selected by Usb Host • Fifo/DMA 0 is OUT on Control port, DMA 1 is IN, remainder correspond to Endpoints 1..11 • Enable DMA completion and error interrupts for each channel [GLBL_EN, GBL_DMA, FIFO, URST, ERR(0-2), NAK(0-2), UFLOW(0-2), OFLOW(0-2)] • Ack interrupt complete by writing ECIP of interrupt status register

  8. Handle Transaction Errors • Read ECIP to determine if error occurred. • If error on IN DMA (to host): • Read in packet counter PKTCNT • Increment DMA start pointer by that many packets (start += PKTCNT * MAXPKTSZ), and decrement length by that amount • Write buffer REFETCH bit • Take the channel/Fifo out of reset (write status.CLR to 0)

  9. Transaction error • If OUT DMA Error: • NS9750 will close all outstanding DMA buffers on this channel (with error) • User should read PKTCNT and setup a new DMA buffer starting at PKTCNT+MAXPKTSZ (since PKTCNT –1 ok transactions) • ??Take channel Fifo out of reset ???

  10. USB Host • Follows OHCI 1.0a programming model • See www.usb.org/developers/docs • Compatible with Full and low speed devices • Provides current relay pin for power management of connected device

  11. USB Host Operation Initialize OHCI Wait for devices to attach Transfer Descriptor Setup/Complete

  12. OHCI Initialization • Wait for NS9750 UsbHost to come out of reset • Allocate an HCCA structure • Create blank TD and ED for Bulk, Isochronous, Interrupt and Control queues • Enable OHCI interrupt in NS9750 • Set FrameInterval and HcPeriodic Start • Set up Root Hub (eg GoodToGo, PowerSwitching and OverCurrentProtection)

  13. OHCI Setup • Host Controller Registers start at 0x0900_1000 • User must set up HCCA and maintain Endpoint descriptors and Transfer Descriptors • Only one interrupt: OHCI_IRQ

  14. Wait for device to attach • Standard OHCI, wait for port CCS, then reset the attached device, then start GET DEVICE DESCRIPTOR transfer. • Application sends above transfer and then sends a SET CONIFGURATION and SET INTERFACE transfer. • From the selected CIA, add Endpoint descriptors to appropriate OCHI schedule table

  15. Transfer Descriptor Setup/Complete • Follows standard OCHI model • Setup TDs as requested by app. • Handle Done queue interrupts to retire TDs and free TD memory.

  16. Hints & Kinks • Can the USB Host and Device work at the same time? • No • Are Usb 2.0 Devices supported? • USB 2.0 Low and Full speed devices are. In addition, USB 1.1 devices are supported. • Does the USB Host supply power? • Not from the NS9750.

More Related