34 .80 7IRELESS IMPORTANT NOTICE Dear customer, As from August 2nd 2008, the wireless operations of NXP have moved to a new company, ST-NXP Wireless. As a result, the following changes are applicable to the attached document. Company name - Philips Semiconductors is replaced with ST-NXP Wireless. Copyright - the copyright notice at the bottom of each page "(c) Koninklijke Philips Electronics N.V. 200x. All rights reserved", shall now read: "(c) ST-NXP Wireless 200x All rights reserved". Web site - http://www.semiconductors.philips.com is replaced with http://www.stnwireless.com Contact information - the list of sales offices previously obtained by sending an email to sales.addresses@www.semiconductors.philips.com, is now found at http://www.stnwireless.com under Contacts. If you have any questions related to the document, please contact our nearest sales office. Thank you for your cooperation and understanding. ST-NXP Wireless 34 .80 7IRELESS www.stnwireless.com ISP1161A1 Universal Serial Bus single-chip host and device controller Rev. 03 -- 23 December 2004 Product data 1. General description The ISP1161A1 is a single-chip Universal Serial Bus (USB) Host Controller (HC) and Device Controller (DC). The Host Controller portion of the ISP1161A1 complies with Universal Serial Bus Specification Rev. 2.0, supporting data transfer at full-speed (12 Mbit/s) and low-speed (1.5 Mbit/s). The Device Controller portion of the ISP1161A1 also complies with Universal Serial Bus Specification Rev. 2.0, supporting data transfer at full-speed (12 Mbit/s). These two USB controllers, the HC and the DC, share the same microprocessor bus interface. They have the same data bus, but different I/O locations. They also have separate interrupt request output pins, separate DMA channels that include separate DMA request output pins and DMA acknowledge input pins. This makes it possible for a microprocessor to control both the USB HC and the USB DC at the same time. The ISP1161A1 provides two downstream ports for the USB HC and one upstream port for the USB DC. Each downstream port has an overcurrent (OC) detection input pin and power supply switching control output pin. The upstream port has a VBUS detection input pin.The ISP1161A1 also provides separate wake-up input pins and suspended status output pins for the USB HC and the USB DC, respectively. This makes power management flexible. The downstream ports for the HC can be connected with any USB compliant devices and hubs that have USB upstream ports. The upstream port for the DC can be connected to any USB compliant USB host and USB hubs that have USB downstream ports. The HC is adapted from the Open Host Controller Interface Specification for USB Release 1.0a, referred to as OHCI in the rest of this document. The DC is compliant with most USB device class specifications such as Imaging Class, Mass Storage Devices, Communication Devices, Printing Devices and Human Interface Devices. The ISP1161A1 is well suited for embedded systems and portable devices that require a USB host only, a USB device only, or a combination of a configurable USB host and USB device. The ISP1161A1 brings high flexibility to the systems that have it built-in. For example, a system that uses an ISP1161A1 allows it not only to be connected to a PC or USB hub with a USB downstream port, but also to be connected to a device that has a USB upstream port such as a USB printer, USB camera, USB keyboard or a USB mouse. Therefore, the ISP1161A1 enables point-to-point connectivity between embedded systems. An interesting application example is to connect an ISP1161A1 HC with an ISP1161A1 DC. Consider an example of an ISP1161A1 being used in a Digital Still Camera (DSC) design. Figure 1 shows an ISP1161A1 being used as a USB DC. Figure 2 shows an ISP1161A1 being used as a USB HC. Figure 3 shows an ISP1161A1 being used as a USB HC and a USB DC at the same time. ISP1161A1 Philips Semiconductors USB single-chip host and device controller EMBEDDED SYSTEM P SYSTEM MEMORY P P bus I/F PC (host) ISP1161A1 HOST/ DEVICE USB cable USB I/F USB I/F USB device DSC 004aaa173 Fig 1. ISP1161A1 operating as a USB device. EMBEDDED SYSTEM P P SYSTEM MEMORY P bus I/F PRINTER (device) ISP1161A1 HOST/ DEVICE USB cable USB I/F DSC USB I/F USB host 004aaa174 Fig 2. ISP1161A1 operating as a stand-alone USB host. EMBEDDED SYSTEM P SYSTEM MEMORY P P bus I/F PC (host) DSC PRINTER (device) ISP1161A1 HOST/ DEVICE USB cable USB I/F USB cable USB I/F USB I/F USB device USB I/F USB host 004aaa175 Fig 3. ISP1161A1 operating as both USB host and device simultaneously. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 2 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 2. Features Complies with Universal Serial Bus Specification Rev. 2.0 The Host Controller portion of the ISP1161A1 supports data transfer at full-speed (12 Mbit/s) and low-speed (1.5 Mbit/s) The Device Controller portion of the ISP1161A1 supports data transfer at full-speed (12 Mbit/s) Combines the HC and the DC in a single chip On-chip DC complies with most USB device class specifications Both the HC and the DC can be accessed by an external microprocessor via separate I/O port addresses Selectable one or two downstream ports for the HC and one upstream port for the DC High-speed parallel interface to most of the generic microprocessors and Reduced Instruction Set Computer (RISC) processors such as: Hitachi(R) SuperHTM SH-3 and SH-4 MIPS-basedTM RISC ARM7TM, ARM9TM, StrongARM(R) Maximum 15 Mbyte/s data transfer rate between the microprocessor and the HC, 11.1 Mbyte/s data transfer rate between the microprocessor and the DC Supports single-cycle and burst mode DMA operations Up to 14 programmable USB endpoints with 2 fixed control IN/OUT endpoints for the DC Built-in separate FIFO buffer RAM for the HC (4 kbytes) and DC (2462 bytes) Endpoints with double buffering to increase throughput and ease real-time data transfer for both DC transfers and HC isochronous (ISO) transactions 6 MHz crystal oscillator with integrated PLL for low EMI Controllable LazyClock (100 kHz 50 %) output during `suspend' Clock output with programmable frequency (3 MHz to 48 MHz) Software controlled connection to USB bus (SoftConnect) on upstream port for the DC Good USB connection indicator that blinks with traffic (GoodLink) for the DC Software selectable internal 15 k pull-down resistors for HC downstream ports Dedicated pins for suspend sensing output and wake-up control input for flexible applications Global hardware reset input pin and separate internal software reset circuits for HC and DC Operation from a 5 V or a 3.3 V power supply Operating temperature range -40 C to +85 C Available in two LQFP64 packages (SOT314-2 and SOT414-1). (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 3 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 3. Applications Personal Digital Assistant (PDA) Digital camera Third-generation (3-G) phone Set-Top Box (STB) Information Appliance (IA) Photo printer MP3 jukebox Game console. 4. Ordering information Table 1: Ordering information Type number Package Name Description Version ISP1161A1BD LQFP64 plastic low profile quad flat package; 64 leads; body 10 x 10 x 1.4 mm SOT314-2 ISP1161A1BM LQFP64 plastic low profile quad flat package; 64 leads; body 7 x 7 x 1.4 mm SOT414-1 (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 4 of 136 xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxxxxxxx xxxxxxxxxx xxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx xxxxx x x to/ from microprocessor XTAL2 HOST CONTROLLER 40 H_WAKEUP XTAL1 43 44 42 H_SUSPEND NDP_SEL 16 2 to 7, 9 to 14, 16, 17, 63, 64 ITL0 (PING RAM) 46 POWER SWITCHING ALT RAM 33 ITL1 (PONG RAM) 47 54 OVERCURRENT DETECTION 55 H_PSW1 Philips Semiconductors 5. Block diagram 9397 750 13961 Product data 6 MHz H_PSW2 H_OC1 H_OC2 D0 to D15 DACK2 DACK1 EOT DREQ2 DREQ1 INT2 INT1 D_WAKEUP D_SUSPEND RESET 50 ISP1161A1 22 21 23 60 59 28 27 34 26 25 30 29 USB TRANSCEIVER HOST CONTROLLER HOST/ DEVICE AUTOMUX HOST BUS INTERFACE 53 H_DP1 H_DM2 H_DP2 USB bus downstream ports 4x 15 k DEVICE BUS INTERFACE CLOCK RECOVERY Device bus GND 37 39 DEVICE CONTROLLER 36 48 USB TRANSCEIVER 49 32 internal reset POWER-ON RESET 56 57 7 DGND AGND 3.3 V 58 PONG RAM 1.5 k SoftConnect internal supply 24 19 3.3 V DEVICE CONTROLLER GoodLink 38 PROGRAMMABLE DIVIDER 41 Vreg(3.3) Vhold1 Vhold2 61, 20 2 GL CLKOUT n.c. 004aaa176 D_VBUS D_DM D_DP USB bus upstream port ISP1161A1 5 of 136 (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. VOLTAGE REGULATOR 1, 8, 15, 18, 35, 45, 62 Fig 4. Block diagram. H_DM1 PLL PING RAM VCC 52 USB TRANSCEIVER CLOCK RECOVERY Host bus 51 USB single-chip host and device controller Rev. 03 -- 23 December 2004 RD CS WR A1 A0 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Memory block POWER-ON RESET Philips sHC core USB STATE ATL RAM ITL0 RAM P interface MEMORY MANAGEMENT UNIT BUS I/F clock recovery ITL1 RAM DMA HANDLER Host bus I/F USB Interface PHILIPS SIE FRAME MANAGEMENT USB bus REGISTER ACCESS P HANDLER PDT_LIST PROCESS H_DP1 H_DM1 H_DP2 H_DM2 USB TRANSCEIVER Host controller sub-blocks MGT930 Fig 5. Host controller sub-block diagram. 3.3 V POWER-ON RESET SoftConnect INTEGRATED RAM DMA HANDLER USB bus Device bus I/F BUS I/F MEMORY MANAGEMENT UNIT P HANDLER PHILIPS SIE D_DP USB TRANSCEIVER D_DM clock recovery EP HANDLER Device controller sub-blocks GoodLink MGT931 GL Fig 6. Device controller sub-block diagram. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 6 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 6. Pinning information 49 D_DP 50 H_DM1 51 H_DP1 52 H_DM2 53 H_DP2 54 H_OC1 55 H_OC2 56 VCC 57 AGND 58 Vreg(3.3) 59 A0 60 A1 61 n.c. 62 DGND 63 D0 64 D1 6.1 Pinning DGND 1 48 D_DM D2 2 47 H_PSW2 D3 3 46 H_PSW1 D4 4 45 DGND D5 5 44 XTAL2 D6 6 43 XTAL1 D7 7 42 H_SUSPEND DGND 8 41 CLKOUT ISP1161A1BD ISP1161A1BM D8 9 40 H_WAKEUP D9 10 39 D_VBUS D10 11 38 GL D11 12 37 D_WAKEUP D12 13 36 D_SUSPEND D13 14 35 DGND DGND 15 34 EOT D14 16 RESET 32 TEST 31 INT2 30 INT1 29 DACK2 28 DACK1 27 DREQ2 26 DREQ1 25 Vhold2 24 WR 23 RD 22 CS 21 n.c. 20 DGND 18 Vhold1 19 D15 17 33 NDP_SEL 004aaa177 Fig 7. Pin configuration LQFP64. 6.2 Pin description Table 2: Pin description for LQFP64 Symbol[1] Pin Type Description DGND 1 - digital ground D2 2 I/O bit 2 of bidirectional data; slew-rate controlled; TTL input; three-state output D3 3 I/O bit 3 of bidirectional data; slew-rate controlled; TTL input; three-state output D4 4 I/O bit 4 of bidirectional data; slew-rate controlled; TTL input; three-state output D5 5 I/O bit 5 of bidirectional data; slew-rate controlled; TTL input; three-state output (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 7 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 2: Pin description for LQFP64...continued Symbol[1] Pin Type Description D6 6 I/O bit 6 of bidirectional data; slew-rate controlled; TTL input; three-state output D7 7 I/O bit 7 of bidirectional data; slew-rate controlled; TTL input; three-state output DGND 8 - digital ground D8 9 I/O bit 8 of bidirectional data; slew-rate controlled; TTL input; three-state output D9 10 I/O bit 9 of bidirectional data; slew-rate controlled; TTL input; three-state output D10 11 I/O bit 10 of bidirectional data; slew-rate controlled; TTL input; three-state output D11 12 I/O bit 11 of bidirectional data; slew-rate controlled; TTL input; three-state output D12 13 I/O bit 12 of bidirectional data; slew-rate controlled; TTL input; three-state output D13 14 I/O bit 13 of bidirectional data; slew-rate controlled; TTL input; three-state output DGND 15 - digital ground D14 16 I/O bit 14 of bidirectional data; slew-rate controlled; TTL input; three-state output D15 17 I/O bit 15 of bidirectional data; slew-rate controlled; TTL input; three-state output DGND 18 - digital ground Vhold1 19 - voltage holding pin; internally connected to the Vreg(3.3) and Vhold2 pins. When VCC is connected to 5 V, this pin will output 3.3 V, hence do not connect it to 5 V. When VCC is connected to 3.3 V, this pin can either be connected to 3.3 V or left unconnected. In all cases, decouple this pin to DGND. n.c. 20 - no connection CS 21 I chip select input RD 22 I read strobe input WR 23 I write strobe input Vhold2 24 - voltage holding pin; internally connected to the Vreg(3.3) and Vhold1 pins. When VCC is connected to 5 V, this pin will output 3.3 V, hence do not connect it to 5 V. When VCC is connected to 3.3 V, this pin can either be connected to 3.3 V or left unconnected. In all cases, decouple this pin to DGND. DREQ1 25 O HC DMA request output (programmable polarity); signals to the DMA controller that the ISP1161A1 wants to start a DMA transfer; see Section 10.4.1 DREQ2 26 O DC DMA request output (programmable polarity); signals to the DMA controller that the ISP1161A1 wants to start a DMA transfer; see Section 13.1.4 DACK1 27 I HC DMA acknowledge input; when not in use, this pin must be connected to VCC via an external 10 k resistor (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 8 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 2: Pin description for LQFP64...continued Symbol[1] Pin Type Description DACK2 28 I DC DMA acknowledge input; when not in use, this pin must be connected to VCC via an external 10 k resistor INT1 29 O HC interrupt output; programmable level, edge triggered and polarity; see Section 10.4.1 INT2 30 O DC interrupt output; programmable level, edge triggered and polarity; see Section 13.1.4 TEST 31 O test output; used for test purposes only; this pin is not connected during normal operation RESET 32 I reset input (Schmitt trigger); a LOW level produces an asynchronous reset (internal pull-up resistor) NDP_SEL 33 I indicates to the HC software the Number of Downstream Ports (NDP) present: 0 -- select 1 downstream port 1 -- select 2 downstream ports only changes the value of the NDP field in the HcRhDescriptorA register; both ports will always be enabled; see Section 10.3.1 (internal pull-up resistor) EOT 34 I DMA master device to inform the ISP1161A1 of end of DMA transfer; active level is programmable; see Section 10.4.1 DGND 35 - digital ground D_SUSPEND 36 O DC `suspend' state indicator output; active HIGH D_WAKEUP 37 I DC wake-up input; generates a remote wake-up from `suspend' state (active HIGH); when not in use, this pin must be connected to DGND via an external 10 k resistor (internal pull-down resistor) GL 38 O GoodLink LED indicator output (open-drain, 8 mA); the LED is default ON, blinks OFF upon USB traffic; to connect a LED use a series resistor of 470 (VCC = 5.0 V) or 330 (VCC = 3.3 V) D_VBUS 39 I DC USB upstream port VBUS sensing input; when not in use, this pin must be connected to DGND via a 1 M resistor H_WAKEUP 40 I HC wake-up input; generates a remote wake-up from `suspend' state (active HIGH); when not in use, this pin must be connected to DGND via an external 10 k resistor (internal pull-down resistor) CLKOUT 41 O programmable clock output (3 MHz to 48 MHz); default 12 MHz H_SUSPEND 42 O HC `suspend' state indicator output; active HIGH XTAL1 43 I crystal input; connected directly to a 6 MHz crystal; when XTAL1 is connected to an external clock source, pin XTAL2 must be left open XTAL2 44 O crystal output; connected directly to a 6 MHz crystal; when pin XTAL1 is connected to an external clock source, this pin must be left open (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 9 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 2: Pin description for LQFP64...continued Symbol[1] Pin Type Description DGND 45 - digital ground H_PSW1 46 O power switching control output for downstream port 1; open-drain output H_PSW2 47 O power switching control output for downstream port 2; open-drain output D_DM 48 AI/O USB D- data line for DC upstream port; when not in use, this pin must be left open D_DP 49 AI/O USB D+ data line for DC upstream port; when not in use, this pin must be left open H_DM1 50 AI/O USB D- data line for HC downstream port 1 H_DP1 51 AI/O USB D+ data line for HC downstream port 1 H_DM2 52 AI/O USB D- data line for HC downstream port 2; when not in use, this pin must be left open H_DP2 53 AI/O USB D+ data line for HC downstream port 2; when not in use, this pin must be left open H_OC1 54 I overcurrent sensing input for HC downstream port 1 H_OC2 55 I overcurrent sensing input for HC downstream port 2 VCC 56 - power supply voltage input (3.0 V to 3.6 V or 4.75 V to 5.25 V). This pin supplies the internal 3.3 V regulator input. When connected to 5 V, the internal regulator will output 3.3 V to pins Vreg(3.3), Vhold1 and Vhold2. When connected to 3.3 V, it will bypass the internal regulator. AGND 57 - analog ground Vreg(3.3) 58 - internal 3.3 V regulator output; when pin VCC is connected to 5 V, this pin outputs 3.3 V. When pin VCC is connected to 3.3 V, connect this pin to 3.3 V. A0 59 I address input; selects command (A0 = 1) or data (A0 = 0) A1 60 I address input; selects AutoMux switching to DC (A1 = 1) or AutoMux switching to HC (A1 = 0); see Table 3 n.c. 61 - no connection DGND 62 - digital ground D0 63 I/O bit 0 of bidirectional data; slew-rate controlled; TTL input; three-state output D1 64 I/O bit 1 of bidirectional data; slew-rate controlled; TTL input; three-state output [1] Symbol names with an overscore (e.g. NAME) represent active LOW signals. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 10 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 7. Functional description 7.1 PLL clock multiplier A 6 MHz to 48 MHz clock multiplier Phase-Locked Loop (PLL) is integrated on-chip. This allows for the use of a low-cost 6 MHz crystal, which also minimizes EMI. No external components are required for the operation of the PLL. 7.2 Bit clock recovery The bit clock recovery circuit recovers the clock from the incoming USB data stream using a 4 times over-sampling principle. It is able to track jitter and frequency drift as specified in the Universal Serial Bus Specification Rev. 2.0. 7.3 Analog transceivers Three sets of transceivers are embedded in the chip: two are used for downstream ports with USB connector type A; one is used for upstream port with USB connector type B. The integrated transceivers are compliant with the Universal Serial Bus Specification Rev. 2.0. They interface directly with the USB connectors and cables through external termination resistors. 7.4 Philips Serial Interface Engine (SIE) The Philips SIE implements the full USB protocol layer. It is completely hardwired for speed and needs no firmware intervention. The functions of this block include: synchronization pattern recognition, parallel/serial conversion, bit (de)stuffing, CRC checking/generation, Packet IDentifier (PID) verification/generation, address recognition, handshake evaluation/generation. There are separate SIEs in the HC and the DC. 7.5 SoftConnect The connection to the USB is accomplished by bringing D+ (for full-speed USB devices) HIGH through a 1.5 k pull-up resistor. In the ISP1161A1 DC, the 1.5 k pull-up resistor is integrated on-chip and is not connected to VCC by default. The connection is established through a command sent by the external/system microcontroller. This allows the system microcontroller to complete its initialization sequence before deciding to establish connection with the USB. Re-initialization of the USB connection can also be performed without disconnecting the cable. The ISP1161A1 DC will check for USB VBUS availability before the connection can be established. VBUS sensing is provided through pin D_VBUS. Remark: The tolerance of the internal resistors is 25 %. This is higher than the 5 % tolerance specified by the USB specification. However, the overall voltage specification for the connection can still be met with a good margin. The decision to make use of this feature lies with the USB equipment designer. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 11 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 7.6 GoodLink Indication of a good USB connection is provided at pin GL through GoodLink technology. During enumeration, the LED indicator will blink on momentarily. When the DC has been successfully enumerated (the device address is set), the LED indicator will remain permanently on. Upon each successful packet transfer (with ACK) to and from the ISP1161A1 the LED will blink off for 100 ms. During `suspend' state the LED will remain off. This feature provides a user-friendly indication of the status of the USB device, the connected hub and the USB traffic. It is a useful field diagnostics tool for isolating faulty equipment. It can therefore help to reduce field support and hotline overhead. 8. Microprocessor bus interface 8.1 Programmed I/O (PIO) addressing mode A generic PIO interface is defined for speed and ease-of-use. It also allows direct interfacing to most microcontrollers. To a microcontroller, the ISP1161A1 appears as a memory device with a 16-bit data bus and uses only two address lines: A1 and A0 to access the internal control registers and FIFO buffer RAM. Therefore, the ISP1161A1 occupies only four I/O ports or four memory locations of a microprocessor. External microprocessors can read from or write to the ISP1161A1 internal control registers and FIFO buffer RAM through the Programmed I/O (PIO) operating mode. Figure 8 shows the Programmed I/O interface between a microprocessor and an ISP1161A1. P bus I/F D [15:0] MICROPROCESSOR D [15:0] RD RD WR WR CS CS A2 A1 A1 A0 IRQ1 INT1 IRQ2 INT2 ISP1161A1 004aaa178 Fig 8. Programmed I/O interface between a microprocessor and an ISP1161A1. 8.2 DMA mode The ISP1161A1 also provides DMA mode for external microprocessors to access its internal FIFO buffer RAM. Data can be transferred by DMA operation between a microprocessor's system memory and the ISP1161A1 internal FIFO buffer RAM. Remark: The DMA operation must be controlled by the external microprocessor system DMA controller (Master). (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 12 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Figure 9 shows the DMA interface between a microprocessor system and the ISP1161A1. The ISP1161A1 provides two DMA channels: * DMA channel 1 (controlled by DREQ1, DACK1 signals) is for the DMA transfer between a microprocessor's system memory and the ISP1161A1 HC internal FIFO buffer RAM. * DMA channel 2 (controlled by DREQ2, DACK2 signals) is for the DMA transfer between a microprocessor system memory and the ISP1161A1 DC internal FIFO buffer RAM. The EOT signal is an external end-of-transfer signal used to terminate the DMA transfer. Some microprocessors may not have this signal. In this case, the ISP1161A1 provides an internal EOT signal to terminate the DMA transfer as well. Setting the HcDMAConfiguration register (21H to read, A1H to write) enables the ISP1161A1 HC internal DMA counter for DMA transfer. When the DMA counter reaches the value set in the HcTransferCounter register (22H to read, A2H to write), an internal EOT signal will be generated to terminate the DMA transfer. P bus I/F D [15:0] D [15:0] MICROPROCESSOR RD RD WR WR DACK1 DACK1 DREQ1 DREQ1 DACK2 DACK2 DREQ2 DREQ2 ISP1161A1 EOT EOT 004aaa179 Fig 9. DMA interface between a microprocessor and an ISP1161A1. 8.3 Control register access by PIO mode 8.3.1 I/O port addressing Table 3 shows the ISP1161A1 I/O port addressing. Complete decoding of the I/O port address should include the chip select signal CS and the address lines A1 and A0. However, the direction of the access of the I/O ports is controlled by the RD and WR signals. When RD is LOW, the microprocessor reads data from the ISP1161A1 data port. When WR is LOW, the microprocessor writes a command to the command port, or writes data to the data port. Table 3: I/O port addressing Port CS A1,A0 (Bin) Access Data bus width (bits) Description 0 0 00 R/W 16 HC data port 1 0 01 W 16 HC command port 2 0 10 R/W 16 DC data port 3 0 11 W 16 DC command port (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 13 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Figure 10 and Figure 11 illustrate how an external microprocessor accesses the ISP1161A1 internal control registers. AUTOMUX DC/HC Host bus I/F 0 P bus I/F Device bus I/F 1 A1 MGT935 When A1 = 0, the microprocessor accesses the HC. When A1 = 1, the microprocessor accesses the DC. Fig 10. Microprocessor access to a HC or a DC via an automux switch. CMD/DATA SWITCH Host or Device bus I/F 1 command port data port Commands 0 A0 Command register .. . Control registers MGT936 When A0 = 0, the microprocessor accesses the data port. When A0 = 1, the microprocessor accesses the command port. Fig 11. Microprocessor access to internal control registers. 8.3.2 Register access phases The ISP1161A1 register structure is a command-data register pair structure. A complete register access cycle comprises a command phase followed by a data phase. The command (also known as the index of a register) points the ISP1161A1 to the next register to be accessed. A command is 8 bits long. On a microprocessor's 16-bit data bus, a command occupies the lower byte, with the upper byte filled with zeros. Figure 12 shows a complete 16-bit register access cycle for the ISP1161A1. The microprocessor writes a command code to the command port, and then reads or writes the data word from or to the data port. Take the example of a microprocessor attempting to read the ISP1161A1's ID, which is saved in the HC's HcChipID register (index 27H, read only). The 16-bit register access cycle is therefore: 1. Microprocessor writes the command code of 27H (0027H in 16-bit width) to the HC command port 2. Microprocessor reads the data word of the chip's ID (6110H for engineering sample; version one) from the HC data port. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 14 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 16-bit register access cycle write command (16 bits) read/write data (16 bits) t MGT937 Fig 12. 16-bit register access cycle. Most of the ISP1161A1 internal control registers are 16-bit wide. Some of the internal control registers, however, have 32-bit width. Figure 13 shows how the 32-bit internal control register is accessed. The complete cycle of accessing a 32-bit register consists of a command phase followed by two data phases. In the two data phases, the microprocessor first reads or writes the lower 16-bit data, followed by the upper 16-bit data. 32-bit register access cycle write command (16 bits) read/write data (lower 16 bits) read/write data (upper 16 bits) t MGT938 Fig 13. 32-bit register access cycle. To further describe the complete access cycles of the internal control registers, the status of some pins of the microprocessor bus interface are shown in Figure 14 and Figure 15 for the HC and the DC respectively. CS A1, A0 WR 01 00 00 read read write write write write read read HC register data (lower word) HC register data (upper word) write RD D [15:0 ] HC command code MGT939 Fig 14. Accessing HC control registers. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 15 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller CS A1, A0 11 WR 10 10 read read write write write write read read DC register data (lower word) DC register data (upper word) write RD DC command code D [15:0 ] MGT940 Fig 15. Accessing DC control registers. 8.4 FIFO buffer RAM access by PIO mode Since the ISP1161A1 internal memory is structured as a FIFO buffer RAM, the FIFO buffer RAM is mapped to dedicated register fields. Therefore, accessing the internal FIFO buffer RAM is similar to accessing the internal control registers in multiple data phases. FIFO buffer RAM access cycle (transfer counter = 2N) write command (16 bits) read/write data #1 (16 bits) read/write data #2 (16 bits) read/write data #N (16 bits) t MGT941 Fig 16. Internal FIFO buffer RAM access cycle. Figure 16 shows a complete access cycle of the HC internal FIFO buffer RAM. For a write cycle, the microprocessor first writes the FIFO buffer RAM's command code to the command port, and then writes the data words one by one to the data port until half of the transfer's byte count is reached. The HcTransferCounter register (22H to read, A2H to write) is used to specify the byte count of a FIFO buffer RAM's read cycle or write cycle. Every access cycle must be in the same access direction. The read cycle procedure is similar to the write cycle. For access to the DC FIFO buffer RAM, see Section 13. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 16 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 8.5 FIFO buffer RAM access by DMA mode The DMA interface between a microprocessor and the ISP1161A1 is shown in Figure 9. When doing a DMA transfer, at the beginning of every burst the ISP1161A1 outputs a DMA request to the microprocessor via the DREQ pin (DREQ1 for HC, DREQ2 for DC). After receiving this signal, the microprocessor will reply with a DMA acknowledge via the DACK pin (DACK1 for HC, DACK2 for DC), and at the same time, execute the DMA transfer through the data bus. In the DMA mode, the microprocessor must issue a read or write signal to the ISP1161A1 RD or WR pin. The ISP1161A1 will repeat the DMA cycles until it receives an EOT signal to terminate the DMA transfer. The ISP1161A1 supports both external and internal EOT signals. The external EOT signal is received as input on pin EOT, and generally comes from the external microprocessor. The internal EOT signal is generated by the ISP1161A1 internally. To select either EOT method, set the appropriate DMA configuration register (see Section 10.4.2 and Section 13.1.6). For example, for the HC, setting DMACounterSelect of the HcDMAConfiguration register (21H to read, A1H to write) to logic 1 will enable the DMA counter for DMA transfer. When the DMA counter reaches the value of the HcTransferCounter register, the internal EOT signal will be generated to terminate the DMA transfer. The ISP1161A1 supports either single-cycle DMA operation or burst mode DMA operation; see Figure 17 and Figure 18. DREQ DACK RD or WR D [15:0 ] data #1 data #2 data #N EOT 004aaa103 N = 1/2 byte count of transfer data. Fig 17. DMA transfer in single-cycle mode. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 17 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller DREQ DACK RD or WR D [15:0 ] data #1 data #K data #(K+1) data #2K data #(N-K+1) data #N EOT 004aaa104 N = 1/2 byte count of transfer data, K = number of cycles/burst. Fig 18. DMA transfer in burst mode. In both figures, the hardware is configured such that DREQ is active HIGH and DACK is active LOW. 8.6 Interrupts The ISP1161A1 has separate interrupt request pins for the USB HC (INT1) and the USB DC (INT2). 8.6.1 Pin configuration The interrupt output signals have four configuration modes: Mode 0 Level trigger, active LOW (default at power-up) Mode 1 Level trigger, active HIGH Mode 2 Edge trigger, active LOW Mode 3 Edge trigger, active HIGH. Figure 19 shows these four interrupt configuration modes. They are programmable via the HcHardwareConfiguration register (see Section 10.4.1), which is also used to disable or enable the signals. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 18 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller INT active clear or disable INT INT Mode 0 level triggered, active LOW INT active clear or disable INT INT Mode 1 level triggered, active HIGH INT active INT 166 ns Mode 2 edge triggered, active LOW INT active INT 166 ns MGT944 Mode 3 edge triggered, active HIGH Fig 19. Interrupt pin operating modes. 8.6.2 HC's interrupt output pin (INT1) To program the four configuration modes of the HC's interrupt output signal (INT1), set bits InterruptPinTrigger and InterruptOutputPolarity of the HcHardwareConfiguration register (20H to read, A0H to write). Bit InterruptPinEnable is used as the master enable setting for pin INT1. INT1 has many associated interrupt events, as shown as in Figure 20. The interrupt events of the HcPInterrupt register (24H to read, A4H to write) changes the status of pin INT1 when the corresponding bits of the HcPInterruptEnable register (25H to read, A5H to write) and pin INT1's global enable bit (InterruptPinEnable of the HcHardwareConfiguration register) are all set to enable status. However, events that come from the HcInterruptStatus register (03H to read, 83H to write) affect only bit OPR_Reg of the HcPInterrupt register. They cannot directly change the status of pin INT1. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 19 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller ClkReady OPR_Reg HCSuspended ATLInt SOFITLInt ClkReady OPR_Reg HcPInterruptEnable register AllEOTInterrupt MIE HCSuspended ATLInt HcInterruptEnable register AllEOTInterrupt SOFITLInt HcPInterrupt register RHSC FNO UE OR RD SF group 1 SO RHSC group 2 OR FNO HcHardwareConfiguration register UE RD SF LE INT1 LATCH SO InterruptPinEnable MGT945 HcInterruptStatus register Fig 20. HC interrupt logic. There are two groups of interrupts represented by group 1 and group 2 in Figure 20. A pair of registers control each group. Group 2 contains six possible interrupt events (recorded in the HcInterruptStatus register). On occurrence of any of these events, the corresponding bit would be set to logic 1; and if the corresponding bit in the HcInterruptEnable register is also logic 1, the 6-input OR gate would output a logic 1. This output is AND-ed with the value of MIE (bit 31 of HcInterruptEnable). Logic 1 at the AND gate will cause bit OPR in the HcPInterrupt register to be set to logic 1. Group 1 contains six possible interrupt events, one of which is the output of group 2 interrupt sources. The HcPInterrupt and HcPInterruptEnable registers work in the same way as the HcInterruptStatus and HcInterruptEnable registers in the interrupt group 2. The output from the 6-input OR gate is connected to a latch, which is controlled by InterruptPinEnable (bit 0 of the HcHardwareConfiguration register). In the event in which the software wishes to temporarily disable the interrupt output of the ISP1161A1 Host Controller, the following procedure should be followed: 1. Make sure that bit InterruptPinEnable in the HcHardwareConfiguration register is set to logic 1. 2. Clear all bits in the HcPInterrupt register. 3. Set bit InterruptPinEnable to logic 0. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 20 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller To re-enable the interrupt generation: 1. Set all bits in the HcPInterrupt register. 2. Set bit InterruptPinEnable to logic 1. Remark: Bit InterruptPinEnable in the HcHardwareConfiguration register latches the interrupt output. When this bit is set to logic 0, the interrupt output will remain unchanged, regardless of any operations on the interrupt control registers. If INT1 is asserted, and the HCD wishes to temporarily mask off the INT signal without clearing the HcPInterrupt register, the following procedure should be followed: 1. Make sure that bit InterruptPinEnable is set to logic 1. 2. Clear all bits in the HcPInterruptEnable register. 3. Set bit InterruptPinEnable to logic 0. To re-enable the interrupt generation: 1. Set all bits in the HcPInterruptEnable register according to the HCD requirements. 2. Set bit InterruptPinEnable to logic 1. 8.6.3 DC interrupt output pin (INT2) The four configuration modes of DC's interrupt output pin INT2 can also be programmed by setting bits INTPOL and INTLVL of the DcHardwareConfiguration register (BBH to read, BAH to write). Bit INTENA of the DcMode register (B9H to read, B8H to write) is used to enable pin INT2. Figure 21 shows the relationship between the interrupt events and pin INT2. Each of the indicated USB events is logged in a status bit of the DcInterrupt register. Corresponding bits in the DcInterruptEnable register determine whether or not an event will generate an interrupt. Interrupts can be masked globally by means of bit INTENA of the DcMode register (see Table 81). The active level and signalling mode of the INT output is controlled by bits INTPOL and INTLVL of the DcHardwareConfiguration register (see Table 83). Default settings after reset are active LOW and level mode. When pulse mode is selected, a pulse of 166 ns is generated when the OR-ed combination of all interrupt bits changes from logic 0 to logic 1. Bits RESET, RESUME, SP_EOT, EOT and SOF are cleared upon reading the DcInterrupt register. The endpoint bits (EP0OUT to EP14) are cleared by reading the associated DcEndpointStatus register. Bit BUSTATUS follows the USB bus status exactly, allowing the firmware to get the current bus status when reading the DcInterrupt register. SETUP and OUT token interrupts are generated after the DC has acknowledged the associated data packet. In bulk transfer mode, the DC will issue interrupts for every ACK received for an OUT token or transmitted for an IN token. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 21 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller In isochronous mode, an interrupt is issued upon each packet transaction. The firmware must take care of timing synchronization with the host. This can be done via the Pseudo Start-Of-Frame (PSOF) interrupt, enabled via bit IEPSOF in the DcInterruptEnable register. If a Start-Of-Frame is lost, PSOF interrupts are generated every 1 ms. This allows the firmware to keep data transfer synchronized with the host. After 3 missed SOF events, the DC will enter `suspend' state. An alternative way of handling isochronous data transfer is to enable both the SOF and the PSOF interrupts and disable the interrupt for each isochronous endpoint. DcInterrupt register RESET SUSPND RESUME SOF EP14 .. . .. . .. . ... EP0IN EP0OUT LATCH EOT INT2 LE DcMode register IERST IESUSP IERESM IESOF INTENA .. . IEP14 ... IEP0IN IEP0OUT IEEOT DcInterruptEnable register MGT946 Fig 21. DC interrupt logic. Interrupt control: Bit INTENA in the DcMode register is a global enable/disable bit. The behavior of this bit is given in Figure 22. A B C INT2 pin INTENA = 0 (during this time, an interrupt event occurs. For example, SOF asserted.) INTENA = 1 SOF asserted INTENA = 0 SOF asserted 004aaa198 Pin INT2: HIGH = de-assert; LOW = assert (individual interrupts are enabled). Fig 22. Behavior of bit INTENA. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 22 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Event A (see Figure 22): When an interrupt event occurs (for example, SOF interrupt) with bit INTENA set to logic 0, an interrupt will not be generated at pin INT2. However, it will be registered in the corresponding DcInterrupt register bit. Event B (see Figure 22): When bit INTENA is set to logic 1, pin INT2 is asserted because bit SOF in the DcInterrupt register is already asserted. Event C (see Figure 22): If the firmware sets bit INTENA to logic 0, pin INT2 will still be asserted. The bold dashed line shows the desired behavior of pin INT2. De-assertion of pin INT2 can be achieved in the following manner. Bits[23:8] of the DcInterrupt register are endpoint interrupts. These interrupts are cleared on reading their respective DcEndpointStatus register. Bits[7:0] of the DcInterrupt register are bus status and EOT interrupts that are cleared on reading the DcInterrupt register. Make sure that bit INTENA is set to logic 1 when you perform the clear interrupt commands. For more information on interrupt control, see Section 13.1.3, Section 13.1.5 and Section 13.3.6. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 23 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 9. USB host controller (HC) 9.1 HC's four USB states The ISP1161A1 USB HC has four USB states - USBOperational, USBReset, USBSuspend, and USBResume - that define the HC's USB signaling and bus states responsibilities. USBOperational USBReset write USBOperational write USBReset write USBOperational write USBResume USBReset USBSuspend write hardware or software reset USBResume write or remote wake-up USBReset write MGT947 USBSuspend Fig 23. ISP1161A1 HC USB states. The USB states are reflected in the HostControllerFunctionalState field of the HcControl register (01H to read, 81H to write), which is located at bits 7 and 6 of the register. The Host Controller Driver (HCD) can perform only the USB state transitions shown in Figure 23. Remark: The Software Reset in Figure 23 is not caused by the HcSoftwareReset command. It is caused by the HostControllerReset field of the HcCommandStatus register (02H to read, 82H to write). 9.2 Generating USB traffic USB traffic can be generated only when the ISP1161A1 USB HC is in the USBOperational state. Therefore, the HCD must set the HostControllerFunctionalState field of the HcControl register before generating USB traffic. A simplistic flow diagram showing when and how to generate USB traffic is shown in Figure 24. For more detail, refer to the USB Specification Revision 2.0 about the protocol and ISP1161A1 USB HC register usage. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 24 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Reset Exit no Initialize HC Entry HC state = USBOperational Need USB traffic? HC informs HCD of USB traffic results yes Prepare PTD data in P system RAM Transfer PTD data into HC FIFO buffer RAM HC performs USB transactions via USB bus I/F HC interprets PTD data MGT948 Fig 24. ISP1161A1 HC USB transaction loop. Description of Figure 24: 1. Reset This includes hardware reset by pin RESET and software reset by the HcSoftwareReset command (A9H). The reset function will clear all the HC's internal control registers to their reset status. After reset, the HCD must initialize the ISP1161A1 USB HC by setting some registers. 2. Initialize HC It includes: a. Setting the physical size for the HC's internal FIFO buffer RAM by setting the HcITLBufferLength register (2AH to read, AAH to write) and the HcATLBufferLength register (2BH to read, ABH to write) b. Setting the HcHardwareConfiguration register according to requirements c. Clearing interrupt events, if required d. Enabling interrupt events, if required e. Setting the HcFmInterval register (0DH to read, 8DH to write) f. Setting the HC's Root Hub registers g. Setting the HcControl register to move the HC into USBOperational state See also Section 9.5. 3. Entry The normal entry point. The microprocessor returns to this point when there are HC requests. 4. Need USB traffic USB devices need the HC to generate USB traffic when they have USB traffic requests such as: a. Connecting to or disconnecting from the downstream ports b. Issuing the Resume signal to the HC To generate USB traffic, the HCD must enter the USB transaction loop. 5. Prepare PTD data in microprocessor's system RAM The communication between the HCD and the ISP1161A1 HC is in the form of Philips Transfer Descriptor (PTD) data. The PTD data provides USB traffic information about the commands, status, and USB data packets. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 25 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller The physical storage media of PTD data for the HCD is the microprocessor's system RAM. For the ISP1161A1 HC, the storage media is the internal FIFO buffer RAM. The HCD prepares PTD data in the microprocessor system RAM for transfer to the ISP1161A1 HC internal FIFO buffer RAM. 6. Transfer PTD data into HC's FIFO buffer RAM When PTD data is ready in the microprocessor's system RAM, the HCD must transfer the PTD data from the microprocessor's system RAM into the ISP1161A1 internal FIFO buffer RAM. 7. HC interprets PTD data The HC determines what USB transactions are required based on the PTD data that has been transferred into the internal FIFO buffer RAM. 8. HC performs USB transactions via USB bus interface The HC performs the USB transactions with the specified USB device endpoint through the USB bus interface. 9. HC informs HCD of the USB traffic results The USB transaction status and the feedback from the specified USB device endpoint will be put back into the ISP1161A1 HC internal FIFO buffer RAM in PTD data format. The HCD can read back the PTD data from the internal FIFO buffer RAM. 9.3 PTD data structure The Philips Transfer Descriptor (PTD) data structure provides communication between the HCD and the ISP1161A1 USB HC. The PTD data contains information required by the USB traffic. PTD data consists of a PTD followed by its payload data, as shown in Figure 25. FIFO buffer RAM top PTD PTD data #1 payload data PTD PTD data #2 payload data PTD PTD data #N payload data bottom MGT949 Fig 25. PTD data in FIFO buffer RAM. The PTD data structure is used by the HC to define a buffer of data that will be moved to or from an endpoint in the USB device. This data buffer is set up for the current frame (1 ms frame) by the HCD. The payload data for every transfer in the frame must have a PTD as a header to describe the characteristics of the transfer. PTD data is DWORD (double-word or 4-byte) aligned. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 26 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 9.3.1 PTD data header definition The PTD forms the header of the PTD data. It tells the HC the transfer type, where the payload data should go, and the actual size of the payload data. A PTD is an 8 byte data structure that is very important for HCD programming. Table 4: Philips Transfer Descriptor (PTD): bit allocation Bit 7 6 5 Byte 0 Byte 1 Active EndpointNumber[3:0] Byte 4 Byte 7 1 0 Toggle ActualBytes[9:8] Last Speed MaxPacketSize[9:8] TotalBytes[7:0] reserved Format B5_5 reserved DirectionPID[1:0] TotalBytes[9:8] FunctionAddress[6:0] reserved (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data 2 MaxPacketSize[7:0] Byte 3 Byte 6 3 CompletionCode[3:0] Byte 2 Byte 5 4 ActualBytes[7:0] Rev. 03 -- 23 December 2004 27 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 5: Philips Transfer Descriptor (PTD): bit description Symbol Access Description ActualBytes[9:0] R/W Contains the number of bytes that were transferred for this PTD CompletionCode[3:0] R/W 0000 NoError General TD or isochronous data packet processing completed with no detected errors. 0001 CRC Last data packet from endpoint contained a CRC error. 0010 BitStuffing Last data packet from endpoint contained a bit stuffing violation. 0011 DataToggleMismatch Last packet from endpoint had data toggle PID that did not match the expected value. 0100 Stall TD was moved to the Done queue because the endpoint returned a STALL PID. 0101 DeviceNotResponding Device did not respond to token (IN) or did not provide a handshake (OUT). 0110 PIDCheckFailure Check bits on PID from endpoint failed on data PID (IN) or handshake (OUT) 0111 UnexpectedPID Received PID was not valid when encountered or PID value is not defined. 1000 DataOverrun The amount of data returned by the endpoint exceeded either the size of the maximum data packet allowed from the endpoint (found in the MaxPacketSize field of ED) or the remaining buffer size. 1001 DataUnderrun The endpoint returned is less than MaxPacketSize and that amount was not sufficient to fill the specified buffer. 1010 reserved - 1011 reserved - 1100 BufferOverrun During an IN, the HC received data from an endpoint faster than it could be written to system memory. 1101 BufferUnderrun During an OUT, the HC could not retrieve data from the system memory fast enough to keep up with the USB data rate. Active R/W Set to logic 1 by firmware to enable the execution of transactions by the HC. When the transaction associated with this descriptor is completed, the HC sets this bit to logic 0, indicating that a transaction for this element will not be executed when it is next encountered in the schedule. Toggle R/W Used to generate or compare the data PID value (DATA0 or DATA1). It is updated after each successful transmission or reception of a data packet. MaxPacketSize[9:0] R The maximum number of bytes that can be sent to or received from the endpoint in a single data packet. EndpointNumber[3:0] R USB address of the endpoint within the function. Last R Last PTD of a list (ITL or ATL). Logic 1 indicates that the PTD is the last PTD. Speed R Speed of the endpoint: 0 -- full speed 1 -- low speed TotalBytes[9:0] R Specifies the total number of bytes to be transferred with this data structure. For Bulk and Control only, this can be greater than MaxPacketSize. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 28 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 5: Philips Transfer Descriptor (PTD): bit description...continued Symbol Access Description DirectionPID[1:0] R 00 -- SETUP 01 -- OUT 10 -- IN 11 -- reserved B5_5 R/W This bit is logic 0 at power-on reset. When this feature is not used, software used for the ISP1161A1 is the same for the ISP1160 and the ISP1161. When this bit is set to logic 1 in this PTD for interrupt endpoint transfer, only one PTD USB transaction will be sent out in 1 ms. Format R The format of this data structure. If this is a Control, Bulk or Interrupt endpoint, then Format = 0. If this is an Isochronous endpoint, then Format = 1. FunctionAddress[6:0] R This is the USB address of the function containing the endpoint that this PTD refers to. 9.4 HC internal FIFO buffer RAM structure 9.4.1 Partitions According to the Universal Serial Bus Specification Rev. 2.0, there are four types of USB data transfers: Control, Bulk, Interrupt and Isochronous. The HC's internal FIFO buffer RAM has a physical size of 4 kbytes. This internal FIFO buffer RAM is used for transferring data between the microprocessor and USB peripheral devices. This on-chip buffer RAM can be partitioned into two areas: Acknowledged Transfer List (ATL) buffer and Isochronous (ISO) Transfer List (ITL) buffer. The ITL buffer is a Ping-Pong structured FIFO buffer RAM that is used to keep the payload data and their PTD header for Isochronous transfers. The ATL buffer is a non Ping-Pong structured FIFO buffer RAM that is used for the other three types of transfers. The ITL buffer can be further partitioned into ITL0 and ITL1 for the Ping-Pong structure. The ITL0 buffer and ITL1 buffer always have the same size. The microprocessor can put ISO data into either the ITL0 buffer or the ITL1 buffer. When the microprocessor accesses an ITL buffer, the HC can take over the other ITL buffer at the same time. This architecture improves the ISO transfer performance. The HCD can assign the logical size for the ATL buffer and ITL buffers at any time, but normally at initialization after power-on reset. This is done by setting the HcATLBufferLength register (2BH to read, ABH to write) and HcITLBufferLength register (2AH to read, AAH to write). The total buffer length cannot exceed the maximum RAM size of 4 kbytes (ATL buffer + ITL buffer). Figure 26 shows the partitions of the internal FIFO buffer RAM. When assigning buffer RAM sizes, follow this formula: ATL buffer length + 2 x (ITL buffer size) 1000H (that is, 4 kbytes) where: ITL buffer size = ITL0 buffer length = ITL1 buffer length The following assignments are examples of legal uses of the internal FIFO buffer RAM: * ATL buffer length = 800H, ITL buffer length = 400H. This is the maximum use of the internal FIFO buffer RAM. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 29 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller * ATL buffer length = 400H, ITL buffer length = 200H. This is insufficient use of the internal FIFO buffer RAM. * ATL buffer length = 1000H, ITL buffer length = 0H. This will use the internal FIFO buffer RAM for only ATL transfers. FIFO buffer RAM top ITL0 ISO_A ITL1 ISO_B ITL buffer programmable sizes ATL buffer ATL control/bulk/interrupt data not used bottom MGT950 4 kbytes Fig 26. HC internal FIFO buffer RAM partitions. The actual requirement for the buffer RAM need not reach the maximum size. You can make your selection based on your application. The following are some calculations of the ISO_A or ISO_B space for a frame of data: * Maximum number of useful data sent during one USB frame is 1280 bytes (20 ISO packets of 64 bytes). The total RAM size needed is: 20 x 8 + 1280 = 1440 bytes. * Maximum number of packets for different endpoints sent during one USB frame is 150 (150 ISO packets of 1 byte). The total RAM size needed is: 150 x 8 + 150 x 1 = 1350 bytes. * The Ping buffer RAM (ITL0) and the Pong buffer RAM (ITL1) have a maximum size of 2 kbytes each. All data needed for one frame can be stored in the Ping or the Pong buffer RAM. When the embedded system wants to initiate a transfer to the USB bus, the data needed for one frame is transferred to the ATL buffer or ITL buffer. The microprocessor detects the buffer status through the interrupt routines. When the HcBufferStatus register (2CH to read only) indicates that the buffer is empty, then the microprocessor writes data into the buffer. When the HcBufferStatus register indicates that the buffer is full, the data is ready on the buffer, and the microprocessor needs to read data from the buffer. During every 1 ms, there might be many events to generate interrupt requests to the microprocessor for data transfer or status retrieval. However, each of the interrupt types defined in this specification can be enabled or disabled by setting the HcPInterruptEnable register bits accordingly. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 30 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller The data transfer can be done via the PIO mode or the DMA mode. The data transfer rate can go up to 15 Mbyte/s. In the DMA operation, the single-cycle or multi-cycle burst modes are supported. Multi-cycle burst modes of 1, 4, or 8 cycles per burst is supported for the ISP1161A1. 9.4.2 Data organization PTD data is used for every data transfer between a microprocessor and the USB bus, and the PTD data resides in the buffer RAM. For an OUT or SETUP transfer, the payload data is placed just after the PTD, after which the next PTD is placed. For an IN transfer, RAM space is reserved for receiving a number of bytes that is equal to the total bytes of the transfer. After this, the next PTD and its payload data are placed (see Figure 27). Remark: The PTD is defined for both ATL and ITL type data transfers. For ITL, the PTD data is put into ITL buffer RAM, and the ISP1161A1 takes care of the Ping-Pong action for the ITL buffer RAM access. RAM buffer top 000H PTD of OUT transfer payload data of OUT transfer PTD of IN transfer empty space for IN total data PTD of OUT transfer payload data of OUT transfer bottom 7FFH MGT952 Fig 27. Buffer RAM data organization. The PTD data (PTD header and its payload data) is a structure of DWORD (doubleword or 4-byte) alignment. This means that the memory address is organized in blocks of 4 bytes. Therefore, the first byte of every PTD and the first byte of every payload data are located at an address which is a multiple of 4. Figure 28 illustrates an example in which the first payload data is 14 bytes long, meaning that the last byte of the payload data is at the location 15H. The next addresses (16H and 17H) are not multiples of 4. Therefore, the first byte of the next PTD will be located at the next multiple-of-four address, 18H. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 31 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller RAM buffer top 00H PTD (8 bytes) 08H payload data (14 bytes) 15H 18H PTD (8 bytes) 20H payload data MGT953 Fig 28. PTD data with DWORD alignment in buffer RAM. 9.4.3 Operation and C program example Figure 29 shows the block diagram for internal FIFO buffer RAM operations in the PIO mode. The ISP1161A1 provides one register as the access port for each buffer RAM. For the ITL buffer RAM, the access port is the ITLBufferPort register (40H to read, C0H to write). For the ATL buffer RAM, the access port is the ATLBufferPort register (41H to read, C1H to write). The buffer RAM is an array of bytes (8 bits) while the access port is a 16-bit register. Therefore, each read/write operation on the port accesses two consecutive memory locations, incrementing the pointer of the internal buffer RAM by two. The lower byte of the access port register corresponds to the data byte at the even location of the buffer RAM, and the upper byte corresponds to the next data byte at the odd location of the buffer RAM. Regardless of the number of data bytes to be transferred, the command code must be issued merely once, and it will be followed by a number of accesses of the data port (see Section 8.4). When the pointer of the buffer RAM reaches the value of the HcTransferCounter register, an internal EOT signal will be generated to set bit 2, AllEOTInterrupt, of the HcPInterrupt register and update the HcBufferStatus register, to indicate that the whole data transfer has been completed. For ITL buffer RAM, every Start Of Frame (SOF) signal (1 ms) will cause toggling between ITL0 and ITL1, but this depends on the buffer status. If both ITL0BufferFull and ITL1BufferFull of the HcBufferStatus register are already logic 1, meaning that both ITL0 and ITL1 buffer RAMs are full, the toggling will not happen. In this case, the microprocessor will always have access to ITL1. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 32 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 1 command port Host bus I/F Control registers data port Commands 0 Command register A0 22H/A2H TransferCounter EOT 24H/A4H PInterrupt 2 2CH BufferStatus = 40H/C0H ITLBufferPort 41H/C1H ATLBufferPort 0 1 internal EOT (16-bit width) toggle SOF T 000H 000H BufferStatus 000H Pointer automatically increments by 2 001H 001H 001H 3FFH 3FFH 7FFH ITL0 buffer RAM (8-bit width) ITL1 buffer RAM (8-bit width) ATL buffer RAM (8-bit width) MGT951 Fig 29. PIO access to internal FIFO buffer RAM. Following is an example of a C program that shows how to write data into the ATL buffer RAM. The total number of data bytes to be transferred is 80 (decimal) that will be set into the HcTransferCounter register as 50H. The data consists of four types of PTD data: 1. The first PTD header (IN) is 8 bytes, followed by 16 bytes of space reserved for its payload data; 2. The second PTD header (IN) is also 8 bytes, followed by 8 bytes of space reserved for its payload data; 3. The third PTD header (OUT) is 8 bytes, followed by 16 bytes of payload data with values beginning from 0H to FH incrementing by 1; 4. The fourth PTD header (OUT) is also 8 bytes, followed by 8 bytes of payload data with values beginning from 0H to EH incrementing by 2. In all PTDs, we have assigned device address as 5 and endpoint as 1. ActualBytes is always zero (0). TotalBytes equals the number of payload data bytes transferred, however, note that for bulk and control transfers, TotalBytes can be greater than MaxPacketSize. Table 6 shows the results after running this program. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 33 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller If communication with a peripheral USB device is desired, however, the device should be connected to the downstream port and pass enumeration. // The example program for writing ATL buffer RAM #include #include #include // Define register commands #define wHcTransferCounter 0x22 #define wHcuPInterrupt 0x24 #define wHcATLBufferLength 0x2b #define wHcBufferStatus 0x2c // Define I/O Port Address for HC #define HcDataPort 0x290 #define HcCmdPort 0x292 // Declare external functions to be used unsigned int HcRegRead(unsigned int wIndex); void HcRegWrite(unsigned int wIndex,unsigned int wValue); void main(void) { unsigned int i; unsigned int wCount,wData; // Prepare PTD data to be written into HC ATL buffer RAM: unsigned int PTDData[0x28]= { 0x0800,0x1010,0x0810,0x0005, // PTD header for IN token #1 // Reserved space for payload data of IN token #1 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0800,0x1008,0x0808,0x0005, // PTD header for IN token #2 // Reserved space for payload data of IN token #2 0x0000,0x0000,0x0000,0x0000, 0x0800,0x1010,0x0410,0x0005, // PTD header for OUT token #1 0x0100,0x0302,0x0504,0x0706, // Payload data for OUT token #1 0x0908,0x0b0a,0x0d0c,0x0f0e, 0x0800,0x1808,0x0408,0x0005, // PTD header for OUT token #2 0x0200,0x0604,0x0a08,0x0e0c // Payload data for OUT token #2 }; HcRegWrite(wHcuPInterrupt,0x04); // Clear EOT interrupt bit // HcRegWrite(wHcITLBufferLength,0x0); HcRegWrite(wHcATLBufferLength,0x1000); // RAM full use for ATL // Set the number of bytes to be transferred HcRegWrite(wHcTransferCounter,0x50); wCount = 0x28; // Get word count outport (HcCmdPort,0x00c1); // Command for ATL buffer write (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 34 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller // Write 80 (0x50) bytes of data into ATL buffer RAM for (i=0;i 5 ms 10 ms idle state K-state USB BUS > 3 ms INT_N suspend interrupt resume interrupt D GOSUSP B WAKEUP SUSPEND 004aaa359 0.5 ms to 3.5 ms 1.8 ms to 2.2 ms Fig 38. Suspend and resume timing. In Figure 38: * A: indicates the point at which the USB bus enters the idle state. * B: indicates resume condition, which can be a 20 ms K-state on the USB bus, a HIGH level on pin D_WAKEUP, or a LOW level on pin CS. * C: indicates remote wake-up. The ISP1161A1 will drive a K-state on the USB bus for 10 ms after pin D_WAKEUP goes HIGH or pin CS goes LOW. * D: after detecting the suspend interrupt, set and clear bit GOSUSP in the DcMode register. Powered-off application: Figure 39 shows a typical bus-powered modem application using the ISP1161A1. The SUSPEND output switches off power to the microcontroller and other external circuits during the suspend state. The ISP1161A1 DC is woken up through the USB bus (global resume) or by the ring detection circuit on the telephone line. VBUS VCC 8031 RST VBUS USB DP DM ISP1161A SUSPEND WAKEUP RING DETECTION LINE 004aaa674 Fig 39. SUSPEND and WAKEUP signals in a powered-off modem application. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 83 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 11.4.2 Resume conditions A wake-up from the suspend state is initiated either by the USB host or by the application: * USB host: drives a K-state on the USB bus (global resume) * Application: remote wake-up through a HIGH level on input WAKEUP or a LOW level on input CS, if enabled using bit WKUPCS in the DcHardwareConfiguration register. Wake-up on CS will work only if VBUS is present. The steps of a wake-up sequence are as follows: 1. The internal oscillator and the PLL multiplier are re-enabled. When stabilized, the clock signals are routed to all internal circuits of the ISP1161A1. 2. The SUSPEND output is deasserted, and bit RESUME in the DcInterrupt register is set. This will generate an interrupt if bit IERESM in the DcInterruptEnable register is set. 3. Maximum 15 ms after starting the wake-up sequence, the ISP1161A1 DC resumes its normal functionality. 4. In case of a remote wake-up, the ISP1161A1 DC drives a K-state on the USB bus for 10 ms. 5. Following the deassertion of output SUSPEND, the application restores itself and other system components to the normal operating mode. 6. After wake-up, the internal registers of the ISP1161A1 DC are write-protected to prevent corruption by inadvertent writing during power-up of external components. The firmware must send an Unlock Device command to the ISP1161A1 DC to restore its full functionality. 11.4.3 Control bits in suspend and resume Table 69: Summary of control bits Register Bit Function DcInterrupt SUSPND a transition from awake to the suspend state was detected BUSTATUS monitors USB bus status (logic 1 = suspend); used when interrupt is serviced RESUME a transition from suspend to the resume state was detected DcInterrupt Enable IESUSP enables output INT to signal the suspend state IERESM enables output INT to signal the resume state DcMode SOFTCT enables SoftConnect pull-up resistor to USB bus GOSUSP a HIGH-to-LOW transition enables the suspend state DcHardware Configuration EXTPUL selects internal (SoftConnect) or external pull-up resistor WKUPCS enables wake-up on LOW level of input CS PWROFF selects powered-off mode during the suspend state DcUnlock all sending data AA37H unlocks the internal registers for writing after a resume (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 84 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 12. DC DMA transfer Direct Memory Access (DMA) is a method to transfer data from one location to another in a computer system, without intervention of the Central Processor Unit (CPU). Many different implementations of DMA exist. The ISP1161A1 DC supports two methods: * 8237 compatible mode: based on the DMA subsystem of the IBM personal computers (PC, AT and all its successors and clones); this architecture uses the Intel 8237 DMA controller and has separate address spaces for memory and I/O * DACK-only mode: based on the DMA implementation in some embedded RISC processors, which has a single address space for both memory and I/O. The ISP1161A1's DC supports DMA transfer for all 14 configurable endpoints (see Table 66). Only one endpoint at a time can be selected for DMA transfer. The DMA operation of the ISP1161A1's DC can be interleaved with normal I/O mode access to other endpoints. The following features are supported: * Single-cycle or burst transfers (up to 16 bytes per cycle) * Programmable transfer direction (read or write) * Multiple End-Of-Transfer (EOT) sources: external pin, internal conditions, short/empty packet * Programmable signal levels on pins DREQ2 and EOT. 12.1 Selecting an endpoint for DMA transfer The target endpoint for DMA access is selected via bits EPDIX[3:0] in the DcDMAConfiguration register, as shown in Table 70. The transfer direction (read or write) is automatically set by bit EPDIR in the associated ECR, to match the selected endpoint type (OUT endpoint: read; IN endpoint: write). Asserting input DACK2 automatically selects the endpoint specified in the DcDMAConfiguration register, regardless of the current endpoint used for I/O mode access. Table 70: Endpoint selection for DMA transfer Endpoint identifier EPIDX[3:0] 1 2 Transfer direction EPDIR = 0 EPDIR = 1 0010 OUT: read IN: write 0011 OUT: read IN: write 3 0100 OUT: read IN: write 4 0101 OUT: read IN: write 5 0110 OUT: read IN: write 6 0111 OUT: read IN: write 7 1000 OUT: read IN: write 8 1001 OUT: read IN: write 9 1010 OUT: read IN: write (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 85 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 70: Endpoint selection for DMA transfer...continued Endpoint identifier EPIDX[3:0] 10 Transfer direction EPDIR = 0 EPDIR = 1 1011 OUT: read IN: write 11 1100 OUT: read IN: write 12 1101 OUT: read IN: write 13 1110 OUT: read IN: write 14 1111 OUT: read IN: write 12.2 8237 compatible mode The 8237 compatible DMA mode is selected by clearing bit DAKOLY in the DcHardwareConfiguration register (see Table 82). The pin functions for this mode are shown in Table 71. Table 71: 8237 compatible mode: pin functions Symbol Description I/O Function DREQ2 DC's DMA request O ISP1161A1's DC requests a DMA transfer DACK2 DC's DMA acknowledge I DMA controller confirms the transfer EOT end of transfer I DMA controller terminates the transfer RD read strobe I instructs the ISP1161A1's DC to put data on the bus WR write strobe I instructs the ISP1161A1's DC to get data from the bus The DMA subsystem of an IBM compatible PC is based on the Intel 8237 DMA controller. It operates as a `fly-by' DMA controller: the data is not stored in the DMA controller, but it is transferred between an I/O port and a memory address. A typical example of the ISP1161A1's DC in 8237 compatible DMA mode is given in Figure 40. The 8237 has two control signals for each DMA channel: DREQ (DMA Request) and DACK (DMA Acknowledge). General control signals are HRQ (Hold Request) and HLDA (Hold Acknowledge). The bus operation is controlled via MEMR (Memory read), MEMW (Memory write), IOR (I/O read) and IOW (I/O write). D0 to D15 RAM MEMR MEMW ISP1161A1 DEVICE CONTROLLER DMA CONTROLLER 8237 CPU DREQ2 DREQ HRQ HRQ DACK2 DACK HLDA HLDA RD IOR WR IOW 004aaa185 Fig 40. ISP1161A1's device controller in 8237 compatible DMA mode. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 86 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller The following example shows the steps which occur in a typical DMA transfer: 1. The ISP1161A1's DC receives a data packet in one of its endpoint FIFOs; the packet must be transferred to memory address 1234H. 2. The ISP1161A1's DC asserts the DREQ2 signal requesting the 8237 for a DMA transfer. 3. The 8237 asks the CPU to release the bus by asserting the HRQ signal. 4. After completing the current instruction cycle, the CPU places the bus control signals (MEMR, MEMW, IOR and IOW) and the address lines in three-state and asserts HLDA to inform the 8237 that it has control of the bus. 5. The 8237 now sets its address lines to 1234H and activates the MEMW and IOR control signals. 6. The 8237 asserts DACK to inform the ISP1161A1's DC that it will start a DMA transfer. 7. The ISP1161A1's DC now places the word to be transferred on the data bus lines, because its RD signal was asserted by the 8237. 8. The 8237 waits one DMA clock period and then de-asserts MEMW and IOR. This latches and stores the word at the desired memory location. It also informs the ISP1161A1's DC that the data on the bus lines has been transferred. 9. The ISP1161A1's DC de-asserts the DREQ2 signal to indicate to the 8237 that DMA is no longer needed. In Single cycle mode this is done after each word, in Burst mode following the last transferred word of the DMA cycle. 10. The 8237 de-asserts the DACK output indicating that the ISP1161A1's DC must stop placing data on the bus. 11. The 8237 places the bus control signals (MEMR, MEMW, IOR and IOW) and the address lines in three-state and de-asserts the HRQ signal, informing the CPU that it has released the bus. 12. The CPU acknowledges control of the bus by de-asserting HLDA. After activating the bus control lines (MEMR, MEMW, IOR and IOW) and the address lines, the CPU resumes the execution of instructions. For a typical bulk transfer the above process is repeated, once for each byte. After each byte the address register in the DMA controller is incremented and the byte counter is decremented. When using 16-bit DMA the number of transfers is 32, and address incrementing and byte counter decrementing is done by 2 for each word. 12.3 DACK-only mode The DACK-only DMA mode is selected by setting bit DAKOLY in the DcHardwareConfiguration register (see Table 82). The pin functions for this mode are shown in Table 72. A typical example of the ISP1161A1's DC in DACK-only DMA mode is given in Figure 41. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 87 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 72: DACK-only mode: pin functions Symbol Description I/O Function DREQ2 DC's DMA request O ISP1161A1 DC requests a DMA transfer DACK2 DC's DMA acknowledge I DMA controller confirms the transfer; also functions as data strobe EOT End-Of-Transfer I DMA controller terminates the transfer RD read strobe I not used WR write strobe I not used In the DACK-only mode, the ISP1161A1's DC uses the DACK2 signal as a data strobe. Input signals RD and WR are ignored. This mode is used in CPU systems that have a single address space for memory and I/O access. Such systems have no separate MEMW and MEMR signals: the RD and WR signals are also used as memory data strobes. ISP1161A1 DEVICE CONTROLLER DMA CONTROLLER DREQ2 DREQ DACK2 DACK D0 to D15 RAM CPU HRQ HRQ HLDA HLDA RD WR 004aaa186 Fig 41. ISP1161A1's device controller in DACK-only DMA mode. 12.4 End-Of-Transfer conditions 12.4.1 Bulk endpoints A DMA transfer to/from a bulk endpoint can be terminated by any of the following conditions (bit names refer to the DcDMAConfiguration register, see Table 86): * An external End-Of-Transfer signal occurs on input EOT * The DMA transfer completes as programmed in the DcDMACounter register (CNTREN = 1) * A short packet is received on an enabled OUT endpoint (SHORTP = 1) * DMA operation is disabled by clearing bit DMAEN. External EOT: When reading from an OUT endpoint, an external EOT will stop the DMA operation and clear any remaining data in the current FIFO. For a doublebuffered endpoint the other (inactive) buffer is not affected. When writing to an IN endpoint, an EOT will stop the DMA operation and the data packet in the FIFO (even if it is smaller than the maximum packet size) will be sent to the USB host at the next IN token. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 88 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller DcDMACounter register: An EOT from the DcDMACounter register is enabled by setting bit CNTREN in the DcDMAConfiguration register. The ISP1161A1 has a 16-bit DcDMACounter register, which specifies the number of bytes to be transferred. When DMA is enabled (DMAEN = 1), the internal DMA counter is loaded with the value from the DcDMACounter register. When the internal counter completes the transfer as programmed in the DcDMACounter, an EOT condition is generated and the DMA operation stops. Short packet: Normally, the transfer byte count must be set via a control endpoint before any DMA transfer takes place. When a short packet has been enabled as EOT indicator (SHORTP = 1), the transfer size is determined by the presence of a short packet in the data. This mechanism permits the use of a fully autonomous data transfer protocol. When reading from an OUT endpoint, reception of a short packet at an OUT token will stop the DMA operation after transferring the data bytes of this packet. Table 73: Summary of EOT conditions for a bulk endpoint EOT condition OUT endpoint IN endpoint EOT input EOT is active EOT is active DcDMACounter register transfer completes as programmed in the DcDMACounter register transfer completes as programmed in the DcDMACounter register Short packet short packet is received and transferred counter reaches zero in the middle of the buffer Bit DMAEN in DMAEN = 0[1] DcDMAConfiguration register [1] 12.4.2 DMAEN = 0[1] The DMA transfer stops. However, no interrupt is generated. Isochronous endpoints A DMA transfer to/from an isochronous endpoint can be terminated by any of the following conditions (bit names refer to the DcDMAConfiguration register, see Table 86): * An external End-Of-Transfer signal occurs on input EOT * The DMA transfer completes as programmed in the DcDMACounter register (CNTREN = 1) * An End-Of-Packet (EOP) signal is detected * DMA operation is disabled by clearing bit DMAEN. Table 74: Recommended EOT usage for isochronous endpoints EOT condition OUT endpoint IN endpoint EOT input active do not use preferred DMA Counter register zero do not use preferred End-Of-Packet preferred do not use (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 89 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 13. DC commands and registers The functions and registers of the ISP1161A1's DC are accessed via commands, which consist of a command code followed by optional data bytes (read or write action). An overview of the available commands and registers is given in Table 75. A complete access consists of two phases: 1. Command phase: when address bit A0 = 1, the DC interprets the data on the lower byte of the bus (bits D7 to D0) as a command code. Commands without a data phase are executed immediately. 2. Data phase (optional): when address bit A0 = 0, the DC transfers the data on the bus to or from a register or endpoint FIFO. Multi-byte registers are accessed least significant byte/word first. As the ISP1161A1 DC's data bus is 16 bits wide: * The upper byte (bits D15 to D8) in command phase, or the undefined byte in data phase and is ignored. * The access of registers is word-aligned: byte access is not allowed. * If the packet length is odd, the upper byte of the last word in an IN endpoint buffer is not transmitted to the host. When reading from an OUT endpoint buffer, the upper byte of the last word must be ignored by the firmware. The packet length is stored in the first 2 bytes of the endpoint buffer. Table 75: DC command and register summary Destination Code (Hex) Transaction[1] Reference Write Control OUT Configuration DcEndpointConfiguration register endpoint 0 OUT 20 write 1 word Section 13.1.1 on page 92 Write Control IN Configuration DcEndpointConfiguration register endpoint 0 IN 21 write 1 word Write Endpoint DcEndpointConfiguration n Configuration (n = 1 to 14) register endpoint 1 to 14 22 to 2F write 1 word Read Control OUT Configuration DcEndpointConfiguration register endpoint 0 OUT 30 read 1 word Read Control IN Configuration DcEndpointConfiguration register endpoint 0 IN 31 read 1 word Read Endpoint DcEndpointConfiguration n Configuration (n = 1 to 14) register endpoint 1 to 14 32 to 3F read 1 word Write/Read Device Address DcAddress register B6/B7 write/read 1 word Section 13.1.2 on page 93 Write/Read Mode register DcMode register B8/B9 write/read 1 word Section 13.1.3 on page 94 Write/Read Hardware Configuration DcHardwareConfiguration register BA/BB write/read 1 word Section 13.1.4 on page 94 Write/Read DcInterruptEnable register DcInterruptEnable register C2/C3 write/read 2 words Section 13.1.5 on page 96 Write/Read DMA Configuration DcDMAConfiguration register F0/F1 write/read 1 word Section 13.1.6 on page 97 Name Initialization commands (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 90 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 75: DC command and register summary...continued Name Destination Code (Hex) Transaction[1] Reference Write/Read DMA Counter DcDMACounter register F2/F3 write/read 1 word Section 13.1.7 on page 98 Reset Device resets all registers F6 - Section 13.1.8 on page 99 Section 13.2.1 on page 99 Data flow commands Write Control OUT Buffer illegal: endpoint is read-only (00) - Write Control IN Buffer FIFO endpoint 0 IN 01 N 64 bytes Write Endpoint n Buffer (n = 1 to 14) FIFO endpoint 1 to 14 (IN endpoints only) 02 to 0F isochronous: N 1023 bytes interrupt/bulk: N 64 bytes 10 N 64 bytes Read Control OUT Buffer FIFO endpoint 0 OUT Read Control IN Buffer illegal: endpoint is write-only (11) - Read Endpoint n Buffer (n = 1 to 14) FIFO endpoint 1 to 14 (OUT endpoints only) isochronous: N 1023 bytes[6] 12 to 1F interrupt/bulk: N 64 bytes Stall Control OUT Endpoint Endpoint 0 OUT 40 Stall Control IN Endpoint Endpoint 0 IN 41 - Stall Endpoint n (n = 1 to 14) Endpoint 1 to 14 42 to 4F - Read Control OUT Status DcEndpointStatus register endpoint 0 OUT 50 read 1 word Read Control IN Status DcEndpointStatus register endpoint 0 IN 51 read 1 word Read Endpoint n Status (n = 1 to 14) DcEndpointStatus register n 52 to 5F endpoint 1 to 14 read 1 word Validate Control OUT Buffer illegal: IN endpoints only[2] (60) - IN[2] - Validate Control IN Buffer FIFO endpoint 0 61 none Validate Endpoint n Buffer (n = 1 to 14) FIFO endpoint 1 to 14 (IN endpoints only)[2] 62 to 6F none Clear Control OUT Buffer FIFO endpoint 0 OUT 70 none Clear Control IN Buffer illegal[3] (71) - Clear Endpoint n Buffer (n = 1 to 14) FIFO endpoint 1 to 14 (OUT endpoints only)[3] 72 to 7F none Unstall Control OUT Endpoint Endpoint 0 OUT 80 - Unstall Control IN Endpoint Endpoint 0 IN 81 - Unstall Endpoint n (n = 1 to 14) Endpoint 1 to 14 82 to 8F - Check Control OUT Status[4] DcEndpointStatusImage register endpoint 0 OUT D0 read 1 word Check Control IN Status[4] DcEndpointStatusImage register endpoint 0 IN D1 read 1 word Check Endpoint n Status (n = 1 to 14)[4] DcEndpointStatusImage register n endpoint 1 to 14 D2 to DF read 1 word Section 13.2.4 on page 102 Section 13.2.5 on page 102 Section 13.2.3 on page 101 Section 13.2.6 on page 102 (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Section 13.2.2 on page 100 Rev. 03 -- 23 December 2004 91 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 75: DC command and register summary...continued Name Destination Code (Hex) Transaction[1] Reference Acknowledge Setup Endpoint 0 IN and OUT F4 none Section 13.2.7 on page 103 Read Control OUT Error Code DcErrorCode register endpoint 0 OUT A0 read 1 word [5] Section 13.3.1 on page 103 Read Control IN Error Code DcErrorCode register endpoint 0 IN A1 read 1 word [5] Read Endpoint n Error Code DcErrorCode register (n = 1 to 14) endpoint 1 to 14 A2 to AF read 1 word [5] Unlock Device all registers with write access B0 write 1 word Section 13.3.2 on page 104 Write/Read Scratch register DcScratch register B2/B3 write/read 1 word Section 13.3.3 on page 105 Read Frame Number DcFrameNumber register B4 read 1 word Section 13.3.4 on page 105 Read Chip ID DcChipID register B5 read 1 word Section 13.3.5 on page 106 Read Interrupt register DcInterrupt register C0 read 2 words Section 13.3.6 on page 107 General commands [1] [2] [3] [4] [5] [6] With N representing the number of bytes, the number of words for 16-bit bus width is: (N + 1)/2. Validating an OUT endpoint buffer causes unpredictable behavior of the ISP1161A1's DC. Clearing an IN endpoint buffer causes unpredictable behavior of the ISP1161A1's DC. Reads a copy of the Status register: executing this command does not clear any status bits or interrupt bits. When accessing an 8-bit register in 16-bit mode, the upper byte is invalid. During isochronous transfer in 16-bit mode, because N 1023, the firmware must take care of the upper byte. 13.1 Initialization commands Initialization commands are used during the enumeration process of the USB network. These commands are used to configure and enable the embedded endpoints. They also serve to set the USB assigned address of the ISP1161A1's DC and to perform a device reset. 13.1.1 DcEndpointConfiguration register (R/W: 30H-3FH/20H-2FH) This command is used to access the Endpoint Configuration register (ECR) of the target endpoint. It defines the endpoint type (isochronous or bulk/interrupt), direction (OUT/IN), FIFO size and buffering scheme. It also enables the endpoint FIFO. The register bit allocation is shown in Table 76. A bus reset will disable all endpoints. The allocation of FIFO memory only takes place after all 16 endpoints have been configured in sequence (from endpoint 0 OUT to endpoint 14). Although the control endpoints have fixed configurations, they must be included in the initialization sequence and be configured with their default values (see Table 66). Automatic FIFO allocation starts when endpoint 14 has been configured. Remark: If any change is made to an endpoint configuration which affects the allocated memory (size, enable/disable), the FIFO memory contents of all endpoints becomes invalid. Therefore, all valid data must be removed from enabled endpoints before changing the configuration. Code (Hex): 20 to 2F -- write (control OUT, control IN, endpoint 1 to 14) Code (Hex): 30 to 3F -- read (control OUT, control IN, endpoint 1 to 14) (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 92 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Transaction -- write/read 1 word Table 76: DcEndpointConfiguration register: bit allocation Bit Symbol Reset Access 7 6 5 4 FIFOEN EPDIR DBLBUF FFOISO 3 2 1 0 FFOSZ[3:0] 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W Table 77: 13.1.2 DcEndpointConfiguration register: bit description Bit Symbol Description 7 FIFOEN A logic 1 indicates an enabled FIFO with allocated memory. A logic 0 indicates a disabled FIFO (no bytes allocated). 6 EPDIR This bit defines the endpoint direction (0 = OUT, 1 = IN); it also determines the DMA transfer direction (0 = read, 1 = write). 5 DBLBUF A logic 1 indicates that this endpoint has double buffering. 4 FFOISO A logic 1 indicates an isochronous endpoint. A logic 0 indicates a bulk or interrupt endpoint. 3 to 0 FFOSZ[3:0] Selects the FIFO size according to Table 67 DcAddress register (R/W: B7H/B6H) This command is used to set the USB assigned address in the DcAddress register and enable the USB device. The DcAddress register bit allocation is shown in Table 78. A USB bus reset sets the device address to 00H (internally) and enables the device. The value of the DcAddress register (accessible by the microcontroller) is not altered by the bus reset. In response to the standard USB request, Set Address, the firmware must issue a Write Device Address command, followed by sending an empty packet to the host. The new device address is activated when the host acknowledges the empty packet. Code (Hex): B6/B7 -- write/read DcAddress register Transaction -- write/read 1 word Table 78: DcAddress register: bit allocation Bit Symbol Reset Access 7 6 5 4 0 0 0 0 R/W R/W R/W R/W DEVEN 3 2 1 0 0 0 0 0 R/W R/W R/W R/W DEVADR[6:0] Table 79: DcAddress register: bit description Bit Symbol Description 7 DEVEN A logic 1 enables the device. 6 to 0 DEVADR[6:0] This field specifies the USB device address. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 93 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 13.1.3 DcMode register (R/W: B9H/B8H) This command is used to access the ISP1161A1's DcMode register, which consists of 1 byte (for bit allocation: see Table 79). In 16-bit bus mode the upper byte is ignored. The DcMode register controls the DMA bus width, resume and suspend modes, interrupt activity and SoftConnect operation. It can be used to enable debug mode, where all errors and Not Acknowledge (NAK) conditions will generate an interrupt. Code (Hex): B8/B9 -- write/read Mode register Transaction -- write/read 1 word Table 80: DcMode register: bit allocation Bit 7 6 5 4 3 2 1 0 DMAWD reserved GOSUSP reserved INTENA DBGMOD reserved SOFTCT Reset 0[1] 0 0 0 0[1] 0[1] 0[1] 0[1] Access R/W R/W R/W R/W R/W R/W R/W R/W Symbol [1] Unchanged by a bus reset. Table 81: 13.1.4 DcMode register: bit description Bit Symbol Description 7 DMAWD A logic 1 selects 16-bit DMA bus width (bus configuration modes 0 and 2). A logic 0 selects 8-bit DMA bus width. Bus reset value: unchanged. 6 - reserved 5 GOSUSP Writing a logic 1 followed by a logic 0 will activate `suspend' mode. 4 - reserved 3 INTENA A logic 1 enables all DC interrupts. Bus reset value: unchanged; for details, see Section 8.6.3. 2 DBGMOD A logic 1 enables debug mode where all NAKs and errors will generate an interrupt. A logic 0 selects normal operation, where interrupts are generated on every ACK (bulk endpoints) or after every data transfer (isochronous endpoints). Bus reset value: unchanged. 1 - reserved 0 SOFTCT A logic 1 enables SoftConnect (see Section 7.5). This bit is ignored if EXTPUL = 1 in the DcHardwareConfiguration register (see Table 82). Bus reset value: unchanged. DcHardwareConfiguration register (R/W: BBH/BAH) This command is used to access the DcHardwareConfiguration register, which consists of 2 bytes. The first (lower) byte contains the device configuration and control values, the second (upper) byte holds the clock control bits and the clock division factor. The bit allocation is given in Table 82. A bus reset will not change any of the programmed bit values. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 94 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller The DcHardwareConfiguration register controls the connection to the USB bus, clock activity and power supply during `suspend' state, output clock frequency, DMA operating mode and pin configurations (polarity, signalling mode). Code (Hex): BA/BB -- write/read DcHardwareConfiguration register Transaction -- write/read 1 word Table 82: DcHardwareConfiguration register: bit allocation Bit Symbol Reset Access Bit Symbol Reset Access 15 14 13 12 11 10 reserved EXTPUL NOLAZY CLKRUN 0 0 1 R/W R/W 7 0 0 0 1 1 R/W R/W R/W R/W R/W R/W 6 5 4 3 2 1 0 DAKOLY DRQPOL DAKPOL EOTPOL WKUPCS PWROFF INTLVL INTPOL 0 1 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W Table 83: 8 CLKDIV[3:0] DcHardwareConfiguration register: bit description Bit Symbol Description 15 - reserved 14 EXTPUL A logic 1 indicates that an external 1.5 k pull-up resistor is used on pin D+ and that SoftConnect is not used. Bus reset value: unchanged. 13 NOLAZY A logic 1 disables output on pin CLKOUT of the LazyClock frequency (100 kHz 50 %) during `suspend' state. A logic 0 causes pin CLKOUT to switch to LazyClock output after approximately 2 ms delay, following the setting of bit GOSUSP in the DcMode register. Bus reset value: unchanged. 12 CLKRUN A logic 1 indicates that the internal clocks are always running, even during `suspend' state. A logic 0 switches off the internal oscillator and PLL, when they are not needed. During `suspend' state this bit must be made logic 0 to meet the suspend current requirements. The clock is stopped after a delay of approximately 2 ms, following the setting of bit GOSUSP in the DcMode register. Bus reset value: unchanged. 11 to 8 CLKDIV[3:0] This field specifies the clock division factor N, which controls the clock frequency on output CLKOUT. The output frequency in MHz is given by 48 / (N + 1). The clock frequency range is 3 MHz to 48 MHz (N = 0 to 15) with a reset value of 12 MHz (N = 3). The hardware design guarantees no glitches during frequency change. Bus reset value: unchanged. 7 DAKOLY A logic 1 selects DACK-only DMA mode. A logic 0 selects 8237 compatible DMA mode. Bus reset value: unchanged. 6 DRQPOL Selects DREQ2 pin signal polarity (0 = active LOW, 1 = active HIGH). Bus reset value: unchanged. 5 DAKPOL Selects DACK2 pin signal polarity (0 = active LOW). Bus reset value: unchanged. 4 EOTPOL Selects EOT pin signal polarity (0 = active LOW, 1 = active HIGH). Bus reset value: unchanged. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data 9 Rev. 03 -- 23 December 2004 95 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 83: 13.1.5 DcHardwareConfiguration register: bit description...continued Bit Symbol Description 3 WKUPCS A logic 1 enables remote wake-up via a LOW level on input pin CS (VBUS must be present for wake-up on CS). Bus reset value: unchanged. 2 PWROFF A logic 1 enables powering-off during `suspend' state. Output D_SUSPEND pin is configured as a power switch control signal for external devices (HIGH during `suspend'). This value should always be initialized to logic 1. Bus reset value: unchanged. 1 INTLVL Selects the interrupt signalling mode on output pin INT2 (0 = level, 1 = pulsed). In pulsed mode an interrupt produces an 166 ns pulse. See Section 8.6.3 for details. Bus reset value: unchanged. 0 INTPOL Selects INT2 pin signal polarity (0 = active LOW, 1 = active HIGH). Bus reset value: unchanged. DcInterruptEnable register (R/W: C3H/C2H) This command is used to individually enable or disable interrupts from all endpoints, as well as interrupts caused by events on the USB bus (SOF, SOF lost, EOT, suspend, resume, reset). That is, if an interrupt event occurs while the interrupt is not enabled, nothing will be seen on the interrupt pin. Even if you then enable the interrupt during the interrupt event, there will still be no interrupt seen on the interrupt pin, see Figure 42. The DcInterrupt register will not register any interrupt, if it is not already enabled using the DcInterruptEnable register. The DcInterruptEnable register is not an Interrupt Mask register. DcInterruptEnable register disabled DcInterruptEnable register enabled interrupt is cleared INT2 pin interrupt event occurs interrupt event occurs 004aaa197 Pin INT2: HIGH = de-assert; LOW = assert; INTENA = 1. Fig 42. Interrupt pin waveform. A bus reset will not change any of the programmed bit values. The command accesses the DcInterruptEnable register, which consists of 4 bytes. The bit allocation is given in Table 84. Remark: For details on interrupt control, see Section 8.6.3. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 96 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Code (Hex): C2/C3 -- write/read DcInterruptEnable register Transaction -- write/read 2 words Table 84: DcInterruptEnable register: bit allocation Bit 31 30 29 28 Symbol 00H Access R/W Symbol Reset Access Bit Symbol Reset Access Bit Symbol Reset Access 26 25 24 reserved Reset Bit 27 23 22 21 20 19 18 17 16 IEP14 IEP13 IEP12 IEP11 IEP10 IEP9 IEP8 IEP7 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W 15 14 13 12 11 10 9 8 IEP6 IEP5 IEP4 IEP3 IEP2 IEP1 IEP0IN IEP0OUT 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W 7 6 5 4 3 2 1 0 reserved SP_IEEOT IEPSOF IESOF IEEOT IESUSP IERESM IERST 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W Table 85: 13.1.6 DcInterruptEnable register: bit description Bit Symbol Description 31 to 24 - reserved; must write logic 0 23 to 10 IEP14 to IEP1 A logic 1 enables interrupts from the indicated endpoint. 9 IEP0IN A logic 1 enables interrupts from the control IN endpoint. 8 IEP0OUT A logic 1 enables interrupts from the control OUT endpoint. 7 - reserved 6 SP_IEEOT A logic 1 enables interrupt upon detection of a short packet. 5 IEPSOF A logic 1 enables 1 ms interrupts upon detection of Pseudo SOF. 4 IESOF A logic 1 enables interrupt upon SOF detection. 3 IEEOT A logic 1 enables interrupt upon EOT detection. 2 IESUSP A logic 1 enables interrupt upon detection of `suspend' state. 1 IERESM A logic 1 enables interrupt upon detection of a `resume' state. 0 IERST A logic 1 enables interrupt upon detection of a bus reset. DcDMAConfiguration register (R/W: F1H/F0H) This command defines the DMA configuration of the ISP1161A1's DC and enables/disables DMA transfers. The command accesses the DcDMAConfiguration register, which consists of 2 bytes. The bit allocation is given in Table 86. A bus reset will clear bit DMAEN (DMA disabled), all other bits remain unchanged. Code (Hex): F0/F1 -- write/read DMA Configuration Transaction -- write/read 1 word (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 97 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 86: DcDMAConfiguration register: bit allocation Bit 15 14 13 12 11 10 9 8 CNTREN SHORTP reserved reserved reserved reserved reserved ODD_ EVEN_IND Reset 0[1] 0[1] 0[1] 0[1] 0[1] 0[1] 0[1] 0 Access R/W R/W R/W R/W R/W R/W R/W R 7 6 5 4 3 2 1 0 DMAEN reserved Reset 0[1] 0[1] 0[1] 0[1] 0 Access R/W R/W R/W R/W R/W Symbol Bit Symbol [1] EPDIX[3:0] BURSTL[1:0] 0 0[1] 0[1] R/W R/W R/W Unchanged by a bus reset. Table 87: DcDMAConfiguration register: bit description Bit Symbol Description 15 CNTREN A logic 1 enables the generation of an EOT condition, when the DMA Counter register reaches zero. Bus reset value: unchanged. 14 SHORTP A logic 1 enables short/empty packet mode. When receiving (OUT endpoint) a short/empty packet an EOT condition is generated. When transmitting (IN endpoint), this bit should be cleared. Bus reset value: unchanged. 13 to 9 - reserved 8 ODD_EVEN_ IND This bit is logic 0 when the last DMA access is a byte (LSB byte valid; MSB byte invalid). This bit is logic 1 when the last DMA access is a word (LSB byte valid; MSB byte invalid). 7 to 4 EPDIX[3:0] Indicates the destination endpoint for DMA, see Table 70. 3 DMAEN Writing a logic 1 enables DMA transfer, a logic 0 forces the end of an ongoing DMA transfer. Reading this bit indicates whether DMA is enabled (0 = DMA stopped, 1 = DMA enabled). This bit is cleared by a bus reset. 2 - reserved 1 to 0 BURSTL[1:0] Selects the DMA burst length: 00 -- single-cycle mode (1 byte) 01 -- burst mode (4 bytes) 10 -- burst mode (8 bytes) 11 -- burst mode (16 bytes). Bus reset value: unchanged. For selecting an endpoint for device DMA transfer, see Section 11.2. 13.1.7 DcDMACounter register (R/W: F3H/F2H) This command accesses the DcDMACounter register. The bit allocation is given in Table 88. Writing to the register sets the number of bytes for a DMA transfer. Reading the register returns the number of remaining bytes in the current transfer. A bus reset will not change the programmed bit values. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 98 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller The internal DMA counter is automatically reloaded from the DcDMACounter register when DMA is re-enabled (DMAEN = 1). See Section 13.1.6 for more details. Code (Hex): F2/F3 -- write/read DcDMACounter register Transaction -- write/read 1 word Table 88: DcDMACounter register: bit allocation Bit 15 14 13 12 Symbol 11 Reset 00H Access R/W Bit 10 9 8 2 1 0 DMACR[15:8] 7 6 5 4 Symbol 3 DMACR[7:0] Reset 00H Access R/W Table 89: 13.1.8 DcDMACounter register: bit description Bit Symbol Description 15 to 0 DMACR[15:0] DMA Counter register Reset Device (F6H) This command resets the ISP1161A1 DC in the same way as an external hardware reset via input RESET. All registers are initialized to their `reset' values. Code (Hex): F6 -- reset the device Transaction -- none 13.2 Data flow commands Data flow commands are used to manage the data transmission between the USB endpoints and the system microprocessor. Much of the data flow is initiated via an interrupt to the microprocessor. The data flow commands are used to access the endpoints and determine whether the endpoint FIFOs contain valid data. Remark: The IN buffer of an endpoint contains input data for the host, the OUT buffer receives output data from the host. 13.2.1 Write/Read Endpoint Buffer (R/W: 10H,12H-1FH/01H-0FH) This command is used to access endpoint FIFO buffers for reading or writing. First, the buffer pointer is reset to the beginning of the buffer. Following the command, a maximum of (M + 1) words can be written or read, with M given by (N + 1)/2, N representing the size of the endpoint buffer. After each read/write action the buffer pointer is automatically incremented by 2. In DMA access, the first word (the packet length) is skipped: transfers start at the second word of the endpoint buffer. When reading, the ISP1161A1 DC can detect the last word via the End of Packet (EOP) condition. When writing to a bulk/interrupt endpoint, the endpoint buffer must be completely filled before sending the data to the host. Exception: when a DMA transfer is stopped by an external EOT condition, the current buffer content (full or not) is sent to the host. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 99 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Remark: Reading data after a Write Endpoint Buffer command or writing data after a Read Endpoint Buffer command will cause unpredictable behavior of the ISP1161A1 DC. Code (Hex): 01 to 0F -- write (control IN, endpoint 1 to 14) Code (Hex): 10, 12 to 1F -- read (control OUT, endpoint 1 to 14) Transaction -- write/read maximum (M + 1) words (isochronous endpoint: N 1023, bulk/interrupt endpoint: N 32) The data in the endpoint FIFO must be organized as shown in Table 90. An example of endpoint FIFO access is given Table 91. Table 90: Endpoint FIFO organization Word # Description 0 (lower byte) packet length (lower byte) 0 (upper byte) packet length (upper byte) 1 (lower byte) data byte 1 1 (upper byte) data byte 2 : : M = (N + 1)/2 data byte N Table 91: Example of endpoint FIFO access A0 Phase Bus lines Word # Description 1 command D[7:0] - command code (00H to 1FH) D[15:8] - ignored 0 data D[15:0] 0 packet length 0 data D[15:0] 1 data word 1 (data byte 2, data byte 1) 0 data D[15:0] 2 data word 2 (data byte 4, data byte 3) : : : : : Remark: There is no protection against writing or reading past a buffer's boundary or against writing into an OUT buffer or reading from an IN buffer. Any of these actions could cause an incorrect operation. Data residing in an OUT buffer are only meaningful after a successful transaction. Exception: during DMA access of a double-buffered endpoint, the buffer pointer automatically points to the secondary buffer after reaching the end of the primary buffer. 13.2.2 DcEndpointStatus register (R: 50H-5FH) This command is used to read the status of an endpoint FIFO. The command accesses the DcEndpointStatus register, the bit allocation of which is shown in Table 92. Reading the DcEndpointStatus register will clear the interrupt bit set for the corresponding endpoint in the DcInterrupt register (see Table 108). All bits of the DcEndpointStatus register are read-only. Bit EPSTAL is controlled by the Stall/Unstall commands and by the reception of a SETUP token (see Section 13.2.3). Code (Hex): 50 to 5F -- read (control OUT, control IN, endpoint 1 to 14) Transaction -- read 1 word (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 100 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 92: DcEndpointStatus register: bit allocation Bit Symbol 7 6 5 4 3 2 1 0 EPSTAL EPFULL1 EPFULL0 DATA_PID OVER WRITE SETUPT CPUBUF reserved Reset 0 0 0 0 0 0 0 0 Access R R R R R R R R Table 93: DcEndpointStatus register: bit description Bit Symbol Description 7 EPSTAL This bit indicates whether the endpoint is stalled or not (1 = stalled, 0 = not stalled). Set to logic 1 by a Stall Endpoint command and cleared to logic 0 by an Unstall Endpoint command. The endpoint is automatically unstalled upon reception of a SETUP token. 6 EPFULL1 A logic 1 indicates that the secondary endpoint buffer is full. 5 EPFULL0 A logic 1 indicates that the primary endpoint buffer is full. 4 DATA_PID This bit indicates the data PID of the next packet (0 = DATA PID, 1 = DATA1 PID). 3 OVERWRITE This bit is set by hardware, a logic 1 indicating that a new Setup packet has overwritten the previous set-up information, before it was acknowledged or before the endpoint was stalled. If writing the set-up data has finished, this bit is cleared by a read action. Firmware must check this bit before sending an Acknowledge Setup command or stalling the endpoint. Upon reading a logic 1, the firmware must stop ongoing set-up actions and wait for a new Setup packet. 13.2.3 2 SETUPT A logic 1 indicates that the buffer contains a Setup packet. 1 CPUBUF This bit indicates which buffer is currently selected for CPU access (0 = primary buffer, 1 = secondary buffer). 0 - reserved Stall Endpoint/Unstall Endpoint (40H-4FH/80H--8FH) These commands are used to stall or unstall an endpoint. The commands modify the content of the DcEndpointStatus register (see Table 92). A stalled control endpoint is automatically unstalled when it receives a SETUP token, regardless of the packet content. If the endpoint should stay in its stalled state, the microprocessor can re-stall it with the Stall Endpoint command. When a stalled endpoint is unstalled (either by the Unstall Endpoint command or by receiving a SETUP token), it is also re-initialized. This flushes the buffer: if it is an OUT buffer it waits for a DATA 0 PID, if it is an IN buffer it writes a DATA 0 PID. Code (Hex): 40 to 4F -- stall (control OUT, control IN, endpoint 1 to 14) Code (Hex): 80 to 8F -- unstall (control OUT, control IN, endpoint 1 to 14) Transaction -- none (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 101 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 13.2.4 Validate Endpoint Buffer (R/W: 6FH/61H) This command signals the presence of valid data for transmission to the USB host, by setting the Buffer Full flag of the selected IN endpoint. This indicates that the data in the buffer is valid and can be sent to the host, when the next IN token is received. For a double-buffered endpoint this command switches the current FIFO for CPU access. Remark: For special aspects of the control IN endpoint see Section 11.3.6. Code (Hex): 61 to 6F -- validate endpoint buffer (control IN, endpoint 1 to 14) Transaction -- none 13.2.5 Clear Endpoint Buffer (70H, 72H-7FH) This command unlocks and clears the buffer of the selected OUT endpoint, allowing the reception of new packets. Reception of a complete packet causes the Buffer Full flag of an OUT endpoint to be set. Any subsequent packets are refused by returning a NAK condition, until the buffer is unlocked using this command. For a double-buffered endpoint this command switches the current FIFO for CPU access. Remark: For special aspects of the control OUT endpoint see Section 11.3.6. Code (Hex): 70, 72 to 7F -- clear endpoint buffer (control OUT, endpoint 1 to 14) Transaction -- none 13.2.6 DcEndpointStatusImage register(D0H-DFH) This command is used to check the status of the selected endpoint FIFO without clearing any status or interrupt bits. The command accesses the DcEndpointStatusImage register, which contains a copy of the DcEndpointStatus register. The bit allocation of the DcEndpointStatusImage register is shown in Table 94. Code (Hex): D0 to DF -- check status (control OUT, control IN, endpoint 1 to 14) Transaction -- write/read 1 word Table 94: DcEndpointStatusImage register: bit allocation Bit 7 6 5 4 3 2 1 0 EPSTAL EPFULL1 EPFULL0 DATA_PID OVER WRITE SETUPT CPUBUF reserved Reset 0 0 0 0 0 0 0 0 Access R R R R R R R R Symbol Table 95: DcEndpointStatusImage register: bit description Bit Symbol Description 7 EPSTAL This bit indicates whether the endpoint is stalled or not (1 = stalled, 0 = not stalled). 6 EPFULL1 A logic 1 indicates that the secondary endpoint buffer is full. 5 EPFULL0 A logic 1 indicates that the primary endpoint buffer is full. 4 DATA_PID This bit indicates the data PID of the next packet (0 = DATA PID, 1 = DATA1 PID). (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 102 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 95: DcEndpointStatusImage register: bit description...continued Bit Symbol Description 3 OVERWRITE This bit is set by hardware, a logic 1 indicating that a new Setup packet has overwritten the previous set-up information, before it was acknowledged or before the endpoint was stalled. If writing the set-up data has finished, this bit is cleared by a read action. Firmware must check this bit before sending an Acknowledge Setup command or stalling the endpoint. Upon reading a logic 1 the firmware must stop ongoing set-up actions and wait for a new Setup packet. 13.2.7 2 SETUPT A logic 1 indicates that the buffer contains a Setup packet. 1 CPUBUF This bit indicates which buffer is currently selected for CPU access (0 = primary buffer, 1 = secondary buffer). 0 - reserved Acknowledge Setup (F4H) This command acknowledges to the host that a Setup packet was received. The arrival of a Setup packet disables the Validate Buffer and Clear Buffer commands for the control IN and OUT endpoints. The microprocessor needs to re-enable these commands by sending an Acknowledge Setup command, see Section 11.3.6. Code (Hex): F4 -- acknowledge set-up Transaction -- none 13.3 General commands 13.3.1 Read Endpoint Error Code (R: A0H-AFH) This command returns the status of the last transaction of the selected endpoint, as stored in the DcErrorCode register. Each new transaction overwrites the previous status information. The bit allocation of the DcErrorCode register is shown in Table 96. Code (Hex): A0 to AF -- read error code (control OUT, control IN, endpoint 1 to 14) Transaction -- read 1 word Table 96: DcErrorCode register: bit allocation Bit 7 6 5 UNREAD DATA01 reserved Reset 0 0 0 0 0 0 0 0 Access R R R R R R R R Symbol 4 3 1 ERROR[3:0] 0 RTOK Table 97: DcErrorCode register: bit description Bit Symbol Description 7 UNREAD A logic 1 indicates that a new event occurred before the previous status was read. 6 DATA01 This bit indicates the PID type of the last successfully received or transmitted packet (0 = DATA0 PID, 1 = DATA1 PID). (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data 2 Rev. 03 -- 23 December 2004 103 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 97: DcErrorCode register: bit description...continued Bit Symbol Description 5 - reserved 4 to 1 ERROR[3:0] Error code. For error description, see Table 98. 0 RTOK A logic 1 indicates that data was received or transmitted successfully. Table 98: 13.3.2 Transaction error codes Error code (Binary) Description 0000 no error 0001 PID encoding error; bits 7 to 4 are not the inverse of bits 3 to 0 0010 PID unknown; encoding is valid, but PID does not exist 0011 unexpected packet; packet is not of the expected type (token, data, or acknowledge), or is a token to a non-control endpoint 0100 token CRC error 0101 data CRC error 0110 time-out error 0111 babble error 1000 unexpected end-of-packet 1001 sent or received NAK (Not AcKnowledge) 1010 sent Stall; a token was received, but the endpoint was stalled 1011 overflow; the received packet was larger than the available buffer space 1100 sent empty packet (ISO only) 1101 bit stuffing error 1110 sync error 1111 wrong (unexpected) toggle bit in DATA PID; data was ignored Unlock Device (B0H) This command unlocks the ISP1161A1's DC from write-protection mode after a `resume'. In `suspend' state all registers and FIFOs are write-protected to prevent data corruption by external devices during a `resume'. Also, the register access for reading is possible only after the `Unlock Device' command is executed. After waking up from `suspend' state, the firmware must unlock the registers and FIFOs via this command, by writing the unlock code (AA37H) into the Lock register. The bit allocation of the Lock register is given in Table 99. Code (Hex): B0 -- unlock the device Transaction -- write 1 word (unlock code) Table 99: Lock register: bit allocation Bit Symbol Reset Access 15 14 13 12 11 9 8 UNLOCKH[7:0] AAH W (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data 10 Rev. 03 -- 23 December 2004 104 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Bit 7 6 5 4 Symbol 3 2 1 0 UNLOCKL[7:0] Reset 37H Access W Table 100: Lock register: bit description 13.3.3 Bit Symbol Description 15 to 0 UNLOCK[15:0] Sending data AA37H unlocks the internal registers and FIFOs for writing, following a `resume'. DcScratch register (R/W: B3H/B2H) This command accesses the 16-bit DcScratch register, which can be used by the firmware to save and restore information, e.g., the device status before powering down in `suspend' state. The register bit allocation is given in Table 101. Code (Hex): B2/B3 -- write/read Scratch register Transaction -- write/read 1 word Table 101: DcScratch register: bit allocation Bit 15 Symbol Reset Access Bit 14 13 12 11 reserved 10 9 8 SFIRH[4:0] 0 0 0 0 0 0 0 0 R/W R/W R/W R/W R/W R/W R/W R/W 7 6 5 4 3 2 1 0 Symbol SFIRL[7:0] Reset 00H Access R/W Table 102: DcScratch register: bit description 13.3.4 Bit Symbol Description 15 to 13 - reserved; must be logic 0 12 to 0 SFIR[12:0] Scratch Information register Read Frame Number (R: B4H) This command returns the frame number of the last successfully received SOF. It is followed by reading one word from the DcFrameNumber register, containing the frame number. The DcFrameNumber register is shown in Table 103. Remark: After a bus reset, the value of the DcFrameNumber register is undefined. Code (Hex): B4 -- read frame number Transaction -- read 1 word (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 105 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 103: DcFrameNumber register: bit allocation Bit 15 14 Symbol 13 12 11 10 reserved 9 8 SOFRH[2:0] Reset[1] 0 0 0 0 0 0 0 0 Access R R R R R R R R Bit 7 6 5 4 3 2 1 0 Symbol SOFRL[7:0] Reset[1] 0 0 0 0 0 0 0 0 Access R R R R R R R R [1] Reset value undefined after a bus reset. Table 104: DcFrameNumber register: bits description Bit Symbol Description 15 to 11 - reserved 10 to 8 SOFRH[2:0] SOF frame number (upper byte) 7 to 0 SOFRL[7:0] SOF frame number (lower byte) Table 105: Example of DcFrameNumber register access A0 Phase Bus lines Word # Description 1 command D[7:0] - command code (B4H) D[15:8] - ignored D[15:0] 0 frame number 0 13.3.5 data Read Chip ID (R: B5H) This command reads the chip identification code and hardware version number. The firmware must check this information to determine the supported functions and features. This command accesses the DcChipID register, which is shown in Table 106. Code (Hex): B5 -- read chip ID Transaction -- read 1 word Table 106: DcChipID register: bit allocation Bit 15 14 13 Symbol 12 Reset Access 8 2 1 0 R 7 6 5 4 3 CHIPIDL[7:0] 23H R (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data 9 61H Access Symbol 10 CHIPIDH[7:0] Reset Bit 11 Rev. 03 -- 23 December 2004 106 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 107: DcChipID register: bit description 13.3.6 Bit Symbol Description 15 to 8 CHIPIDH[7:0] chip ID code (61H) 7 to 0 CHIPIDL[7:0] silicon version (23H, with 23 representing the BCD encoded version number) Read Interrupt register (R: C0H) This command indicates the sources of interrupts as stored in the 4-byte DcInterrupt register. Each individual endpoint has its own interrupt bit. The bit allocation of the DcInterrupt register is shown in Table 108. Bit BUSTATUS is used to verify the current bus status in the interrupt service routine. Interrupts are enabled via the DcInterruptEnable register, see Section 13.1.5. Remark: While reading the DcInterrupt register, read both 2 bytes. Code (Hex): C0 -- read interrupt register Transaction -- read 2 words Remark: For details on interrupt control, see Section 8.6.3. Table 108: DcInterrupt register: bit allocation Bit 31 30 29 28 Symbol Reset 25 24 00H Access Symbol 26 reserved Reset Bit 27 R 23 22 21 20 19 18 17 16 EP14 EP13 EP12 EP11 EP10 EP9 EP8 EP7 0 0 0 0 0 0 0 0 Access R R R R R R R R Bit 15 14 13 12 11 10 9 8 EP6 EP5 EP4 EP3 EP2 EP1 EP0IN EP0OUT Reset 0 0 0 0 0 0 0 0 Access R R R R R R R R Bit 7 6 5 4 3 2 1 0 BUSTATUS SP_EOT PSOF SOF EOT SUSPND RESUME RESET Reset 0 0 0 0 0 0 0 0 Access R R R R R R R R Symbol Symbol Table 109: DcInterrupt register: bit description Bit Symbol Description 31 to 24 - reserved 23 to 10 EP14 to EP1 A logic 1 indicates the interrupt source(s): endpoint 14 to 1. 9 EP0IN A logic 1 indicates the interrupt source: control IN endpoint. 8 EP0OUT A logic 1 indicates the interrupt source: control OUT endpoint. 7 BUSTATUS Monitors the current USB bus status (0 = awake, 1 = suspend). 6 SP_EOT A logic 1 indicates that an EOT interrupt has occurred for a short packet. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 107 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 109: DcInterrupt register: bit description...continued Bit Symbol Description 5 PSOF A logic 1 indicates that an interrupt is issued every 1 ms because of the Pseudo SOF; after 3 missed SOFs `suspend' state is entered. 4 SOF A logic 1 indicates that a SOF condition was detected. 3 EOT A logic 1 indicates that an internal EOT condition was generated by the DMA Counter reaching zero. 2 SUSPND A logic 1 indicates that an `awake' to `suspend' change of state was detected on the USB bus. 1 RESUME A logic 1 indicates that a `resume' state was detected. 0 RESET A logic 1 indicates that a bus reset condition was detected. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 108 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 14. Power supply The ISP1161A1 can operate at either 5 V or 3.3 V. When using 5 V as the ISP1161A1's power supply input, only VCC (pin 56) can be connected to the 5 V power supply. An application with a 5 V power supply input is shown in Figure 43. The ISP1161A1 has an internal DC/DC regulator to provide 3.3 V for its internal core. This internal 3.3 V can also be obtained from Vreg(3.3) (pin 58) to supply the 1.5 k pull-up resistor of the DC side upstream port signal D_DP. The signal D_DP is connected to the standard USB upstream port connector's pin D+. When using 3.3 V as the power supply input, the internal DC/DC regulator will be bypassed. All four power supply pins (VCC, Vreg(3.3), Vhold1 and Vhold2) can be used as power supply input. It is recommended that you connect all four power supply pins to the 3.3 V power supply, as shown in Figure 44. If, however, you have board space (routing area) constraints, you must connect at least VCC and Vreg(3.3) to the 3.3 V power supply. For both 3.3 V and 5 V operation, all four power supply pins should be connected to a decoupling capacitor. +3.3 V +5 V ISP1161A1 ISP1161A1 1.5 k to USB upstream port connector 1.5 k VCC D_DP to USB upstream port connector Vreg(3.3) Vhold1 VCC D_DP Vreg(3.3) Vhold1 Vhold2 Vhold2 GND GND 004aaa188 Fig 43. Using a 5 V supply. 004aaa189 Fig 44. Using a 3.3 V supply. 15. Crystal oscillator and LazyClock The ISP1161A1 has a crystal oscillator designed for a 6 MHz parallel-resonant crystal (fundamental). A typical circuit is shown in Figure 45. Alternatively, an external clock signal of 6 MHz can be applied to input XTAL1, while leaving output XTAL2 open. See Figure 46. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 109 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller VCC ISP1161A1 6 MHz ISP1161A1 CLKOUT 18 pF CLKOUT 6 MHz XTAL2 Out OSC XTAL2 n.c. XTAL1 18 pF XTAL1 004aaa191 004aaa190 Fig 45. Oscillator circuit with external crystal. Fig 46. Oscillator circuit using external oscillator. The 6 MHz oscillator frequency is multiplied to 48 MHz by an internal PLL. This frequency is used to generate a programmable clock output signal at pin CLKOUT, ranging from 3 MHz to 48 MHz. In `suspend' state the normal CLKOUT signal is not available, because the crystal oscillator and the PLL are switched off to save power. Instead, the CLKOUT signal can be switched to the LazyClock frequency of 100 kHz 50 %. The oscillator operation and the CLKOUT frequency are controlled via the DcHardwareConfiguration register, as shown in Figure 47. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 110 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller hardware configuration register CLKRUN SUSPEND enable . . . XTAL OSC enable 48 MHz PLL 8x 6 MHz N 4 CLKDIV[3:0] / (N + 1) 1 CLKOUT 0 NOLAZY LAZYCLOCK . . . 100 (50 %) kHz enable NOLAZY MGS775 Fig 47. Oscillator and LazyClock logic. The following bits are involved: * CLKRUN switches the oscillator on and off * CLKDIV[3:0] is the division factor determining the normal CLKOUT frequency * NOLAZY controls the LazyClock signal output during `suspend' state. For details about the DC's interrupt logic, see Section 8.6.3. When the ISP1161A1's DC enters the `suspend' state (by setting and clearing bit GOSUSP in the DcMode register), outputs D_SUSPEND and CLKOUT change state after approximately 2 ms delay. When NOLAZY = 0 the clock signal on output CLKOUT does not stop, but changes to the 100 kHz 50 % LazyClock frequency. When resuming from `suspend' state by a positive pulse on input D_WAKEUP, output SUSPEND is cleared and the clock signal on CLKOUT restarted after a 0.5 ms delay. The timing of the CLKOUT signal at `suspend' and `resume' is given in Figure 48. GOSUSP D_WAKEUP 1.8 to 2.2 ms 0.5 ms D_SUSPEND PLL circuit stable 3 to 4 ms CLKOUT 004aaa038 If enabled, the 100 50 % kHz LazyClock frequency will be output on pin CLKOUT during `suspend' state. Fig 48. CLKOUT signal timing at `suspend' and `resume' for DC. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 111 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 16. Power-on reset (POR) When VCC is directly connected to the RESET pin, the internal pulse width (tPORP) will be typically (600 ns to 1000 ns) + X, when VCC is 3.3 V. X depends on how fast VCC is rising with respect to Vtrip (2.03 V). The time X is decided by the external power supply circuit. To give a better view of the functionality, Figure 49 shows a possible curve of VCC(POR) with dips at t2-t3 and t4-t5. If the dip at t4-t5 is too short (that is, < 11 s), the internal POR pulse will not react and will remain LOW. The internal POR starts with a 1 at t0. At t1, the detector will see the passing of the trip level and a delay element will add another tPORP before it drops to 0. The internal POR pulse will be generated whenever VCC(POR) drops below Vtrip for more than 11 s. Even if VCC is 5.0 V, Vtrip still remains at 2.03 V. This is because the 5 V tolerant pads and on-chip voltage regulator ensure that 3.3 V is going to the internal POR circuitry by clipping the voltage above 3.3 V. V BAT(POR) V trip t0 t1 t t2 t4 t3 t PORP t5 PORP (1) PORP 004aaa389 (1) PORP = power-on reset pulse. Fig 49. Internal POR timing. The RESET pin can be either connected to VCC (using the internal POR circuit) or externally controlled (by the micro, ASIC, and so on). Figure 50 shows the availability of the clock with respect to the external POR. POR EXTERNAL CLOCK 004aaa365 A Stable external clock is available at A. Fig 50. Clock with respect to the external POR. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 112 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 17. Limiting values Table 110: Absolute maximum ratings In accordance with the Absolute Maximum Rating System (IEC 60134). Symbol Parameter VCC(5V) Min Max Unit supply voltage on pin VCC -0.5 +6.0 V VCC(3.3V) supply voltage on pin Vreg(3.3) -0.5 +4.6 V VI input voltage Ilu latch-up current VI < 0 or VI > VCC Vesd electrostatic discharge voltage ILI < 1 A Tstg storage temperature [1] Conditions [1] -0.5 +6.0 V - 100 mA -2000 +2000 V -60 +150 C Equivalent to discharging a 100 pF capacitor via a 1.5 k resistor (Human Body Model). 18. Recommended operating conditions Table 111: Recommended operating conditions Symbol Parameter Conditions Min VCC supply voltage with internal regulator 4.0 5.0 5.5 V internal regulator bypass 3.0 3.3 3.6 V 0 VCC 5.5 V 0 - 3.6 V [1] Typ Max Unit VI input voltage VI(AI/O) input voltage on analog I/O pins (D+/D-) VO(od) open-drain output pull-up voltage 0 - VCC V Tamb ambient temperature -40 - +85 C [1] 5 V tolerant. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 113 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 19. Static characteristics Table 112: Static characteristics; supply pins VCC = 3.0 V to 3.6 V or 4.0 V to 5.5 V; VGND = 0 V; Tamb = -40 C to +85 C; unless otherwise specified. Symbol Parameter Conditions internal regulator output typical at Tamb = 25 C Min Typ[1] Max Unit 3.0 3.3 3.6 V VCC = 5 V Vreg(3.3) [2] ICC operating supply current typical at Tamb = 25 C - 47 - mA ICC(susp) suspend supply current typical at Tamb = 25 C - 40 500 A ICC(HC) operating supply current for HC DC is suspended; typical at Tamb = 25 C - 22 - mA ICC(DC) operating supply current for DC HC is suspended; typical at Tamb = 25 C - 18 - mA VCC = 3.3 V ICC operating supply current typical at Tamb = 25 C - 50 - mA ICC(susp) suspend supply current typical at Tamb = 25 C - 150 500 A ICC(HC) operating supply current for HC DC is suspended; typical at Tamb = 25 C - 22 - mA ICC(DC) operating supply current for DC HC is suspended; typical at Tamb = 25 C - 18 - mA [1] [2] For typical values Tamb = 25 C. In `suspend' mode, the minimum voltage is 2.7 V. Table 113: Static characteristics: digital pins VCC = 3.0 V to 3.6 V or 4.0 V to 5.5 V; VGND = 0 V; Tamb = -40 C to +85 C; unless otherwise specified. Symbol Parameter Min Typ Max Unit Vtrip overcurrent detection trip voltage Conditions - 75 - mV VIL LOW-level input voltage - - 0.8 V VIH HIGH-level input voltage 2.0 - - V Input levels Schmitt trigger inputs Vth(LH) positive-going threshold voltage 1.4 - 1.9 V Vth(HL) negative-going threshold voltage 0.9 - 1.5 V Vhys hysteresis voltage 0.4 - 0.7 V - - 0.4 V Output levels VOL LOW-level output voltage IOL = 4 mA VOH HIGH-level output voltage IOH = 4 mA IOL = 20 A IOH = 20 A [1] - - 0.1 V 2.4 - - V Vreg(3.3) - 0.1 - - V (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 114 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 113: Static characteristics: digital pins...continued VCC = 3.0 V to 3.6 V or 4.0 V to 5.5 V; VGND = 0 V; Tamb = -40 C to +85 C; unless otherwise specified. Symbol Parameter Conditions Min Typ Max Unit -5 - +5 A - - 5 pF -5 - +5 A Leakage current ILI input leakage current CIN pin capacitance [2] pin to GND Open-drain outputs OFF-state output current IOZ [1] [2] Not applicable for open-drain outputs. This maximum and minimum values are applicable to transistor input only. The value will be different if internal pull-up or pull-down resistors are used. Table 114: Static characteristics: analog I/O pins (D+, D-) VCC = 3.0 V to 3.6 V or 4.0 V to 5.5 V; VGND = 0 V; Tamb = -40 C to +85 C; unless otherwise specified. Symbol Parameter Conditions Min Typ Max Unit VDI differential input sensitivity |VI(D+) - VI(D-)| 0.2 - - V VCM differential common mode voltage includes VDI range 0.8 - 2.5 V VIL LOW-level input voltage - - 0.8 V VIH HIGH-level input voltage 2.0 - - V Input levels [1] Output levels VOL LOW-level output voltage RL = 1.5 k to 3.6 V - - 0.3 V VOH HIGH-level output voltage RL = 15 k to GND 2.8 - 3.6 V - - 10 A Leakage current ILZ OFF-state leakage current Capacitance transceiver capacitance pin to GND - - 10 pF RPD pull-down resistance on HC's pins DP/DM enable internal resistors 10 - 20 k RPU pull-up resistance on pin D_DP SoftConnect = ON 1 - 2 k 29 - 44 10 - - M 3.0 - 3.6 V CIN Resistance ZDRV driver output impedance ZINP input impedance steady-state drive [2] Termination VTERM [1] [2] [3] [3] termination voltage for upstream port pull-up (RPU) D+ is the USB positive data pin; D- is the USB negative data pin. Includes external resistors of 18 1 % on both H_D+ and H_D-. In `suspend mode', the minimum voltage is 2.7 V. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 115 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 20. Dynamic characteristics Table 115: Dynamic characteristics VCC = 3.0 V to 3.6 V or 4.0 V to 5.5 V; VGND = 0 V; Tamb = -40 C to +85 C; unless otherwise specified. Symbol Parameter Conditions pulse width on input RESET crystal oscillator running Min Typ Max Unit 160 - - s - - - ms Reset tW(RESET) crystal oscillator stopped [1] Crystal oscillator fXTAL crystal frequency - 6 - MHz RS series resistance - - 100 CLOAD load capacitance - 18 - pF External clock input tJ external clock jitter - - 500 ps tDUTY clock duty cycle 45 50 55 % tCR, tCF rise time and fall time - - 3 ns [1] Dependent on the crystal oscillator start-up time. Table 116: Dynamic characteristics: analog I/O pins (D+, D-)[1] VCC = 3.0 V to 3.6 V or 4.0 V to 5.5 V; VGND = 0 V; Tamb = -40 C to +85 C; CL = 50 pF; RPU = 1.5 k 5 % on D+ to VTERM; unless otherwise specified. Symbol Parameter Conditions Min Typ Max Unit Driver characteristics tFR rise time CL = 50 pF; 10 % to 90 % of |VOH - VOL| 4 - 20 ns tFF fall time CL = 50 pF; 90 % to 10 % of |VOH - VOL| 4 - 20 ns FRFM differential rise/fall time matching (tFR/tFF) 90 - 111.11 % VCRS output signal crossover voltage 1.3 - 2.0 V [1] [2] [3] [2] [2][3] Test circuit; see Figure 66. Excluding the first transition from Idle state. Characterized only, not tested. Limits guaranteed by design. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 116 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 20.1 Programmed I/O timing * If you are accessing only the HC, then the HC Programmed I/O timing applies. * If you are accessing only the DC, then the DC Programmed I/O timing applies. * If you are accessing both the HC and the DC, then the DC Programmed I/O timing applies. 20.1.1 HC Programmed I/O timing Table 117: Dynamic characteristics: HC Programmed interface timing Symbol Parameter Min Typ Max Unit tAS address set-up time before WR HIGH Conditions 5 - - ns tAH address hold time after WR HIGH 8 - - ns Read timing tSHSL first RD/WR after A0 HIGH 300 - - ns tSLRL CS LOW to RD LOW 0 - - ns tRHSH RD HIGH to CS HIGH 0 - - ns tRLRH RD LOW pulse width 33 - - ns tRHRL RD HIGH to next RD LOW 110 - - ns TRC RD cycle time 143 - - ns tRHDZ RD data hold time 3 - 22 ns tRLDV RD LOW to data valid - - 32 ns tWL WR LOW pulse width 26 - - ns tWHWL WR HIGH to next WR LOW 110 - - ns TWC WR cycle time 136 - - ns tSLWL CS LOW to WR LOW 0 - - ns tWHSH WR HIGH to CS HIGH 0 - - ns tWDSU WR data set-up time 5 - - ns tWDH WR data hold time 8 - - ns Write timing (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 117 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller CS t SLWL t SLRL t SHSL t RLRH A0 t WHSH t RHSH t RHRL T RC RD t RLDV t RHDZ D [15:0] data valid tAS data valid data valid data valid t WHWL t t WL AH TWC WR t WDH data valid D [15:0] data valid data valid t WDSU data valid data valid MGT969 Fig 51. HC Programmed interface timing 20.1.2 DC Programmed I/O timing Table 118: Dynamic characteristics: DC Programmed interface timing Symbol Parameter Conditions Min Typ Max Unit Read timing (see Figure 52) tRHAX address hold time after RD HIGH 0 - - ns tAVRL address set-up time before RD LOW 0 - - ns tSHDZ data outputs high-impedance time after CS HIGH - - 3 ns tRHSH chip deselect time after RD HIGH 0 - - ns tRLRH RD pulse width 25 - - ns tRLDV data valid time after RD LOW - - 22 ns tSHRL CS HIGH until next ISP1161A1 RD 120 - - ns tSHRL + tRLRH read cycle time 180 - - ns Write timing (see Figure 53) tWHAX address hold time after WR HIGH 1 - - ns tAVWL address set-up time before WR LOW 0 - - ns tSHWL CS HIGH until next ISP1161A1 WR 120 - - ns tSHWL + tWLWH write cycle time 180 - - ns tWLWH WR pulse width 22 - - ns tWHSH chip deselect time after WR HIGH 0 - - ns tDVWH data set-up time before WR HIGH 5 - - ns tWHDZ data hold time after WR HIGH 3 - - ns (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 118 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller t RHAX A0 tAVRL t SHDZ CS/DACK2(2) t SHRL(1) t RLRH RD t RHSH t RLDV D[15:0] 004aaa105 (1) For tSHRL both CS and RD must be de-asserted. (2) Programmable polarity: shown as active LOW. Fig 52. DC Programmed interface read timing (I/O and 8237 compatible DMA). t WHAX A0 tAVWL CS/DACK2(2) t WLWH t SHWL(1) t WHSH WR t DVWH t WHDZ D[15:0] 004aaa106 (1) For tSHWL both CS and WR must be de-asserted. (2) Programmable polarity: shown as active LOW. Fig 53. DC Programmed interface write timing (I/O and 8237 compatible DMA). 20.2 DMA timing 20.2.1 HC single-cycle DMA timing Table 119: Dynamic characteristics: HC single-cycle DMA timing Symbol Parameter Conditions Min Typ Max Unit Read/write timing tRLRH RD pulse width 33 - - ns tRLDV read process data set-up time 26 - - ns (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 119 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 119: Dynamic characteristics: HC single-cycle DMA timing...continued Symbol Parameter Min Typ Max Unit tRHDZ read process data hold time Conditions 0 - 20 ns tWSU write process data set-up time 5 - - ns tWHD write process data hold time 0 - - ns tAHRH DACK1 HIGH to DREQ1 HIGH 72 - - ns tALRL DACK1 LOW to DREQ1 LOW - - 21 ns TDC DREQ1 cycle - - - ns tSHAH RD/WR HIGH to DACK1 HIGH 0 - - ns tRHAL DREQ1 HIGH to DACK1 LOW 0 - - ns tDS DREQ1 pulse spacing 146 - - ns [1] [1] tRHAL + tDS +tALRL. T DC DREQ1 t DS t ALRL t SHAH t RHAL DACK1 t AHRH t RLDV D [15:0] (read) t RHDZ data valid D [15:0] (write) data valid t WSU RD or WR 004aaa107 t WHD Fig 54. HC single-cycle DMA timing. 20.2.2 HC burst mode DMA timing Table 120: Dynamic characteristics: HC burst mode DMA timing Symbol Parameter Conditions Min Typ Max Unit 42 - - ns Read/write timing (for 4-cycle and 8-cycle burst mode) tRLRH WR/RD LOW pulse width tRHRL WR/RD HIGH to next WR/RD LOW 60 - - ns TRC WR/RD cycle 102 - - ns tSLRL RD/WR LOW to DREQ1 LOW 22 - 64 ns tSHAH RD/WR HIGH to DACK1 HIGH 0 - - ns tSLAL DREQ1 HIGH to DACK1 LOW 0 - (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data ns Rev. 03 -- 23 December 2004 120 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Table 120: Dynamic characteristics: HC burst mode DMA timing...continued Symbol Parameter Conditions DREQ1 cycle tDS(read) DREQ1 pulse spacing (read) tDS(write) tRLIS [1] Min Typ Max Unit - - - ns 4-cycle burst mode 105 - - ns 8-cycle burst mode 150 - - ns 4-cycle burst mode 72 - - ns 8-cycle burst mode 167 - - ns 0 - - ns [1] TDC DREQ1 pulse spacing (write) RD/WR LOW to EOT LOW tSLAL + (4 or 8)tRC + tDS. t DS DREQ1 t RHSH t SLRL t RHAL DACK1 t RHRL t SHAH RD or WR 004aaa108 T RC t RLRH Fig 55. HC burst mode DMA timing. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 121 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 20.2.3 External EOT timing for HC single-cycle DMA DREQ1 DACK1 RD or WR EOT 004aaa109 t RLIS > 0 ns Fig 56. External EOT timing for HC single-cycle DMA. 20.2.4 External EOT timing for HC burst mode DMA DREQ1 DACK1 RD or WR EOT 004aaa110 t RLIS > 0 ns Fig 57. External EOT timing for HC burst mode DMA. 20.2.5 DC single-cycle DMA timing (8237 mode) Table 121: Dynamic characteristics: DC single-cycle DMA timing (8237 mode) Symbol Parameter Conditions Min Typ Max Unit tASRP DREQ2 off after DACK2 on - - 40 ns Tcy(DREQ2) cycle time signal DREQ2 180 - - ns T RC t ASRP DREQ2 DACK2(1) 004aaa111 (1) Programmable polarity: shown as active LOW. Fig 58. DC single-cycle DMA timing (8237 mode). (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 122 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 20.2.6 DC single-cycle DMA read timing in DACK-only mode Table 122: Dynamic characteristics: DC single-cycle DMA read timing in DACK-only mode Symbol Parameter tASRP tASAP Conditions Min Typ Max Unit DREQ off after DACK on - - 40 ns DACK pulse width 25 - - ns tASAP + tAPRS DREQ on after DACK off 180 - - ns tASDV data valid after DACK on - - 22 ns tAPDZ data hold after DACK off - - 3 ns t ASRP t APRS DREQ2 t ASAP DACK2(1) t APDZ t ASDV DATA 004aaa112 (1) Programmable polarity: shown as active LOW. Fig 59. DC single-cycle DMA read timing in DACK-only mode. 20.2.7 DC single-cycle DMA write timing in DACK-only mode Table 123: Dynamic characteristics: DC single-cycle DMA write timing in DACK-only mode Symbol Parameter tASRP Conditions Min Typ Max Unit DREQ2 off after DACK2 on - - 40 ns tASAP + tAPRS DREQ2 on after DACK2 off 180 - - ns tDVAP data set-up before DACK2 off 5 - - ns tAPDZ data hold after DACK2 off 3 - - ns t ASAP t ASRP t APRS DREQ2 t ASDV t APDZ DACK2(1) DATA 004aaa113 (1) Programmable polarity: shown as active LOW. Fig 60. DC single-cycle DMA write timing in DACK-only mode. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 123 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 20.2.8 EOT timing in DC single-cycle DMA Table 124: Dynamic characteristics: EOT timing in DC single-cycle DMA Symbol Parameter tRSIH Conditions Min Typ Max Unit input RD/WR HIGH after DREQ on 22 - - ns tIHAP DACK off after input RD/WR HIGH 0 - - ns tEOT EOT pulse width 22 - - ns tRLIS input EOT on after RD LOW - - 89 ns tWLIS input EOT on after WR LOW - 89 ns EOT on; DACK on; RD/WR LOW t RSIH DREQ2 t ASRP t IHAP (1) DACK2 (4) RD/WR (2) t RLIS tWLIS t EOT (3) EOT (4) 004aaa114 (1) tASRP starts from DACK or RD/WR going LOW, whichever occurs later. (2) The RD/WR signals are not used in DACK-only DMA mode. (3) The EOT condition is considered valid if DACK, RD/WR and EOT are all active (= LOW). (4) Programmable polarity: shown as active LOW. Fig 61. EOT timing in DC single-cycle DMA. 20.2.9 DC burst mode DMA timing Table 125: Dynamic characteristics: DC burst mode DMA timing Symbol Parameter tRSIH Conditions Min Typ Max Unit input RD/WR HIGH after DREQ on 22 - - ns tILRP DREQ off after input RD/WR LOW - - 60 ns tIHAP DACK off after input RD/WR HIGH 0 - - ns tIHIL DMA burst repeat interval (input RD/WR HIGH to LOW) 180 - - ns (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 124 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller t RSIH t ILRP DREQ2 t IHAP DACK2(1) t IHIL RD or WR 004aaa115 (1) Programmable polarity: shown as active LOW. Fig 62. DC burst mode DMA timing. 20.2.10 EOT timing in DC burst mode DMA Table 126: Dynamic characteristics: EOT timing in DC burst mode DMA Symbol Parameter Conditions Min Typ Max Unit tEOT EOT pulse width EOT on; DACK on; RD/WR LOW 22 - - ns tISRP DREQ off after input EOT on - - 40 ns tRLIS input EOT on after RD LOW - - 89 ns tWLIS input EOT on after WR LOW - - 89 ns t ISRP DREQ2 DACK2(2) t RLIS tWLIS RD/WR t EOT(1) EOT(2) 004aaa116 (1) The EOT condition is considered valid if DACK2, RD/WR and EOT are all active (= LOW). (2) Programmable polarity: shown as active LOW. Fig 63. EOT timing in DC burst mode DMA. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 125 of 136 Product data CLKOUT +5 V 32 kHz +3.3 V 9397 750 13961 Rev. 03 -- 23 December 2004 GND XTAL2 EXTAL2 XTAL EXTAL +3.3 V +5 V +5 V 7 DREQ2 DACK2 DREQ1 DACK1 H_WAKEUP H_SUSPEND PTC0 PTC1 RSTOUT PTC3 Vhold1 Vhold2 Vreg(3.3) D_DM D_DP H_DM2 H_DP2 H_DM1 H_DP1 DGND AGND RESET XTAL1 XTAL2 CLKOUT D_VBUS GL D_SUSPEND NDP_SEL D_WAKEUP INT2 IRQ3 PTC2 INT1 IRQ2 EOT DACK1 RD WR RD RD/WR DACK0 CS CS5 DREQ1 A1 A2 DREQ0 A0 VCC H_OC1 H_OC2 H_PSW2 H_PSW1 ISP1161A1 D[15:0] A1 D[15:0] SH7709 18 pF Vreg VDD 6 MHz CLKOUT VDD +3.3 V 47 pF (2x) 47 pF (2x) 18 pF LED (2) 470 VDD 1.5 k Vreg 47 pF (2x) +5 V +3.3 V +5 V 22 (2x) 22 (2x) 22 (2x) (1) FB5 FB4 FB6 USB upstream port USB downstream port #2 USB downstream port #1 004aaa192 Vbus_UP FB3 FB2 FB1 Vbus_DN2 Vbus_DN1 MOSFET (2x) Philips Semiconductors ISP1161A1 USB single-chip host and device controller 21. Application information 21.1 Typical interface circuit (1) For MOSFET, RDSon = 150 m. (2) 470 assuming that VCC is 5.0 V. Fig 64. Typical interface circuit to Hitachi SH-3 (SH7709) RISC processor. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 126 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 21.2 Interfacing a ISP1161A1 with a SH7709 RISC processor This section shows a typical interface circuit between the ISP1161A1 and a RISC processor. The Hitachi SH-3 series RISC processor SH7709 is used as the example. The main ISP1161A1 signals to be taken into consideration for connecting to a SH7709 RISC processor are: * A 16-bit data bus: D[15:0] for the ISP1161A1. The ISP1161A1 is `little endian' compatible. * Two address lines A1 and A0 are needed for a complete addressing of the ISP1161A1 internal registers: - A1 = 0 and A0 = 0 will select the Data Port of the Host Controller - A1 = 0 and A0 = 1 will select the Command Port of the Host Controller - A1 = 1 and A0 = 0 will select the Data Port of the Device Controller - A1 = 1 and A0 = 1 will select the Command Port of the Device Controller * The CS line is used for chip selection of the ISP1161A1 in a certain address range of the RISC system. This signal is active LOW. * RD and WR are common read and write signals. These signals are active LOW. * There are two DMA channel standard control lines: - DREQ1 and DACK1 - DREQ2 and DACK2 (in each case one channel is used by the HC and the other channel is used by the DC). These signals have programmable active levels. * Two interrupt lines: INT1 (used by the HC) and INT2 (used by the device controller). Both have programmable level/edge and polarity (active HIGH or LOW). * The internal 15 k pull-down resistors are used for the HC's two USB downstream ports. * The RESET signal is active LOW. Remark: SH7709's system clock input is for reference only. Refer to SH7709's specification for its actual use. The ISP1161A1 can work under either 3.3 V or 5.0 V power supply; however, its internal core works at 3.3 V. When using 3.3 V as the power supply input, the internal DC/DC regulator will be bypassed. It is best to connect all four power supply pins (VCC, Vreg(3.3), Vhold1 and Vhold2) to the 3.3 V power supply (for more information, see Section 14). All of the ISP1161A1's I/O pins are 5 V tolerant. This feature allows the ISP1161A1 the flexibility to be used in an embedded system under either a 3.3 V or a 5 V power supply. A typical SH7709 interface circuit is shown in Figure 64. 21.3 Typical software model This section shows a typical software requirement for an embedded system that incorporates the ISP1161A1. The software model for a Digital Still Camera (DSC) is used as the example for illustration (as shown in Figure 65). Two components of system software are required to make full use of the features in the ISP1161A1: the (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 127 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller host stack and the device stack. The device stack provides API directly to the application task for device function; the host stack provides API for Class driver and device driver, both of which provide API for application tasks for host function. Application layer MECHANISM CONTROL TASK IMAGE PROCESSING TASKS FILE MANAGEMENT PRINTER UI/CONTROL FILE TRANSFER OS DEVICE DRIVERS Class driver PC MASS STORAGE CLASS DRIVER PRINTING CLASS DRIVER HOST STACK DEVICE STACK ISP1161A1 HAL USB host/device stack USB Upstream Printer RISC LEN CONTROL ROM ISP1161A1 RAM Flash card Reader/ Writer USB Downstream 004aaa193 Digital Still Camera Fig 65. ISP1161A1 software model for DSC application. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 128 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 22. Test information The dynamic characteristics of the analog I/O ports (D+ and D-) as listed in Table 116 were determined using the circuit shown in Figure 66. test point 22 D.U.T. CL 15 k 50 pF MGT967 Load capacitance: CL = 50 pF (full-speed mode). Speed: full-speed mode only: internal 1.5 k pull-up resistor on D_DP. Fig 66. Load impedance for pins D_DP and D_DM. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 129 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 23. Package outline LQFP64: plastic low profile quad flat package; 64 leads; body 10 x 10 x 1.4 mm SOT314-2 c y X A 48 33 49 32 ZE e E HE A A2 (A 3) A1 wM bp pin 1 index 64 Lp L 17 detail X 16 1 ZD e v M A wM bp D B HD v M B 0 2.5 5 mm scale DIMENSIONS (mm are the original dimensions) UNIT A max. A1 A2 A3 bp c D (1) E (1) e mm 1.6 0.20 0.05 1.45 1.35 0.25 0.27 0.17 0.18 0.12 10.1 9.9 10.1 9.9 0.5 HD HE 12.15 12.15 11.85 11.85 L Lp v w y 1 0.75 0.45 0.2 0.12 0.1 Z D (1) Z E (1) 1.45 1.05 1.45 1.05 7o o 0 Note 1. Plastic or metal protrusions of 0.25 mm maximum per side are not included. REFERENCES OUTLINE VERSION IEC JEDEC SOT314-2 136E10 MS-026 JEITA EUROPEAN PROJECTION ISSUE DATE 00-01-19 03-02-25 Fig 67. LQFP64 (SOT314-2) package outline. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 130 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller LQFP64: plastic low profile quad flat package; 64 leads; body 7 x 7 x 1.4 mm SOT414-1 c y X 48 A 33 49 32 ZE e A A2 E HE (A 3) A1 wM bp pin 1 index Lp L 64 17 1 detail X 16 ZD e v M A wM bp D B HD v M B 0 2.5 5 mm scale DIMENSIONS (mm are the original dimensions) UNIT A max. A1 A2 A3 bp c D (1) E (1) e HD HE L Lp v w y mm 1.6 0.15 0.05 1.45 1.35 0.25 0.23 0.13 0.20 0.09 7.1 6.9 7.1 6.9 0.4 9.15 8.85 9.15 8.85 1 0.75 0.45 0.2 0.08 0.08 Z D (1) Z E (1) 0.64 0.36 0.64 0.36 o 7 o 0 Note 1. Plastic or metal protrusions of 0.25 mm maximum per side are not included. REFERENCES OUTLINE VERSION IEC JEDEC SOT414-1 136E06 MS-026 JEITA EUROPEAN PROJECTION ISSUE DATE 00-01-19 03-02-20 Fig 68. LQFP64 (SOT414-1) package outline. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 131 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 24. Soldering 24.1 Introduction to soldering surface mount packages This text gives a very brief insight to a complex technology. A more in-depth account of soldering ICs can be found in our Data Handbook IC26; Integrated Circuit Packages (document order number 9398 652 90011). There is no soldering method that is ideal for all surface mount IC packages. Wave soldering can still be used for certain surface mount ICs, but it is not suitable for fine pitch SMDs. In these situations reflow soldering is recommended. In these situations reflow soldering is recommended. 24.2 Reflow soldering Reflow soldering requires solder paste (a suspension of fine solder particles, flux and binding agent) to be applied to the printed-circuit board by screen printing, stencilling or pressure-syringe dispensing before package placement. Driven by legislation and environmental forces the worldwide use of lead-free solder pastes is increasing. Several methods exist for reflowing; for example, convection or convection/infrared heating in a conveyor type oven. Throughput times (preheating, soldering and cooling) vary between 100 and 200 seconds depending on heating method. Typical reflow peak temperatures range from 215 to 270 C depending on solder paste material. The top-surface temperature of the packages should preferably be kept: * below 225 C (SnPb process) or below 245 C (Pb-free process) - for all BGA, HTSSON..T and SSOP..T packages - for packages with a thickness 2.5 mm - for packages with a thickness < 2.5 mm and a volume 350 mm3 so called thick/large packages. * below 240 C (SnPb process) or below 260 C (Pb-free process) for packages with a thickness < 2.5 mm and a volume < 350 mm3 so called small/thin packages. Moisture sensitivity precautions, as indicated on packing, must be respected at all times. 24.3 Wave soldering Conventional single wave soldering is not recommended for surface mount devices (SMDs) or printed-circuit boards with a high component density, as solder bridging and non-wetting can present major problems. To overcome these problems the double-wave soldering method was specifically developed. If wave soldering is used the following conditions must be observed for optimal results: * Use a double-wave soldering method comprising a turbulent wave with high upward pressure followed by a smooth laminar wave. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 132 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller * For packages with leads on two sides and a pitch (e): - larger than or equal to 1.27 mm, the footprint longitudinal axis is preferred to be parallel to the transport direction of the printed-circuit board; - smaller than 1.27 mm, the footprint longitudinal axis must be parallel to the transport direction of the printed-circuit board. The footprint must incorporate solder thieves at the downstream end. * For packages with leads on four sides, the footprint must be placed at a 45 angle to the transport direction of the printed-circuit board. The footprint must incorporate solder thieves downstream and at the side corners. During placement and before soldering, the package must be fixed with a droplet of adhesive. The adhesive can be applied by screen printing, pin transfer or syringe dispensing. The package can be soldered after the adhesive is cured. Typical dwell time of the leads in the wave ranges from 3 to 4 seconds at 250 C or 265 C, depending on solder material applied, SnPb or Pb-free respectively. A mildly-activated flux will eliminate the need for removal of corrosive residues in most applications. 24.4 Manual soldering Fix the component by first soldering two diagonally-opposite end leads. Use a low voltage (24 V or less) soldering iron applied to the flat part of the lead. Contact time must be limited to 10 seconds at up to 300 C. When using a dedicated tool, all other leads can be soldered in one operation within 2 to 5 seconds between 270 and 320 C. 24.5 Package related soldering information Table 127: Suitability of surface mount IC packages for wave and reflow soldering methods Package[1] Soldering method BGA, HTSSON..T[3], LBGA, LFBGA, SQFP, SSOP..T[3], TFBGA, USON, VFBGA Reflow[2] not suitable suitable DHVQFN, HBCC, HBGA, HLQFP, HSO, HSOP, not suitable[4] HSQFP, HSSON, HTQFP, HTSSOP, HVQFN, HVSON, SMS suitable PLCC[5], SO, SOJ suitable suitable recommended[5][6] suitable LQFP, QFP, TQFP not SSOP, TSSOP, VSO, VSSOP not recommended[7] suitable CWQCCN..L[8], not suitable not suitable [1] [2] PMFP[9], WQCCN..L[8] For more detailed information on the BGA packages refer to the (LF)BGA Application Note (AN01026); order a copy from your Philips Semiconductors sales office. All surface mount (SMD) packages are moisture sensitive. Depending upon the moisture content, the maximum temperature (with respect to time) and body size of the package, there is a risk that internal or external package cracks may occur due to vaporization of the moisture in them (the so called popcorn effect). For details, refer to the Drypack information in the Data Handbook IC26; Integrated Circuit Packages; Section: Packing Methods. (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Wave Rev. 03 -- 23 December 2004 133 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller [3] [4] [5] [6] [7] [8] [9] These transparent plastic packages are extremely sensitive to reflow soldering conditions and must on no account be processed through more than one soldering cycle or subjected to infrared reflow soldering with peak temperature exceeding 217 C 10 C measured in the atmosphere of the reflow oven. The package body peak temperature must be kept as low as possible. These packages are not suitable for wave soldering. On versions with the heatsink on the bottom side, the solder cannot penetrate between the printed-circuit board and the heatsink. On versions with the heatsink on the top side, the solder might be deposited on the heatsink surface. If wave soldering is considered, then the package must be placed at a 45 angle to the solder wave direction. The package footprint must incorporate solder thieves downstream and at the side corners. Wave soldering is suitable for LQFP, QFP and TQFP packages with a pitch (e) larger than 0.8 mm; it is definitely not suitable for packages with a pitch (e) equal to or smaller than 0.65 mm. Wave soldering is suitable for SSOP, TSSOP, VSO and VSOP packages with a pitch (e) equal to or larger than 0.65 mm; it is definitely not suitable for packages with a pitch (e) equal to or smaller than 0.5 mm. Image sensor packages in principle should not be soldered. They are mounted in sockets or delivered pre-mounted on flex foil. However, the image sensor package can be mounted by the client on a flex foil by using a hot bar soldering process. The appropriate soldering profile can be provided on request. Hot bar soldering or manual soldering is suitable for PMFP packages. 25. Revision history Table 128: Revision history Rev Date 03 20041223 CPCN 200412020 Description Product data (9397 750 13961) Modifications: * Section 9.8.1 "Using an internal OC detection circuit": fourth paragraph, second sentence, changed source to drain and drain to source * * * Section 11.4 "Suspend and resume": updated the entire section Removed Section 20.1 Timing symbols Table 118 "Dynamic characteristics: DC Programmed interface timing": changed the min value of tRHAX from 3 ns to 0 ns and of tWHAX from 3 ns to 1 ns, and added tSHRL and tSHWL. 02 20030825 - Product data (9397 750 11828) 01 20021220 - Product data (9397 750 10241) (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Product data Rev. 03 -- 23 December 2004 134 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller 26. Data sheet status Level Data sheet status[1] Product status[2][3] Definition I Objective data Development This data sheet contains data from the objective specification for product development. Philips Semiconductors reserves the right to change the specification in any manner without notice. II Preliminary data Qualification This data sheet contains data from the preliminary specification. Supplementary data will be published at a later date. Philips Semiconductors reserves the right to change the specification without notice, in order to improve the design and supply the best possible product. III Product data Production This data sheet contains data from the product specification. Philips Semiconductors reserves the right to make changes at any time in order to improve the design, manufacturing and supply. Relevant changes will be communicated via a Customer Product/Process Change Notification (CPCN). [1] Please consult the most recently issued data sheet before initiating or completing a design. [2] The product status of the device(s) described in this data sheet may have changed since this data sheet was published. The latest information is available on the Internet at URL http://www.semiconductors.philips.com. [3] For data sheets describing multiple type numbers, the highest-level product status determines the data sheet status. 27. Definitions customers using or selling these products for use in such applications do so at their own risk and agree to fully indemnify Philips Semiconductors for any damages resulting from such application. Short-form specification -- The data in a short-form specification is extracted from a full data sheet with the same type number and title. For detailed information see the relevant data sheet or data handbook. Right to make changes -- Philips Semiconductors reserves the right to make changes in the products - including circuits, standard cells, and/or software - described or contained herein in order to improve design and/or performance. When the product is in full production (status `Production'), relevant changes will be communicated via a Customer Product/Process Change Notification (CPCN). Philips Semiconductors assumes no responsibility or liability for the use of any of these products, conveys no licence or title under any patent, copyright, or mask work right to these products, and makes no representations or warranties that these products are free from patent, copyright, or mask work right infringement, unless otherwise specified. Limiting values definition -- Limiting values given are in accordance with the Absolute Maximum Rating System (IEC 60134). Stress above one or more of the limiting values may cause permanent damage to the device. These are stress ratings only and operation of the device at these or at any other conditions above those given in the Characteristics sections of the specification is not implied. Exposure to limiting values for extended periods may affect device reliability. Application information -- Applications that are described herein for any of these products are for illustrative purposes only. Philips Semiconductors make no representation or warranty that such applications will be suitable for the specified use without further testing or modification. 28. Disclaimers Life support -- These products are not designed for use in life support appliances, devices, or systems where malfunction of these products can reasonably be expected to result in personal injury. Philips Semiconductors 29. Trademarks ARM7 and ARM9 -- are trademarks of ARM Ltd. GoodLink -- is a trademark of Koninklijke Philips Electronics N.V. Hitachi -- is a registered trademark of Hitachi Ltd. MIPS-based -- is a trademark of MIPS Technologies, Inc. SoftConnect -- is a trademark of Koninklijke Philips Electronics N.V. StrongARM -- is a registered trademark of ARM Ltd. SuperH -- is a trademark of Hitachi Ltd. Contact information For additional information, please visit http://www.semiconductors.philips.com. For sales office addresses, send e-mail to: sales.addresses@www.semiconductors.philips.com. Product data Fax: +31 40 27 24825 (c) Koninklijke Philips Electronics N.V. 2004. All rights reserved. 9397 750 13961 Rev. 03 -- 23 December 2004 135 of 136 ISP1161A1 Philips Semiconductors USB single-chip host and device controller Contents 1 2 3 4 5 6 6.1 6.2 7 7.1 7.2 7.3 7.4 7.5 7.6 8 8.1 8.2 8.3 8.4 8.5 8.6 9 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 10 10.1 10.2 10.3 10.4 10.5 10.6 11 11.1 11.2 11.3 11.4 12 12.1 12.2 General description . . . . . . . . . . . . . . . . . . . . . . 1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Ordering information . . . . . . . . . . . . . . . . . . . . . 4 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Pinning information . . . . . . . . . . . . . . . . . . . . . . 7 Pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Pin description . . . . . . . . . . . . . . . . . . . . . . . . . 7 Functional description . . . . . . . . . . . . . . . . . . 11 PLL clock multiplier. . . . . . . . . . . . . . . . . . . . . 11 Bit clock recovery . . . . . . . . . . . . . . . . . . . . . . 11 Analog transceivers . . . . . . . . . . . . . . . . . . . . 11 Philips Serial Interface Engine (SIE). . . . . . . . 11 SoftConnect . . . . . . . . . . . . . . . . . . . . . . . . . . 11 GoodLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Microprocessor bus interface. . . . . . . . . . . . . 12 Programmed I/O (PIO) addressing mode . . . . 12 DMA mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Control register access by PIO mode . . . . . . . 13 FIFO buffer RAM access by PIO mode . . . . . 16 FIFO buffer RAM access by DMA mode. . . . . 17 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 USB host controller (HC). . . . . . . . . . . . . . . . . 24 HC's four USB states . . . . . . . . . . . . . . . . . . . 24 Generating USB traffic . . . . . . . . . . . . . . . . . . 24 PTD data structure . . . . . . . . . . . . . . . . . . . . . 26 HC internal FIFO buffer RAM structure . . . . . 29 HC operational model . . . . . . . . . . . . . . . . . . . 35 Microprocessor loading. . . . . . . . . . . . . . . . . . 38 Internal pull-down resistors for downstream ports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 OC detection and power switching control . . . 39 Suspend and wake-up . . . . . . . . . . . . . . . . . . 41 HC registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 HC control and status registers . . . . . . . . . . . 45 HC frame counter registers. . . . . . . . . . . . . . . 52 HC Root Hub registers . . . . . . . . . . . . . . . . . . 55 HC DMA and interrupt control registers . . . . . 65 HC miscellaneous registers . . . . . . . . . . . . . . 70 HC buffer RAM control registers . . . . . . . . . . . 72 USB device controller (DC) . . . . . . . . . . . . . . . 77 DC data transfer operation . . . . . . . . . . . . . . . 77 Device DMA transfer. . . . . . . . . . . . . . . . . . . . 78 Endpoint descriptions . . . . . . . . . . . . . . . . . . . 79 Suspend and resume . . . . . . . . . . . . . . . . . . . 82 DC DMA transfer . . . . . . . . . . . . . . . . . . . . . . . 85 Selecting an endpoint for DMA transfer . . . . . 85 8237 compatible mode . . . . . . . . . . . . . . . . . . 86 (c) Koninklijke Philips Electronics N.V. 2004. Printed in The Netherlands All rights are reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner. The information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed without notice. No liability will be accepted by the publisher for any consequence of its use. Publication thereof does not convey nor imply any license under patent- or other industrial or intellectual property rights. Date of release: 23 December 2004 Document order number: 9397 750 13961 12.3 12.4 13 13.1 13.2 13.3 14 15 16 17 18 19 20 20.1 20.2 21 21.1 21.2 21.3 22 23 24 24.1 24.2 24.3 24.4 24.5 25 26 27 28 29 DACK-only mode . . . . . . . . . . . . . . . . . . . . . . 87 End-Of-Transfer conditions. . . . . . . . . . . . . . . 88 DC commands and registers . . . . . . . . . . . . . 90 Initialization commands . . . . . . . . . . . . . . . . . 92 Data flow commands . . . . . . . . . . . . . . . . . . . 99 General commands . . . . . . . . . . . . . . . . . . . 103 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . 109 Crystal oscillator and LazyClock . . . . . . . . . 109 Power-on reset (POR) . . . . . . . . . . . . . . . . . . 112 Limiting values . . . . . . . . . . . . . . . . . . . . . . . 113 Recommended operating conditions . . . . . 113 Static characteristics . . . . . . . . . . . . . . . . . . 114 Dynamic characteristics . . . . . . . . . . . . . . . . 116 Programmed I/O timing . . . . . . . . . . . . . . . . 117 DMA timing. . . . . . . . . . . . . . . . . . . . . . . . . . 119 Application information . . . . . . . . . . . . . . . . 126 Typical interface circuit . . . . . . . . . . . . . . . . . 126 Interfacing a ISP1161A1 with a SH7709 RISC processor. . . . . . . . . . . . . . . . . . . . . . 127 Typical software model . . . . . . . . . . . . . . . . . 127 Test information. . . . . . . . . . . . . . . . . . . . . . . 129 Package outline . . . . . . . . . . . . . . . . . . . . . . . 130 Soldering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Introduction to soldering surface mount packages . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Reflow soldering. . . . . . . . . . . . . . . . . . . . . . 132 Wave soldering. . . . . . . . . . . . . . . . . . . . . . . 132 Manual soldering . . . . . . . . . . . . . . . . . . . . . 133 Package related soldering information . . . . . 133 Revision history . . . . . . . . . . . . . . . . . . . . . . 134 Data sheet status. . . . . . . . . . . . . . . . . . . . . . 135 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Disclaimers . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . 135