
EM358x
126
Rev. 0.4
Figure 9-2. EM358x USB Application Circuit – Self Powered Device
9.7 Endpoints
EM358x supports up to six endpoints (in addition to the control endpoint 0). The USB peripheral is interfaced to
the CPU through memory mapped registers for control, and DMA for data.
Before the device will respond to the USB bus, it must be configured to define its endpoint status and enable the
device. Various decisions must be made as to the nature of the device — i.e. what endpoint types and their
number. All devices must have endpoint 0, which is a control endpoint. There are five endpoints that can be used
as either bulk or interrupt and one isochronous endpoint. The choice of bulk versus interrupt is done in the
endpoint descriptor.
Each endpoint can be enabled independently, except endpoint 0 which is always enabled. All endpoints have
both an IN (device to host, or TX) and OUT (host to device, or RX) direction. These function as independent
endpoints and can be enabled independently. In USB parlance the IN/OUT pair is a logical endpoint, whilst the
individual endpoints are physical endpoints. Physical endpoints are individually enabled through the
USB_ENABLEIN and USB_ENABLEOUT registers. It is possible to explicitly stall individual physical endpoint
directions with the registers USB_STALLIN and USB_STALLOUT. Explicitly stalled endpoints can only be un-
stalled explicitly.
While a single physical endpoint’s IN and OUT directions are enabled and stalled independently, the logical
endpoint type is the same for both directions.
Both directions on a given logical endpoint have the same max packet size.
Содержание EMBER EM358 series
Страница 2: ...EM358x 2 Rev 0 4 ...
Страница 7: ...EM358x Rev 0 4 7 ...