NO:
W90P710 Programming Guide
VERSION:
2.1
PAGE:
101
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed,
distributed or reproduced without permission from Winbond.
Table No.: 1200-0003-07-A
1. A get device descriptor interrupt occurred, and the program will execute the get device
descriptor sub-interrupt service routine.
2. Check the control transfer received packet size from
USB_CTLS
register. If the size is 8
bytes, assign the device descriptor length and set the DATA OUT ready bit (
SDO_RD
) of
USB_ENG
register. Otherwise, if the size is not 8 bytes, set the Stall control bit (
CV_STL
) of
USB_ENG
register.
3. Clear the Device Descriptor interrupt in
USB_IC
register.
4. Then the control data in interrupt will occur after acknowledge the device descriptor interrupt.
The program will execute the relative sub-interrupt service routine.
5. The control data in FIFO is the registers
USB_IDATA0
~
USB_IDATA3
(total 16 bytes). If
the device descriptor length is over 16 bytes, the programmer should separate it into several
16 bytes.
Note: Each control data in interrupt only can send 16 bytes data.
6. Fill the device descriptor data into control pipe FIFO (
USB_IDATA0
~
USB_IDATA3
), and
then set the transfer length into
USB_CVCMD
register.
7. Clear the control data in interrupt in
USB_IC
register.
8. repeat the step 4, 6, 7 until all descriptor data has been sent.
7.4.6 Endpoint A ~ C Operation
Endpoint A~C should follow steps below for receive and transmit data.
1. Check
bit
EPx_RDY
of register
EPx_CTL
, endpoint is busy if this bit is set.
2. Configure
register
EPx_ADDR
with the SDRAM address for DMA to/ from USBD.
3. Configure
register
EPx_LENTH
with the data size intend to transmit/ receive.
4. Set
bit
EPx_RDY
of register
EPx_CTL
.
5. Polling
EPx_RDY
of register
EPx_CTL
until it is cleared or wait for
EPx_DMA_IS
interrupt in
register
EPx_IS
.