English
Language : 

38K0 Datasheet, PDF (28/133 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
38K0 Group
Endpoint Buffer Area Setting
The buffer area used in data transfer can be assigned to any area
of the multi-channel RAM for each endpoint.
qBuffer area beginning address
The buffer area configuration register (address 0FED16) defines
the beginning address of the buffer area (every 32 bytes) for each
Endpoint. However, the only RAM area is configurable.
•00h [Address 000016], 01h [Address 002016]: Not configurable
•02h [Address 004016] to 1Fh [Address 03E016]: Configurable
qInterrupt-source dependant buffer area offset address
An offset value is added to the beginning address of each source,
which is specified by the interrupt source register (address
001D16), for each endpoint.
This section describes in detail the beginning address specified by
the buffer area set register as offset address 00h, according to
each endpoint.
(1) Endpoint 00
Endpoint 00 has two kinds of interrupt sources for accessing the
buffer. The respective address offsets are:
•BSRDY00 (SETUP Buffer Ready Interrupt): Offset address = 00h
•BRDY00 (OUT or IN Buffer Ready Interrupt):
Offset address = 08h
(2) Endpoint 01
The buffer area offset address for each interrupt source for of End-
point 01 varies according to the contents of the EP01 set register
(address 001916).
•In single buffer mode (DBLB01 = “0”):
Endpoint 01 has only one interrupt source for accessing the
buffer.
B0RDY01 (Buffer 0 Ready Interrupt): Offset address = 00h
0FED16 = 15h
Memory
000016
0000 0010 1010 0000
002016
004016
006016
02A016
03E016
SFR
RAM
0FED16
00
Disabled to be used
01
02
03
15
1F
Fig. 27 Example setting of buffer area beginning address
•In double buffer mode (DBLB01 = “1”):
Endpoint 01 has two kinds of interrupt sources for accessing the
buffer.
B0RDY01 (Buffer 0 Ready Interrupt): Offset address = 00h
B1RDY01 (Buffer 1 Ready Interrupt):
The offset address varies according to the double buffer begin-
ning address set bit (BSIZ01).
-Offset address = 08h when BSIZ01 = 00
-Offset address = 10h when BSIZ01 = 01
-Offset address = 40h when BSIZ01 = 10
-Offset address = 80h when BSIZ01 = 11
(3) Endpoints 02 and 03
Same as Endpoint 01.
Notes
The selected RAM area must be within addresses 004016 to
03FF16.
Make sure the buffer area beginning address is set in agreement
with the offset address and the number of transmit/receive data
bytes.
This is particularly important when in the double buffer mode or
when handling 64-byte data.
(a) When selecting Endpoint 00 (b) When selecting Single Buffer Mode
(c) When selecting Double Buffer Mode
(when BSIZ01 = 11)
Memory
Offset
02A016
00h
BSRDY00
02A816
08h
BRDY00
Memory
02A016
Offset
00h
B0RDY01
Memory
Offset
02A016
00h
B0RDY01
032016
80h
B1RDY01
Fig. 28 Examples of interrupt source dependant buffer area offset address
Rev.3.00 Oct 05, 2006 page 28 of 129
REJ03B0192-0300