English
Language : 

C541U_99 Datasheet, PDF (94/192 Pages) Siemens Semiconductor Group – 8-BIT CMOS MICROCONTROLLER
On-Chip Peripheral Components
C541U
6.4.3 USB Memory Buffer Organization
The address generation of the USB memory buffer is based on address offset and base address
pointer. This scheme allows flexible and application specific buffer allocation and management. The
length of an endpoint buffer can be up to 8, 16, 32, or 64 bytes. The start address of each endpoint
buffer can be located to memory locations according table 6-5.
Table 6-5
USB Buffer Length and Base Addresses Values
Buffer Length
8 bytes
16 bytes
32 bytes
64 bytes
Valid Buffer Base Addresses
08H, 10H, 18H, 20H, 28H, 30H, 38H, 40H, 48H, 50H, 58H, 60H, 68H, 70H, 78H
10H, 20H, 30H, 40H, 50H, 60H, 70H
20H, 40H, 60H
40H
In order to avoid unused memory space between two endpoint buffers, the largest buffer should be
located at the highest address. This structure should be used to allocate USB memory for all
endpoint buffers. The base address for the setup packet is always located at address 00H. This
leads to a typical USB buffer structure as shown in figure 6-31 with a buffer length of 64 bytes for
endpoint 2, 16 bytes for endpoints 1 and 3, 8 bytes for endpoint 0, and a predefined length of 8 bytes
for endpoint 0 and the setup token.
7FH
Endpoint 2 Buffer
40H
Endpoint 3 Buffer
30H
Endpoint 1 Buffer
20H
Endpoint 0 Buffer 18H
Buffer Block
Endpoint 2
Endpoint 3
Endpoint 1
Endpoint 0
Setup Token
EPBAn
EPBA2=08H
EPBA3=06H
EPBA1=04H
EPBA0=03H
Adress 00H
on page 0
EPLENn
EPLEN2=40H
EPLEN3=10H
EPLEN1=10H
EPLEN0=08H
8 Bytes
Setup Token
00H
Figure 6-31
Endpoint Buffer Allocation (Example: 4 Endpoints)
Semiconductor Group
6-49
1999-04-01