•
•
Endpoint enable
Before using an endpoint, this must be enabled by setting the EPEN bit in the UEP-
CONX register.
An endpoint which is not enabled won’t answer to any USB request. The Default
Control Endpoint (Endpoint 0) should always be enabled in order to answer to USB
standard requests.
Endpoint type configuration
All Standard Endpoints can be configured in Control, Bulk, Interrupt or Isochronous
mode. The Ping-pong Endpoints can be configured in Bulk, Interrupt or Isochronous
mode. The configuration of an endpoint is performed by setting the field EPTYPE
with the following values:
–
–
–
–
Control:
EPTYPE = 00b
Isochronous:EPTYPE = 01b
Bulk:
EPTYPE = 10b
EPTYPE = 11b
Interrupt:
The Endpoint 0 is the Default Control Endpoint and should always be configured in
Control type.
•
•
Endpoint direction configuration
For Bulk, Interrupt and Isochronous endpoints, the direction is defined with the
EPDIR bit of the UEPCONX register with the following values:
–
–
IN:
EPDIR = 1b
EPDIR = 0b
OUT:
For Control endpoints, the EPDIR bit has no effect.
Summary of Endpoint Configuration:
Do not forget to select the correct endpoint number in the UEPNUM register before
accessing endpoint specific registers.
Table 120. Summary of Endpoint Configuration
Endpoint Configuration
EPEN
EPDIR
Xb
EPTYPE
XXb
00b
UEPCONX
0XXX XXXb
80h
Disabled
0b
Control
1b
Xb
Bulk-in
1b
1b
10b
86h
Bulk-out
1b
0b
10b
82h
Interrupt-In
1b
1b
11b
87h
Interrupt-Out
Isochronous-In
Isochronous-Out
1b
0b
11b
83h
1b
1b
01b
85h
1b
0b
01b
81h
108
AT8xC51SND2C
4341D–MP3–04/05