4−1 GPIO Assignment for Matrix Scan and LED Drive4−1. . . . . . . . . . . . . . . . . . . . .
v
vi
1 Introduction
The TUSB2136 is an integrated universal serial bus (USB) hub with a general-purpose 8052 microcontroller that can
be used for various USB controller applications. The TUSB2136 has 8K × 8 RAM space for application development.
Using a 12-MHz crystal, the onboard oscillator generates the internal system clocks. No additional programming is
required for any part of the hub functions. The device is programmed via an inter-IC (I
on from an EEPROM, or optionally, the application firmware can be downloaded from a host PC via USB. The
8052-based microprocessor allows several third-party standard tools to be used for application development. In
addition, the application code available in the general market can also be used (this may or may not require some
code modification due to hardware variations).
1.1Features
•Multiproduct support with one code and one chip (up to 16 products with one chip)
•Fully compliant with the USB specification as a compound full-speed device: TID #30270119
•Supports 1.5- and 12-Mbits/s USB data rates
•Supports USB suspend/resume and remote wake-up operation
•Integrated two-port hub with individual power management per port
•Integrated 8052 microcontroller with:
−256 × 8 RAM for internal data
−8K × 8 RAM code space available for downloadable firmware from host or I
−512 × 8 shared RAM used for data buffers and endpoint descriptor blocks (EDB) [1]
−Four 8052 GPIO ports (ports 0,1, 2 and 3)
−Master I
−Watchdog timer
2
C controller for external slave device access
2
C) serial interface at power
2
C port.
•Operates from a 12-MHz crystal
•On-chip PLL generates 48 MHz
•Supports a total of three input and three output (interrupt, bulk) endpoints
•Power-down mode
•64-pin TQFP package
[1] This is the buffer space for USB packet transactions.
DM019I/ODifferential data-minus USB port 0: upstream
DM16I/ODifferential data-minus port 1: downstream
DM263I/ODifferential data-minus port 2: downstream
DP018I/ODifferential data-plus USB port 0: upstream
DP17I/ODifferential data-plus port 1: downstream
DP264I/ODifferential data-plus port 2: downstream
GND5, 20, 24,
P3.256I/OGeneral-purpose I/O port 3 bit 2, Schmitt-trigger input, 100-µA active pullup, open-drain output†; INT0
P3.355I/OGeneral-purpose I/O port 3 bit 3, Schmitt-trigger input, 100-µA active pullup, open-drain output
P3.[4:7]54, 53, 52,51I/OGeneral-purpose I/O port 3 bit 4, Schmitt-trigger input, 100-µA active pullup, open-drain output
—Power supply ground
I/OGeneral-purpose I/O port 0 bits 0−7, Schmitt-trigger input, 100-µA active pullup, open-drain output
I/OGeneral-purpose I/O port 1 bits 0−7, Schmitt-trigger input, 100-µA active pullup, open-drain output
I/OGeneral-purpose I/O port 2 bits 0−7, Schmitt-trigger input, 100-µA active pullup, open-drain output
P3.0: General-purpose I/O port 3 bit 0, Schmitt-trigger input, 100-µA active pullup, open-drain output
S0: See Section 2.6.12
RXD: Can be used as a UART interface
I/OP3.1: General-purpose I/O port 3 bit 1, Schmitt-trigger input, 100-µA active pullup, open-drain output
I/OS1: See Section 2.6.12
I/OTXD: Can be used as a UART interface
only used internally (see Section 2.9.4)
†;
may support INT1
input, depending on configuration (see Figure 2−5)
†
†
†
†
†
†
1−4
PUR17OPullup resistor connection pin (3-state); push-pull CMOS output (±8 mA)
PWRO13OPort 1: power on/off control signal; push-pull CMOS output (±8 mA)
PWRO22OPort 2: power on/off control signal; push-pull CMOS output (±8 mA)
RST13IController master reset signal, Schmitt-trigger input, 100-µA active pullup
S28IGeneral-purpose input; can be used for VID/PID selection under firmware control. This input has no
S39IGeneral-purpose input. This input has no internal pullup, so it must be driven/pulled either low or high
SCL12OSerial clock I2C; push-pull output
SDA11I/OSerial data I2C; open-drain output
SELF/BUS21IUSB power MODE select: self powered (HIGH), bus powered (LOW)
SUSP16OSuspend status signal: suspended (HIGH); unsuspended (LOW)
‡
TEST0
‡
TEST1
†
All open-drain output pins can sink up to 8 mA.
‡
The functions controlled by TEST0 and TEST1 are shown in the following table. Because these two pins have internal pullups, they can be left
unconnected for the default mode.
14ITest input 0, Schmitt-trigger input, 100-µA active pullup
15ITest input 1, Schmitt-trigger input, 100-µA active pullup
internal pullup, so it must be driven/pulled either low or high and connot be left unconnected.
and connot be left unconnected.
†
1.5Terminal Functions (Continued)
I/O
DESCRIPTION
TERMINAL
NAMENO.
V
CC
VDD18
VREN38IVoltage regulator enable: enable active LOW; disable active HIGH
X260O12-MHz crystal output
X161I12-MHz crystal input
†
During normal o p e r a t i o n , t h e i n t e r n a l 3 . 3 - t o 1 . 8 - V v o ltage regulator of the TUSB2136 is enabled and provides power to the core. To save power
during the suspend mode, the internal regulator is disabled. In this case, the pin becomes an input, and a simple external power source is required
to provide power to the core. This source needs to supply a very limited amount of power (10 µA maximum) within the voltage range of 1 V to
1.95 V.
NOTE 1: The MCU treats the outputs as open-drain types in that the output can be driven low continuously, but a high output is driven for two
10,39,62—Power supply input, 3.3 V typical
†
371.8 V. When VREN is low, 1.8 V must be applied to provide current for the core during suspend.
clock cycles and then the output is placed in a high-impedance state.
TEST0
00Selects 48-MHz clock input (from an oscillator or other onboard clock source)
01Reserved for testing purposes
10Reserved for testing purposes
11Selects 12-MHz crystal as clock source (default)
TEST1FUNCTION
1.6Revision History
VersionDateChanges
Dec−2000Initial Release
AFeb−20011. Clarified pin descriptions for P3.2 (56), P3.3 (55), and VDDOUT (37).
BJun−20021. Changed name of pin 37 from VDDOUT to VDD18 and enhanced pin description.
CApr−20031. Simplified Terminal Function Table for GPIO Ports
2. Add red/write capability for each of the register bits.
3. Corrected Quiescent and Suspend current figures in Table 3.3.
4. Added Section 4.2 Reset Timing
5. Added NOTE to cover page.
2. Removed NOTE from cover page.
2. Clarified GPIO Port 3 pin descriptions in Terminal Function Table
3. Clarified functional description for Pins S2 and S3 (8 & 9)
5. Added note on open-drain output pins for Terminal Functions Table
6. Added additional note for operation of VDD18 (pin 37) to Terminal Functions Table.
7. Removed most references to ROM version including Fig 2.2.
8. Added USB Logo to Cover page
1−5
1−6
2 Functional Description
2.1MCU Memory Map
Figure 2−1 illustrates the MCU memory map under boot and normal operation. It must be noted that the internal 256
bytes of IDATA are not shown since it is assumed to be in the standard 8052 location (0000 to 00FF). The shaded
areas represent the internal ROM/RAM. For more information regarding the integrated 8052, see the TUSBxxxxMicrocontroller Reference Guide (SLLU044).
When the SDW bit = 0 (boot mode): The 6K ROM is mapped to address (0000−17FF) and is duplicated in location
(8000−97FF) in code space. The internal 8K RAM is mapped to address range (0000−1FFF) in data space. Buffers,
memory-mapped registers (MMRs), and I/O are mapped to address range (FD80−FFFF) in data space.
When the SDW bit = 1 (normal mode): The 6K ROM is mapped to (8000−97FF) in code space. The internal 8K RAM
is mapped to address range (0000−1FFF) code space. Buffers, MMR, and I/O are mapped to address range
(FD80−FFFF) in data space.
0000
17FF
1FFF
8000
97FF
FD80
Boot Mode (SDW = 0)
CODE
6K Boot ROM
6K Boot ROM
XDATA
8K
RAM
Read/Write
512 Bytes
RAM
Normal Mode (SDW = 1)
CODE
8K
Code RAM
Read Only
6K Boot ROM
XDATA
512 Bytes
RAM
FF80
FFFF
MMR
MMR
Figure 2−1. MCU Memory Map (TUSB2136B)
2.2Miscellaneous Registers
2.2.1TUSB2136 Boot Operation
Because the code space is in RAM (with the exception of the boot ROM), the TUSB2136 firmware must be loaded
from an external source. Two options for booting are available: an external serial EEPROM source connected to the
2−1
I2C bus, or the host can be used via the USB. On device reset, the SDW bit (in the ROM register) and the CONT bit
0
SDW
0
5
OVCE
0
6
XINT
0
in the USB control register (USBCTL) are cleared. This configures the memory space to boot mode (see memory
map, Table 2−2) and keeps the device disconnected from the host.
The first instruction is fetched from location 0000 (which is in the 6K ROM). The 8K RAM is mapped to XDATA space
(location 0000h). The MCU executes a read from an external EEPROM and tests to see if it contains the code (test
for boot signature). If it contains the code, the MCU reads from EEPROM and writes to the 8K RAM in XDATA space.
If not, the MCU proceeds to boot from USB.
Once the code is loaded, the MCU sets SDW to 1. This switches the memory map to normal mode, i.e. the 8K RAM
is mapped to code space, and the MCU starts executing from location 0000h. Once the switch is done, the MCU sets
CONT to 1 (in the USBCTL register) This connects the device to the USB, resulting in the normal USB device
enumeration.
2.2.2MCNFG: MCU Configuration Register
This register is used to control the MCU clock rate.
4−1R[3:0]No effect These bits reflect the device revision number.
5OVCE0
6XINT0
7RSV0Reserved
This bit enables/disables boot ROM.
SDW = 0When clear, the MCU executes from the 6K boot ROM space. The boot ROM appears in two
locations: 0000 and 8000h. The 8K RAM is mapped to XDATA space; therefore, read/write
operation is possible. This bit is set by the MCU after the RAM load is completed. The MCU
cannot clear this bit. It is cleared on power-up reset or function reset.
SDW = 1When set by MCU, the 6K boot ROM maps to location 8000h, and the 8K RAM is mapped to
code space, starting at location 0000h. At this point, the MCU executes from RAM, and write
operation is disabled (no write operation is possible in code space).
Hub overcorrect detection enable/disable bit.
OVCE = 0 Hub overcorrect detection is disabled.
OVCE = 1 Hub overcorrect detection is enabled.
INT1 source control bit
XINT = 0INT1 is connected to the P3.3 pin and operates as a standard INT1 interrupt.
XINT = 1INT1 is connected to the OR of port-2 inputs.
2.2.3PUR_n: GPIO Pullup Register for Port n (n = 0 to 3)
PUR_0: GPIO pullup register for port 0
PUR_1: GPIO pullup register for port 1
PUR_2: GPIO pullup register for port 2
PUR_3: GPIO pullup register for port 3
0The MCU can write to this register. If the MCU sets this bit to 1, the pullup resistor is disconnected from
the pin. If the MCU clears this bit to 0, the pullup resistor is connected to the pin. The pullup resistor is
connected to the VCC power supply.
2.2.4INTCFG: Interrupt Configuration
7
WDE
0
76 5 43210
RSVRSVRSVRSVI3I2I1I0
R/OR/OR/OR/OR/WR/WR/WR/W
BITNAMERESETFUNCTION
0−3I[3:0]0010The MCU can write to this register to set the interrupt delay time for port 2 on the MCU. The value of the
4−7RSV0Reserved
lower nibble represents the delay in ms. Default after reset is 2 ms.
2.2.5WDCSR: Watchdog Timer, Control, and Status Register
A watchdog timer (WDT) with 1-ms clock is provided. The watchdog timer only works when a USB start-of-frame has
been detected by the TUSB3210. If this register is not accessed for a period of 32 ms, the WDT counter resets the
MCU (see Figure 2−2, Reset Diagram). When the IDL bit in PCON is set, the WDT is suspended until an interrupt
is detected. At this point, the IDL bit is cleared and the WDT resumes operation. The WDE bit of this register is cleared
only on power-up or USB reset (if enabled). When the MCU writes a 1 to the WDE bit of this register the WDT starts
running.
76 5 43210
WDEWDRRSVRSVRSVRSVRSVWDT
R/WR/WR/OR/OR/OR/OR/OW/O
BITNAMERESETFUNCTION
0WDT0The MCU must write a 1 to this bit to prevent the WDT from resetting the MCU. If MCU does not write a 1 in a
5−1RSV0Reserved
6WDR0
7WDE0
period of 31 ms, the WDT resets the device. Writing a 0 has no effect on the WDT. (The WDT is a 5-bit
counter using a 1-ms CLK). This bit is read as 0.
Watchdog reset indication bit. This bit indicates if the reset occurred due to power-on reset or watchdog
timer reset.
WDR = 0A power-up or USB reset occurred.
WDR = 1A watchdog time-out reset occurred. To clear this bit, the MCU must write a 1. Writing a 0 has
1RSV0Reserved
3−2GF[1:0]00General-purpose bits. The MCU can write and read them.
6−4RSV0Reserved
7SMOD0Double baud-rate control bit. For more information see the UART serial interface in the M8052 core
MCU idle mode bit. This bit can be set by the MCU and is cleared only by the INT1 interrupt.
IDL = 0The MCU is not in idle mode. This bit is cleared by the INT1 interrupt logic when INT1 is
IDL = 1The MCU is in idle mode and RAM is in low-power mode. The oscillator/APLL is off and the
specification.
asserted for at least 400 µs.
WDT is suspended. When in suspend mode, only INT1
and generate an interrupt. INT1
recognized.
must be asserted for at least 400 µs for the interrupt to be
can be used to exit from the idle state
2.3Buffers + I/O RAM Map
The address range from FD80 to FFFF is reserved for data buffers, setup packet, endpoint descriptor blocks (EDB),
and all I/O. RAM space of 512 bytes [FD80−FF7F] is used for EDB and buffers. The FF80−FFFF range is used for
memory-mapped registers (MMR). Table 2−1 represents the internal XDATA space allocation.
Table 2−1. XDATA Space
DESCRIPTIONADDRESS RANGE
(MMR)
Endpoint descriptor blocks
Setup packet buffer
Input endpoint-0 buffer
Output endpoint-0 buffer
FFFF
FF80
FF7F
↑
FF08
FF07
↑
FF00
FEFF
↑
FEF8
FEF7
↑
FEF0
FEEF
512 -Byte
2−4
FD80
Loading...
+ 36 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.