Universal Serial Bus (USB)
18-12
Am186™CC/CH/CU Microcontrollers User’s Manual
The host polls the interrupt endpoint once every 1 to 255 ms. Device software requests a
poll rate when it sets up the endpoint’s descriptor data structure, which the host obtains by
issuing a GET_DESCRIPTOR command during device configuration.
Note that the interrupt endpoint can only be used in non-DMA mode.
The following registers are used to configure the interrupt endpoint in response to
commands received from the USB host:
■
Interrupt Endpoint Definition 1 (IEPDEF1):
– Based on the SET_CONFIGURATION command, the device software should write
the EP_CFG field in the IEPDEF1 register.
– Based on the SET_INTERFACE command, the device software should write the
EP_INT and EP_ASET fields in the IEPDEF1 register.
– Based on the endpoint descriptor associated with the alternate setting, the device
software should write the EP_NUM field in the IEPDEF1 register.
■
Interrupt Endpoint Definition 2 (IEPDEF2):
Endpoint maximum packet value can be programmed to a value of 8 or 16.
■
Interrupt Endpoint Control/Status (IEPCTL):
– The endpoint enable bit (EP_EN) enables or disables the endpoint.
– Initial control of the data FIFO is assigned to software. Device software can therefore
write to the endpoint FIFO (IEPDAT). After writing to the FIFO, the software should
clear the ACT_REQ bit, thereby giving control back to the USB endpoint hardware
and allowing it to transmit the written data.
– Hardware sets the ACT_REQ bit after the endpoint has successfully sent a data packet
to the host and the packet has been acknowledged. To enable the ACT_REQ bit as
an interrupt source, set the INT_EP_ACT bit in the UIMASK1 register.
– There is a feature that allows the device software to update stale data if it has not
been transmitted. This is done by clearing the NOT_FLUSH bit, which causes the
hardware to revert control to the device software by setting the ACT_REQ bit. Note
that the ACT_REQ bit is set only if there is no active data transfer from this endpoint
to the host. Device software can verify if the ACT_REQ bit is set and if it is, can update
stale data by writing to the FIFO (IEPDAT).
18.5.1.4
Programming Data Endpoints
The USB peripheral controller provides four data endpoints.Two have 16-byte FIFOs, and
the other two have 64-byte FIFOs. Each data endpoint is individually programmable as to
direction (IN or OUT relative to the host), transfer type (bulk, isochronous, or interrupt), and
maximum packet size. The maximum packet size set for these endpoints can be greater
than the FIFO’s physical size if using a general-purpose DMA or SmartDMA channel. (Note
that the endpoints have differences in how they interface to the SmartDMA channels.) Legal
maximum packet sizes are any power of 2 between 8 and 64 for data endpoints configured
for bulk transfers, and any integer up to 1023 for data endpoints configured for isochronous
transfers.
The four endpoints are named A, B, C, and D. Where the following description applies to
any of them, an “x” is used in the register name in place of the endpoint name.
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...