English
Language : 

C541U_99 Datasheet, PDF (113/192 Pages) Siemens Semiconductor Group – 8-BIT CMOS MICROCONTROLLER
On-Chip Peripheral Components
C541U
The bits of the endpoint buffer status registers indicate the status of the endpoint specific USB
memory buffers and allows setting of certain USB memory buffer conditions.
Endpoint Buffer Status Register EPBSn, n=0-4 (Address C2H)
Reset Value : 20H
Bit No.
C2H
MSB
7
UBFn
r
6
CBFn
r
5
DIRn
r
LSB
4
3
2
1
0
ESPn SETRDn SETWRn CLREPn DONEn EPBSn
w
w
w
w
w
Bit
UBFn
CBFn
DIRn
ESPn
SETRDn
Function
USB buffer full
Bit UBFn indicates the status of the USB memory buffer for endpoint n.
USB read access: If UBFn=0, the USB buffer for endpoint n is empty.
If UBFn=1, the USB buffer for endpoint n is not empty.
USB write access : If UBFn=0, the USB buffer for endpoint n is not full.
If UBFn=1, the USB buffer for endpoint n is full.
CPU buffer full
Bit CBFn indicates the status of the CPU memory buffer for endpoint n.
CPU read access: If CBFn=0, the CPU buffer for endpoint n is empty.
If CBFn=1, the CPU buffer for endpoint n is not empty.
CPU write access: If CBFn=0, the CPU buffer for endpoint n is not full.
If CBFn=1, the CPU buffer for endpoint n is full.
Direction of USB memory access
Bit DIRn indicates the direction of the last USB memory access for endpoint n.
If DIRn=0, the last data flow for endpoint n was from host to CPU.
If DIRn=1, the last data flow for endpoint n was from CPU to host.
Enable status phase
If bit ESPn is set, the next status phase of endpoint n will automatically be
acknowledged by an ACK except the endpoint n is stalled. If the status phase was
successfully completed, bit ESPn is automatically reset by hardware and no status
interrupt request (STI) is generated.
If the CPU detects a corrupted control transfer (endpoint 0), bit STALL0 should be
set by software instead of bit ESP0 in order to indicate an error condition which
cannot be recovered by the USB device itself.
Note : bit EPSn can only be set by software. Any read operation of register EPBSn
returns ESPn=0.
Set direction of USB memory buffer to read
Bit SETRDn is used to predict the direction of the next USB access for endpoint n
as an USB read access. A faulty prediction causes no errors since the USB
module determines the real direction. A change in the data direction is only
executed, if both USB memory buffers are empty. SETRD cannot be set together
with CLREPn because a change of bit DIRn during a transfer is not allowed.
Note : bits SETRDn and SETWRn must not be set at a time.
Semiconductor Group
6-68
1999-04-01