
USB DEVICE CONTROLLER
M66290AGP/FP
MITSUBISHI <DIGITAL ASSP>
29
Construction of endpoint (EP1 to EP5) FIFO
Transfer type
EPi_TYP[1:0]
Can be set to Bulk,
Interrupt, isochronous
transfer.
Transfer direction
EPi_DIR
Can be set to IN/OUT
Double buffer
(Toggle buffer)
EPi_DBLB
Can be set
Continuous
transmit/receive
EPi_RWMD
Can be set
(Effective in bulk transfer)
Buffer size
EPi_Buf_siz[3:0]
Can be set
(Up to 1024bytes by
a unit of 64bytes)
Can be set to
NAK, STALL, and
BUF(buffer control).
Response PID
EPi_PID[1:0]
DMA transfer
EPi_DMAE
Can be set
Receive data
read and abandon
mode
EPi_ACLR
Can be set
Max packet size
EPi_MXPS[9:0]
Can be set
( 0 to 1023bytes)
Register
EP1 to EP5
Examples of endpoint FIFO setting
FIFO
number
Memory
address
Endpoint setting
00h to
03h
000h to
0FFh
EP0:Control write transfer
Buffer size:256Bytes
Control write continuous receive
mode(CTRW)
FIFO area:256Bytes(4 blocks)
EP0:Control read transfer
Buffer size:256Bytes
Control read continuous transmit
mode(CTRR)
FIFO area:256Bytes(4 blocks)
EP2:Interrupt transfer(IN)
Buffer size:64Bytes
FIFO area:64Bytes(1 block)
EP4:Interrupt transfer(OUT)
Buffer size:64Bytes
FIFO area:64Bytes(1 block)
EP3:Bulk transfer(IN)
Buffer size:64Bytes
Double buffer constitution(DBLB)
FIFO area:128Bytes(2 blocks)
04h to
07h
100h to
1FFh
08h
200h to
23Fh
09h
240h to
27Fh
0Ah to
0Bh
280h to
2FFh
0Ch to
0Fh
300h to
3FFh
Not used:256Bytes(4 blocks)
10h to
2Fh
400h to
BFFh
EP1:Bulk transfer(OUT)
Buffer size:1024Bytes
Double buffer constitution(DBLB)
Continuous receive mode(RWMD)
FIFO area:2kBytes(32 blocks)
(4) Endpoint and FIFO control
Except for EP0 for control transfer, M66290A can set
five endpoints as EP1 to EP5.
Each of these five endpoints (EP1 to EP5) can be set to
bulk, interrupt, and isochronous transfer. And yet,
another constitution can configurated independently.
Below are the constitutions to be realized.
Built-in FIFO for endpoint buffer is 3kBytes totally of its
memory capacity. This FIFO of 3kBytes can divided
into each endpoint of EP0 to EP5 and to each endpoint,
can assign up to 1024Bytes (max) by a unit of 64Bytes.
Buffer size of each endpoint must be set to over the
capacity which is set in maximum buffer size.
In the buffer size, which is set, bytes of maximum
packet size is used for valid. (If set the buffer size to
128Bytes to the endpoint which maximum packet size
is set to 64Bytes, 64Bytes are valid)
We show setting examples to each of these buffer of
EP0 to EP5 below, and next explain about continuous
transmit and receive function, FIFO control, DMA
transfer, and double buffer.
Continuous transfer function
Continuous transfer function is to transmit/receive data
which extend plural transaction without occurring interrupt
to CPU.
For EP1 to EP5, this function is effective when transfer
type is bulk transfer.
In each endpoint, when continuous transfer mode is set,
it can transfer data up to the buffer size which is set to
the endpoint without occurring interrupt to CPU.
To use with double buffer constitution, 1kBytes x2
maximum of buffering is realized.
Continuous receive mode can receive data packet
continuously up to the buffer size which is set, or until
receives short packet. If the data to be received is data
packet of max packet size, it can receive continuously
up to the buffer size without occurring interrupt to CPU,
and if the data is data packet (max packet size) which is
less than buffer size, interrupt to CPU is not occurred.
In bulk transfer, when set max packet size as 64Bytes,
buffer size as 1024Bytes, and FIFO constitution as
double buffer, when received data of max packet size
as 16 times (1024Bytes), it became buffer redried
enable) and urge to CPU by interrupt to read received
data. When received short packet, ends the continuous
receive and buffer became redried enable).
Continuous transmit mode can transmit data packet
continuously up to buffer size which is set. Short packet
transmit can be done to set IVAL flag. And it is needed
to set IVAL flag to transmit a multiple data of maximum
packet size which is less than buffer size.
By set Null data transmit addition mode, when write a
multiple data of max packet size into buffer and
transmit, Null data can be transmitted automatically
after the last packet is transmitted .