Professional Documents
Culture Documents
USB Bus Interface Chip CH375
USB Bus Interface Chip CH375
1. Introduction
CH375 is a USB bus universal interface chip, supports USB-HOST Mode and USB-DEVICE/SLAVE
Mode. There are 8-bit data bus and read, write, chip select control wire and interrupt output in CH375.It is
convenient to link CH375 to control system bus of MCU/DSP/MPU.CH375 also provides serial
communication in USB-HOST mode. It connects with DSP/MCU/MPU through serial input, output and
interrupt output.
The USB device mode of CH375 is compatible with CH372, and CH375 incorporates all functions of
CH372. For USB-DEVICE/SLAVE mode operation and specification, please refer to the CH372
specification. This data sheet only covers USB-HOST mode operation.
The USB-HOST mode of CH375 supports common USB full-speed devices. Peripheral MCU can
communicate with USB device through CH375 according relevant USB protocol. The CH375 configures
firmware of special communication protocol inside which can deal with Mass-Storage. Peripheral MCU can
read and write general USB store devices (including USB HD, USB flash and USB flash drive) directly
while sector as unit.
D [7-0]
The local
controller
MCU
DSP
MCU
MPU
etc
INT#
CS#
A0
RD#
WR#
The
interface
chip
CH375
D+
D-
Computer or USB
device
such as
USB printer
USB
keyboard/mouse
USB flash
external HD
USB flash
derive /flash
etc
2. Features
Full-speed USB-HOST interface, conforms to USB Specification Version 2.0, only needs crystal and
capacitance external.
Full-speed USB device interface, compatible with CH372, supports exchanging USB-HOST mode and
USB-DEVICE/SLAVE mode dynamically.
Input and output buffers of host endpoint occupy 64-byte respectively, supports common full-speed USB
device with 12Mbps and low-speed device with 1.5Mbps.
Supports USB device control transfer, bulk transfer and interrupt transfer.
Detects USB device plug and unplug automatically and sends message to USB host.
Configures protocol processor control transfer inside to simplify usual control transfer.
Set up firmware of special communication protocol to do with Mass-storage. Supports Bulk-Only transfer
protocol and USB storage device of SCSI, UFI, RBC and other equivalent storage device which
accommodates the minimum set of command including USB HD, USB flash and USB flash drive.
Reaches MCU reads and writes the file of USB storage device through file layer subprogram in USB flash
drive.
Parallel interface contains 8-bit data bus and 4 control wires i.e. read, write, chip select input and interrupt
output
Serial interface embodies serial input, output and interrupt. Adjusts communication baud rate dynamically.
Source power is 5V or 3.3V, and low-power mode is supported.
Adoption SOP-28 lead-free package, compatible with RoHS, supplies diversion board from SOP28 to
DIP28, the pins are compatible with CH374.
3. Package
Package shape
SOP-28
Width of plastic
Pitch of pin
Instruction of package
Ordering type
CH375B
4. Pins
Pin No.
Pin Name
Pin Type
Pin Description
28
VCC
POWER
12, 23
GND
POWER
V3
POWER
13
XI
IN
14
XO
OUT
10
UD+
USB signal
11
UD-
USB signal
2215
D7D0
Bi-directional
tri-state
RD#
IN
WR#
IN
27
CS#
IN
INT#
OUT
IN
OUT
24
AO
ACT#
TXD
IN
OUT
RXD
IN
RSTI
IN
25
RST
OUT
26
RST#
OUT
NC
NC
5. Command
The data in this manual has three types. Binary numbers are followed by a B. Hexadecimal numbers
are followed by an H. Numbers without annotations are decimals.
The MCU referred in this manual are basically applied to DSP or MCU/MPU/SCM and so on.
The manual mainly supplies commands of USB storage device, specially uses to USB Mass-storage.
Commands of executing and controlling transfer can refer to the second manual, please consult CH372 sheet
about the command on USB device mode.
Code
Command name
01H
GET_IC_VER
02H
SET_BAUDRATE
03H
ENTER_SLEEP
05H
RERET_ALL
06H
CHECK_EXIST
Input data
Output data
Functions
Version number
Any data
38H
0AH
GET_MAX_LUN
0BH
SET_DISK_LUN
15H
SET_USB_MODE
16H
TEST_CONNECT
17H
ABORT_NAK
22H
GET_STATUS
28H
RD_USB_DATA
2BH
WR_USB_DATA7
51H
DISK_INIT
Produce interruption
53H
DISK_SIZE
Produce interruption
54H
DISK_READ
Produce interruption
55H
DISK_RD_GO
Produce interruption
56H
DISK_WRITE
57H
DISK_WR_GO
Produce interruption
58H
DISK_INQUIRY
Produce interruption
59H
DISK_READY
Produce interruption
5AH
DISK_R_SENSE
Produce interruption
Data 34H
(wait for20uS)
Operation status
Interruption status
Data length
Data stream
Data length
Data stream
LBA address
Sector number
LBA address
Sector number
Produce interruption
If the output data of command is operation state, please consult the following table.
State code
State name
State explanation
51H
CMD_RET_SUCCESS
Operation successful
5FH
CMD_RET_ABORT
Operation failure
CH375.After the reset, the default communication baud-rate of CH375 is 9600bps when it works serial
communication mode. Through the order adjusts serial communication baud-rate dynamically if the MCU
supports upper communication speed. The command needs to input baud-rate detach frequency coefficient
and detach frequency const.
Usually, the active of set baud-rate costs within 1mS,then the CH375 output operation state according
the new-setting communication baud-rate. Consequently, the MCU regulates itself communication baud-rate
after giving the order out.
Many detach frequency coefficient and detach frequency constant corresponding serial communication
baud-rate is given below.
Detach freq coef
Error
02H
B2H
9600
0.16%
02H
D9H
19200
0.16%
03H
98H
57600
0.16%
03H
CCH
115200
0.16%
03H
F3H
460800
0.16%
07H
F3H
921600
0.16%
03H
C4H
100000
0%
03H
FAH
1000000
0%
03H
FDH
2000000
0%
02H
Const
Formula: 750000/(256-const)
03H
Const
Formula: 6000000/(256-const)
current logical unit number are needed to input. Some USB storage device supports multiplied logical units,
CH375 visits the 0# unit in default after initializing USB storage device. Selects current logical unit number
through command of SET_DISK_LUN to visit other logical unit.
requests. MCU receives interrupt status, analyzes interrupt and deal with interrupt after the CH375 sends
interrupt to MCU.
The byte of interruption state
Sort of interruption
00H0FH
10H1FH
20H3FH
State name
14H
USB_INT_SUCCESS
15H
USB_INT_CONNECT
16H
USB_INT_DISCONNECT
17H
USB_INT_BUF_OVER
Buffer overflow
1DH
USB_INT_DISK_READ
1EH
USB_INT_DISK_WRITE
1FH
USB_INT_DISK_ERR
The following is operation failure status of USB-HOST mode used to analyze the reasons induce failure.
The byte of interrupt status
Name
Bit 7bit 6
Reserved
00
Bit 5
Flag
1,failture flag
Bit 4
Synchronous sign of IN
transaction
Bit 3bit 0
USB_INT_DISK_ERR or USB_BUF_OVER when USB device is unidentified or the USB storage device is
unsupported. The operation state is USB_INT_SUCCESS if the USB device is successfully initialized.
DISK_WR_GO to make CH375 continue to write. The CH375 reactive until write all data and requests
interrupter for the last time, also, the MCU gets interrupter state as the whole writing operation state. If the
operation is successful, the state is USB_INT_SUCCESS, otherwise may be USB_INT_DISK_ERR.
Normally, MCU will receive nine (8+1) interrupters even MCU sends DISK__READ to write one
sector because of the length of sector number is 512 bytes. The former eight interrupters are asking MCU to
supply data while the later interrupter returns to the final operation state. When writing four sector, MCU
will get thirty-three (4*8+1) interrupters as the former thirty-two are asking MCU to supply data. If the
writing operation is failure in midway, MCU may receive USB_DISK_ERR to end the writing operation in
advanced.
6. Functions Description
6.1 General Description
CH375 can work in the mode of both USB-HOST and USB-DEVICE/SLAVE.
The USB-DEVICE/SLAVE mode of CH375 is compatible with CH372, and relative information can
refer to the manual of CH372.
The USB-HOST mode of CH375 supports parallel and serial interface. The CH375 also supports
various common full-speed devices of USB while peripheral MCU communicates with USB device added
firmware program according relative USB protocol in the USBHOST mode. External MCU communicates
with USB device directly for CH375 set interrelated protocol inside of USB storage devices.
10
WR#
RD#
A0
D7-D0
X/Z
X/Z
1/X
IN
1/X
IN
OUT
OUT
11
UD+ and UD- are signal bus of USB directly connect to USB bus when works in the USB-DEVICE
mode. They can attach to USB device directly on USB-HOST. The direct or alternating current equal serial
resistance is within 5 which protects chip to serial link of insure resistance, inductance or ESD.
The chip CH375 set power-up reset circuit inside, and external supplies reset is not need in generally.
RSTI inputs asynchronous reset signal from outside. The ch375 is reset when RSTI is high-level. When
RSTI recovered to low-level, CH375 will go on time-lapse reset about 20mS and step into work normally. In
order to reduce external disturb and make sure of reset during power-up, capacitance about 0.47uF can attach
between RSTI and VCC. RST and RST# are output reset state pin, act with high-level and low-level
respectively. They output high-level and low-level respectively if CH375 is power-up reset or forced to reset
by outside circuit or reset time-lapse. After reset RST and RST# recovered to low-level and high-level. RST
and RST# offer power-up reset signal to external MCU.
The CH375 needs outside clock of 12MHz to work normally. In common, clock signal is generated by
inverter in CH375 through oscillating of crystal keeping frequency. A crystal of 12MHz between XI and XO,
XI and XO connect a high frequency oscillator capacitance to ground respectively can compose the
peripheral circuit. The 12MHz clock signal directly input to XI while suspending XO.
CH375B supports 3.3V or 5V .The VCC pin inputs external 5V power and V3 pin connects to power
decoupling capacitance with the capacity from 4700pF to 0.02uF when with 5V power. The V3 must attach
to VCC and input external 3.3V power while work power is 3.3V.In addition, the power of other circuit
connection of CH375 is not surpass 3.3V.
12
13
7. Parameter
7.1. Absolute maximum rating (Stresses above those listed can cause permanent damage to the device.
Exposure to maximum rated conditions can affect device operation and reliability.)
Name
Parameter note
CH375B VCC=5V
TA
Min.
Max.
-40
85
Units
CH375B VCC=3.3V
-40
85
TS
Storage temperature
-55
125
VCC
-0.5
6.5
VIO
-0.5
VCC+0.5
7.2. Electrical parameter (test conditions: TA=25,VCC=5V,exclude pin connection of USB bus)
(The every current parameter must multiply the coefficient of 40% when the power is 3.3V)
Name
Note of parameter
Min.
Typical
Max.
4.5
5.3
3.3
3.3
3.6
VCC=5V
12
30
VCC=3.3V
15
VCC
Power
ICC
ISLP
VCC=5V
Units
V
mA
0.15
mA
VCC=3.3V
0.05
VIL
-0.5
0.7
VIH
2.0
VCC+0.5
VOL
0.5
VOH
VCC-0.5
IUP
40
80
160
uA
IDN
-80
-140
-240
uA
VR
2.4
2.7
3.0
Note: When ACT# is low-level, it can draw 4mA current from USB bus. When ACT# is high-level, it
output 200uA current.
INT# and TXD supply 80uA high-level output current during CH375 reset.
7.3. Time sequence parameter (test conditions: TA=25,VCC=5V,refer the following picture)
(RD implies RD# and CS# are active, execute read operation when RD#=CS#=0)
(WR implies WR# and CS# are active, execute write operation when WR#=CS#=0)
Name
Explanation of parameter
Min.
Typical
Max.
Units
FCLK
11.995
12.00
12.005
MHz
TPR
18
30
40
mS
TRI
100
TRD
18
nS
30
40
mS
14
TE1
30
40
mS
TE2
10
20
uS
TE3
uS
TE4
1000
uS
TE0
uS
TSX
TSC
100
1.5
1.5
uS
1.5
100
uS
TSD
0.6
100
uS
TWW
60
10000
nS
TRW
60
10000
nS
TAS
nS
TAH
nS
TIS
nS
TIH
nS
TON
30
nS
TOF
20
nS
TINT
1.5
uS
TWAK
10
mS
8. Application
8.1. Parallel interface mode (the following diagram)
The following diagram is CH375 connection of common MCS-51 circuit. The TXD of CH375 connects
to ground through about 1K pull-down resister or directly connects to ground. So the CH375 works on the
parallel manner.
15
The USB bus contains a double power bus and a double data signal bus. Usually, +5V power wire is red,
ground wire is black, D+ signal wire is green and D- is white. The USB receptacle P1 connects to USB
device directly. In need, serial connects flash switch with limiting current in +5V power bus that supplies to
USB device. The USB power must be 5V.
The capacitance C3 eliminates the coupling of inner power of CH375.The capacity of C3 is 4700pF to
0.02uF.It is made of monolithic or high frequency ceramic. The C4 and C5 are used to decoupling of
external power. The C4 is 0.1uF and made of monolithic or high frequency ceramic. The crystal X1,
capacitance C1 and C2 are composed of clock oscillating circuit of CH375.The USB-HOST mode needs
exact frequency. The frequency of X1 is 12MHz0.4,C1 and C2 are monolithic or high frequency ceramic
capacitors of 15pF30pF.
In order to reset CH375 credibly, the time is below 100mS when the power raises from 0V to 5V.If the
process of power-up is slow and discharge is not in time when cut the power, and the CH375 reset is not
credible. One solution is to connect a capacitance of 0.47uF between RSTI and VCC to delay the reset time.
If the source power of CH375 is 3.3V, connect V3 and VCC, and input 3.3V, take the C3 out.
When designing the PCB, pay much attention to some notes: decoupling capacitance C3 and C4 must
keep near to connection pin of CH375; makes sure D+ and D- are parallel and supply ground net or pour
copper beside them to decrease the disturbance from outside signal; the relevant signal between X1 and X2
must be kept as short as possible. In order to lessen the high frequency clock disturbance, play ground net or
pour copper to the relative equipment.
16
The CH375 has the common passive parallel interface, connects to various MCU, DSP and MCU
directly. In common MCS-51 typical application circuit, CH375 can connects to system bus of MCU through
8-bit passive parallel interfaces D7D0, -RD, -WR, -CS and A0.
If the MCS-51 has not lock A7 A0 through U3,uses the P20 of U2 to drive the address bus A0 of
CH375 and modify the port address of MCU program.U4 takes charge of simple address encoding, produces
chip selection signal in need. The chip selection address varies from B000H to BFFFH of CH375 in the
image while occupies two address in actually. The BXX1H used to write commend as the BXX0H used to
read or write data.
17
8.3. MCU read and write file to USB flash drive (the file layer interface of USB storage device)
The file layer API interface
The file system layer of
FAT32/16/12
The command layer of
SCSI/UFI/RBC
In general, MCU or embed system deal with file system of USB storage device need to achieve four
layers in the left of upper picture. The right of upper picture is inner configure layer of USB storage device.
Because CH375 is not only a common USB-HOST hardware interface chip, but also set relative firmware
program inside, contains three layers of the left upper picture (the grayer block). The real MCU only to deal
with file system layer of FAT and even this layer can handle by file layer subprogram congregation in USB
flash drive of CH375.
The CH375 offers data bulk read and write interface directly if no need to deal with file system i.e. the
top layer of the left upper picture. Taking 512-byte or 2K-byte physical sector as unit to read and write
simplifies the USB storage device as peripheral data storage. The MCU reads and write data in USB storage
device and defines data structure at random.
Because computer organizes the USB storage device as file system, in order to give convenience to
exchange data between MCU and computer through USB move storage device, MCU can also organize the
USB storage device as file system, i.e., handling the top of the left picture.
CH375 supplies USB storage device file layer interface through the subprogram congregation of C
language. These API contain common file layer operation and can transplant and embed to various program
in MCU.
The USB flash drive file layer subprogram congregation of CH375 has the following features: supports
general file system of FAT12FAT16 and FAT32;the capacity of disk up to 100GB;supports several layers
subdirectory; supports the capital letter with 8.3 format and file name of Chinese; supports lowercase and
long name of file ;supports open, create, delete, read, write, search of file and so on.
The file layer subprogram congregation of CH375 needs about 600 bytes RAM as buffer. Takes the
general MCS-51 as example, all the code of subprogram in file system vary from 4KB to 8KB,needs about
80 bytes internal RAM and 512 bytes external RAM as buffer. The detail information about file layer
subprogram congregation of USB flash drive can refer to the explanation of CH375 experimentation board.
After transferring each API in file layer subprogram congregation may return operation state but no
answer data. The note about API parameter refers to CH375HF?.H. The main subprograms are as follow:
Initialize CH375: CH375Init
Query the USB flash drive: CH375DiskReady
Demand the capacity of USB flash drive: CH375DiskSize
Query the information of USB flash drive (the total and the remain capacity): CH375DiskQuery
18