English
Language : 

C541U_99 Datasheet, PDF (95/192 Pages) Siemens Semiconductor Group – 8-BIT CMOS MICROCONTROLLER
On-Chip Peripheral Components
C541U
6.4.4 USB Memory Buffer Address Generation
The generation of an USB memory address for USB access (read or write) depends on the EPNum
(endpoint number) information, which has been transmitted to the USB module during the software
initialization procedure. This EPNum information is used for the selection of an endpoint specific
base address register. As the maximum data packet length of each endpoint can individually be
programmed, there are some fixed start addresses for the endpoints. The user program defines the
base address for the first data byte of the corresponding endpoint by writing the endpoint specific
base address register EPBAn. The length depends on the amount of data to be read or written. The
user must take care to assign a buffer space at least as large as the maximum packet size of the
endpoint.
The address of the currently accessed byte in the USB memory area of the selected endpoint is
defined by an address offset, which must be added to the endpoint base address in order to get the
correct address for the USB memory buffer. The structure is shown in figure 6-32.
EPBA 0
PAGE 0 0 0 0 A06 A05 A04 A03
EPBA 1
PAGE 1 0 0 0 A16 A15 A14 A13
EPBA 2
EPNum
PAGE 2 0 0 0 A26 A25 A24 A23
MUX
of the actual
EPBA 3
endpoint
PAGE 3 0 0 0 A36 A35 A34 A33
EPBA 4
PAGE 4 0 0 0 A46 A45 A44 A43
Page 1
An6 - An3
PAGEn
Page 0
EPBAn 0 An6 An5 An4 An3 0 0 0
+ ADROFF 0 0 AO5 AO4 AO3 AO2 AO1 AO0
= USB Memory Addr. 0 AD6 AD5 AD4 AD3 AD2 AD1 AD0
USB
Memory
Note: Only one bit of the bit pairs An5/AO5, An4/AO4,
An3/AO3 can be set at a time.
MCD03411
Figure 6-32
USB Memory Address Generation
With the software initialization of the USB module as described in section 6.4.5, each endpoint is
initialized with the EPNum value which is used at the USB memory address generation to select the
actual endpoint base address register. Further, in single buffer mode the bit PAGEn is used to select
one of the USB memory pages In dual buffer mode bit PAGEn has no effect.
Semiconductor Group
6-50
1999-04-01