
EM358x
Rev. 0.4
127
Table 9-1. Endpoints
Endpoint Number Max Packet Size in Bytes
Type
Direction Buffer Offset
Endpoint 0
8
Control
In
0x000
Out
0x008
Endpoint 1
8
Bulk or Interrupt
In
0x010
Out
0x018
Endpoint 2
8
Bulk or Interrupt
In
0x020
Out
0x028
Endpoint 3
64
Bulk or Interrupt
In
0x030
Out
0x070
Endpoint 4
32
Bulk or Interrupt
In
0x0b0
Out
0x0d0
Endpoint 5
64
Bulk or Interrupt
In
0x0f0
Out
0x130
Endpoint 6
512
Isochronous
In
0x170
Out
0x370
9.8 Buffers and DMA
All physical endpoints are packed together and accessed through a contiguous block of RAM. The buffer’s RAM
can be written or read at any time, therefore a buffer’s section of RAM should not be modified while the USB DMA
is transmitting or receiving. To assist with throughput, the DMA interface supports double buffering with RAM
buffers A and B. All functionality can be performed with just buffer A. Buffer B is only useful in systems needing
enhanced throughput while the EM358x device is busy with other functionality. Due to the intricacies of handling
two buffers, it is recommended that designs start with buffer A and only add buffer B if necessary.
There are two registers to allow positioning of the A and B buffers independently in RAM. Register
USB_BUFBASEA is for positioning buffer A and register USB_BUFBASEB is for positioning buffer B when double
buffering is enabled.
Note:
8 byte alignment is the only requirement as to where the buffer can be located in RAM.
9.9 Standard Commands
A set of USB standard commands are defined in the USB specification which, for the purposes of the EM358x
USB device, are split into two types; those handled by the hardware and those passed on for the software to
handle.
From the interface point of view, data appears like a packet being sent to the endpoint 0 OUT buffer and
hardware writes this data to the buffer in RAM. However, as the hardware handled core commands are fully
decoded and acted on by the hardware, even though the data actually appears in RAM, this data stage is hidden
from software with no interrupts generated. The exception to this rule and the only indication that might be seen
by software is an INT_USBNACK if the host should retry the command.
Since there is no means for software to explicitly know if the hardware handled commands have occurred, any
protocol running on the device must depend on activity in the software handled commands to infer the device
state.
Содержание EMBER EM358 series
Страница 2: ...EM358x 2 Rev 0 4 ...
Страница 7: ...EM358x Rev 0 4 7 ...