Manuel d'utilisation / d'entretien du produit CY7C65113C du fabricant Cypress
Aller à la page of 49
USB Hub with Microcontrolle r CY7C651 13C Cypress Semiconductor Corpora tion • 198 Champion Cou rt • San Jose , CA 95134-1 709 • 408-943-2 600 Document #: 38-08002 Rev .
CY7C651 13C Document #: 38-08002 Rev . *D Page 2 of 49 TABLE OF CONTENTS 1.0 FEATURES .................................................... ........................................... .................. .....................5 2.0 FUNCTIONAL OVERVIEW ..
CY7C651 13C Document #: 38-08002 Rev . *D Page 3 of 49 16.0 USB HUB ................................................................................................ ................. ....................29 16.1 Connecting/Disconnecting a USB Device ..
CY7C651 13C Document #: 38-08002 Rev . *D Page 4 of 49 Figure 16-5. Hub Ports Force Low Register .................... .......................................... ...................... ..... 31 Figure 16-6. Hub Ports SE0 Status Register ...............
CY7C651 13C Document #: 38-08002 Rev . *D Page 5 of 49 1.0 Features • Full Speed USB hub with an integrated microcontroller • 8-bit USB optimized microcontroller — Harvard architecture — 6-MHz.
CY7C651 13C Document #: 38-08002 Rev . *D Page 6 of 49 2.0 Functional Overview The CY7C651 13C device is a one-time programmable 8-bit microc o ntroller with a buil t-in 12-Mbps USB hub tha t supports up to four downstream ports.
CY7C651 13C Document #: 38-08002 Rev . *D Page 7 of 49 Logic Block Diagram Interrupt Controller PROM 12-bit Timer Reset W atchdog Tim er Repeater Power-on SCLK I 2 C comp.
CY7C651 13C Document #: 38-08002 Rev . *D Page 8 of 49 4.0 Product Summary T ables 4.1 Pin Assign ments 3.0 Pin Configurations T able 4-1. Pin Assignmen t s Name I/O 28-pin Description D+[0], D–[0] I/O 5, 6 Upstream port, USB differential dat a. D+[1], D–[1] I/O 7, 8 Downstream Port 1, USB differential data.
CY7C651 13C Document #: 38-08002 Rev . *D Page 9 of 49 4.2 I/O Register Summary I/O registers are accessed via the I/O Read (IORD) and I/O Write (IOWR, IOWX) instruct ions. IORD reads da ta from the selected port into the accu mulator . IOWR performs the revers e; it writes data from the accumulator to the selected p ort.
CY7C651 13C Document #: 38-08002 Rev . *D Page 10 of 49 4.3 Instructi on Set Summary Refer to the CY ASM Assembler User ’s Guide for more details. Note that conditional ju mp instructions (i.e., JC, JNC, JZ, JNZ) take five cycles if jump is t aken, four cycles if no jump.
CY7C651 13C Document #: 38-08002 Rev . *D Page 1 1 of 49 5.0 Programming Model 5.1 14-bit Program Counter The 14-bit Program Counter (PC) allows ac ce ss to up to 8 KB o f PROM available with the CY7C651 1 3C architecture. The top 32 bytes of the ROM in the 8K part are reserved for testing purpo ses.
CY7C651 13C Document #: 38-08002 Rev . *D Page 12 of 49 5.1.1 Progra m Memory Organization Note tha t the upper 32 bytes of the 8K PR OM are reserved .
CY7C651 13C Document #: 38-08002 Rev . *D Page 13 of 49 5.2 8-bit Accumula tor (A) The accumulator is the general-purpose register for the microcontroller . 5.3 8-bit T emporary Register (X) The “X” register is available to the firmware for temporary st orage of intermediate results.
CY7C651 13C Document #: 38-08002 Rev . *D Page 14 of 49 5.5 8-bit Dat a St ack Pointer (DSP) The Data S tack Pointer (DSP) supports PUSH and POP instruct ions that use the data st a ck for temporary storage. A PUSH instruction pre-decrements the DSP , then writes da ta to the memory location addressed by the DSP .
CY7C651 13C Document #: 38-08002 Rev . *D Page 15 of 49 6.0 Clocking The XT ALIN and XT ALOUT are the cl ock pins to the microcontroller . The user can connect an external oscillator or a crystal to these pins. When using an externa l crystal, keep PCB traces betw een the chip l eads and crystal as short as possible (less than 2 cm).
CY7C651 13C Document #: 38-08002 Rev . *D Page 16 of 49 7.2 W atchdog Reset The WDR occurs when the internal W atchdo g T imer rolls over. W rit ing any value to the write-on ly W atchdog Reset Clear Register ( Figure 7-1 ) clears the timer .
CY7C651 13C Document #: 38-08002 Rev . *D Page 17 of 49 9.0 General-purpose I/O Port s There are 1 1 GPIO pi ns (P0[7:0] and P1[2 :0]) for the hardware interface. Each po rt can be configured as in puts with internal pull-ups, open drain outputs, or tr aditional CMOS outputs.
CY7C651 13C Document #: 38-08002 Rev . *D Page 18 of 49 9.1 GPIO Configurat ion Port Every GPIO port can be programmed as input s with internal pull-ups, outp uts LOW or HI GH, or Hi-Z (floating, the pin i s not driv en internally). In addition, the in terrupt polarity for each port can be programmed.
CY7C651 13C Document #: 38-08002 Rev . *D Page 19 of 49 Q1, Q2, and Q3 discussed below are the transistors referenced in Figu re 9-1 . The available GPIO drive strength are: • Output LOW Mode : The pin’s Data Register is set to ‘0.
CY7C651 13C Document #: 38-08002 Rev . *D Page 20 of 49 Bit [7:0]: T imer lower eight bits. Bit [3:0]: Timer higher nibble Bit [7:4]: Reserved . 1 1.0 I 2 C Configuration Regis ter Internal hardware suppo rts communication with extern al devices through an I 2 C-compatible interfa ce.
CY7C651 13C Document #: 38-08002 Rev . *D Page 21 of 49 12.0 I2C-compatible Controll er The I2C-compatible block provides a versatile two-wire comm unication with external devices , supp orting master , slave, and multi-master modes of operation.
CY7C651 13C Document #: 38-08002 Rev . *D Page 22 of 49 Bit 7 : MSTR Mode Setting this bit to 1 ca uses the I 2 C-compatible block to initiate a master mode transaction by sendi ng a start bit and transmitting the first data byte from the data register (this typ i cally holds the target address and R/W bit).
CY7C651 13C Document #: 38-08002 Rev . *D Page 23 of 49 13.0 Processor St atus and Control Register Bit 0: Run This bit is manipulated by the HAL T inst ructio n. When Halt is executed, all the bi ts of the Processo r S tatus and Control Register are cleared to 0.
CY7C651 13C Document #: 38-08002 Rev . *D Page 24 of 49 14.0 Interrupts Interrupts are generated by GPIO pins, internal timers, I 2 C-comp atib le operation, internal USB hub and USB traffic conditions. All interrupts are maskable by the Global Interrupt Enable R egi ster and the USB End Poin t Interrupt Enable Register .
CY7C651 13C Document #: 38-08002 Rev . *D Page 25 of 49 During a reset, the contents of the Global Interrupt Enable Regi ster and USB End Point Interrupt Enable Register are cleare d, effectively disabling all interrupts, The interrupt controller contains a separate flip-fl op for each interrupt.
CY7C651 13C Document #: 38-08002 Rev . *D Page 26 of 49 Although Reset is not an in terrupt, the first instructi on executed after a rese t is at PROM address 0x0000h—wh ich corresponds to the first entry in the Interrupt V ector T abl e. Because the JMP instruction is two bytes long, the interrupt vectors occupy t wo bytes.
CY7C651 13C Document #: 38-08002 Rev . *D Page 27 of 49 14.5 USB End point Interrupts There are five USB endpoint interrupts, one per endpoint. A USB endpoint interrupt is generated after the USB host writes to a USB endpoint FIFO or after the USB controller sends a packet to the USB host.
CY7C651 13C Document #: 38-08002 Rev . *D Page 28 of 49 3. In sl ave transmit mode, after the slave transmits a byte of data: The ACK bit indicates i f the master that requeste d the byte acknowledged the byte.
CY7C651 13C Document #: 38-08002 Rev . *D Page 29 of 49 6. The host sends a request for the Device descrip tor using the new USB address. 7. Firmware decodes the request and retrieves the Device descriptor fro m program memory tables.
CY7C651 13C Document #: 38-08002 Rev . *D Page 30 of 49 Bit [0..3] : Port x S peed (where x = 1..4). Set to 1 if the device plugged in to Port x is Low S p eed; Set to 0 if the device plugged in to Port x is Full S peed. Bit [4..7] : Rese rved. Set to 0.
CY7C651 13C Document #: 38-08002 Rev . *D Page 31 of 49 The downstream USB ports are designed for connection of USB devices, but can also serve as output ports under firmware control. This all ows unused USB ports to be used for functions su ch as driving LEDs or providin g add itional input signals.
CY7C651 13C Document #: 38-08002 Rev . *D Page 32 of 49 . Bit [0..3] : Port x Diff Data (where x = 1..4). Set to 1 if D+ > D- (forced differential 1, if signal is differential, i.e. not a SE0 or SE1). Set to 0 i f D- > D+ (forced diff erential 0, if signal is differential, i.
CY7C651 13C Document #: 38-08002 Rev . *D Page 33 of 49 Bit [0..3] : Resume x (where x = 1..4). When set to 1 Port x requesting to be resumed (set by hardware); default state is 0. Bit [4..7] : Rese rved. Set to 0. Resume from a selectively suspended port, with the hu b not in suspend, typically involves the following actions: 1.
CY7C651 13C Document #: 38-08002 Rev . *D Page 34 of 49 Bit 3: Bus Activity . This is a “sticky” bit that in dicates if any non-idle USB event has occurr ed on the upstream USB port. Firmware s h ould check and clear this bit periodi cally to detect any loss of bus activity .
CY7C651 13C Document #: 38-08002 Rev . *D Page 35 of 49 When the SIE writes data to a FIFO, the inte rnal data bus is driven by the SIE; not the CPU. This causes a sh ort delay in the CPU operation. The delay is thre e clock cycles per byte. For example, an 8-byte data write by the SIE to the FIFO generates a delay of 2 µ s (3 cycles/byte * 83.
CY7C651 13C Document #: 38-08002 Rev . *D Page 36 of 49 Bits[6:0] of the endpoint 0 mode register are locked from CPU write o perations whenever the SI E has updated o ne of these bits, which the SIE does only at the end of the token phase of a tran saction (SETUP .
CY7C651 13C Document #: 38-08002 Rev . *D Page 37 of 49 Bit 6: Data V alid. This bit is set on receiving a pro per CRC when the endpoint FIFO buffer is loaded with data during transactions. Thi s bit is used OUT and SETUP tokens only . If the CRC is not co rrect, the endpoint interrupt occurs, but Data V alid is cleared to a zero.
CY7C651 13C Document #: 38-08002 Rev . *D Page 38 of 49 A C K 1. IN T ok e n H O S T D E V I C E S Y N C IN A D D R C R C 5 E N D P S Y N C D A T A 1/0 C R C 16 S Y N C Dat a Token Packet Data Packet .
CY7C651 13C Document #: 38-08002 Rev . *D Page 39 of 49 18.0 USB Mode T ables Mode This lists the mnemonic given to the different modes that can be set in the Endpoint Mode Register by writing to the lower ni bb le (bits 0..3). The bit settings for different modes are covered in the column ma rked “Mode Bits”.
CY7C651 13C Document #: 38-08002 Rev . *D Page 40 of 49 Comments Some Mode Bits are automatically chan ged by the SIE in respons e to certain USB transactions.
CY7C651 13C Document #: 38-08002 Rev . *D Page 41 of 49 . T able 18 -3. Details of Modes for Differing T raffic Conditions (see T able 18-2 for the decod e legend) SETUP (if accepting S ETUPs) Propert.
CY7C651 13C Document #: 38-08002 Rev . *D Page 42 of 49 0 0 1 0 Out !=2 UC valid updates 1 updates UC UC 1 UC 0 0 1 1 S tall yes 0 0 1 0 Out > 10 UC x UC UC UC UC UC UC UC NoChange ignore no 0 0 1 .
CY7C651 13C Document #: 38-08002 Rev . *D Page 43 of 49 19.0 Register Summary Address Register Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Read/Write/B oth/–[7] Default/ Reset GPIO CONFIGURA TION PORTS 0 AND 1 0x00 Port 0 Data P0.7 P0.6 P0.
CY7C651 13C Document #: 38-08002 Rev . *D Page 44 of 49 HUB PORT CONTROL, STA TUS, SUSPEN D RESUME, SE0, FORCE LOW 0x48 Hub Port Connect S tatus Reserved Reserved Reserved Reserved Port 4 Connect Sta .
CY7C651 13C Document #: 38-08002 Rev . *D Page 45 of 49 20.0 Sample Schematic 21.0 Absolute Maximum Ratings S torage T emperature ...................... ......................... ......................... ......................... .......... .........
CY7C651 13C Document #: 38-08002 Rev . *D Page 46 of 49 22.0 Electrical Characteristics f OSC = 6 MHz; Operating T emperature = 0 to 70°C, V CC = 4.0V to 5.25V Parameter Description Conditions Min. Max. Unit General V REF Reference V oltage 3.3V ±5% 3.
CY7C651 13C Document #: 38-08002 Rev . *D Page 47 of 49 23.0 Switching Characteristics (f OSC = 6.0 MHz) Parameter Description Min. Ma x. Unit Clock Source f OSC Clock Rate 6 ±0.25% MHz t cyc Clock Period 166.25 167.08 ns t CH Clock HIGH time 0.45 t CYC ns t CL Clock LOW time 0.
CY7C651 13C Document #: 38-08002 Rev . *D Page 48 of 49 © Cypress Semi conductor Corpora tion, 2006. The i n formation con tained herein is subject to change without notice. Cy press Semic onductor Corpo r ation assumes no responsib il ity for the use of any circuitry o ther than circuitry embodied in a Cypress prod uct.
CY7C651 13C Document #: 38-08002 Rev . *D Page 49 of 49 Document History Page Document Title: CY7C651 13C USB Hub with Microcontroller Document Number: 38 -08002 REV .
Un point important après l'achat de l'appareil (ou même avant l'achat) est de lire le manuel d'utilisation. Nous devons le faire pour quelques raisons simples:
Si vous n'avez pas encore acheté Cypress CY7C65113C c'est un bon moment pour vous familiariser avec les données de base sur le produit. Consulter d'abord les pages initiales du manuel d'utilisation, que vous trouverez ci-dessus. Vous devriez y trouver les données techniques les plus importants du Cypress CY7C65113C - de cette manière, vous pouvez vérifier si l'équipement répond à vos besoins. Explorant les pages suivantes du manuel d'utilisation Cypress CY7C65113C, vous apprendrez toutes les caractéristiques du produit et des informations sur son fonctionnement. Les informations sur le Cypress CY7C65113C va certainement vous aider à prendre une décision concernant l'achat.
Dans une situation où vous avez déjà le Cypress CY7C65113C, mais vous avez pas encore lu le manuel d'utilisation, vous devez le faire pour les raisons décrites ci-dessus,. Vous saurez alors si vous avez correctement utilisé les fonctions disponibles, et si vous avez commis des erreurs qui peuvent réduire la durée de vie du Cypress CY7C65113C.
Cependant, l'un des rôles les plus importants pour l'utilisateur joués par les manuels d'utilisateur est d'aider à résoudre les problèmes concernant le Cypress CY7C65113C. Presque toujours, vous y trouverez Troubleshooting, soit les pannes et les défaillances les plus fréquentes de l'apparei Cypress CY7C65113C ainsi que les instructions sur la façon de les résoudre. Même si vous ne parvenez pas à résoudre le problème, le manuel d‘utilisation va vous montrer le chemin d'une nouvelle procédure – le contact avec le centre de service à la clientèle ou le service le plus proche.