NO:
W90P710 Programming Guide
VERSION:
2.1
PAGE:
99
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
void USBD_Handler()
{
UINT32 volatile Irq,
Irq = inpw(REG_USB_IS);
if (Irq & USB_RSTI)
USB_ISR_Reset_Start();
else if (Irq & USB_GDEVI)
USB_ISR_Device_Descriptor();
else if ,,,
Irq = inpw(REG_USB_EPA_IS);
if (Irq & USB_EPA_DMA)
USB_ISR_EPA_DMA_Complete();
else if ,,,
Irq = inpw(REG_USB_EPB_IS);
if (Irq & USB_EPB_DMA)
USB_ISR_EPB_DMA_Complete();
else if ,,,
Irq = inpw(REG_USB_EPC_IS);
if (Irq & USB_EPC_DMA)
USB_ISR_EPC_DMA_Complete();
else if ,,,
}
Note: If Reset End interrupt is generated, ISR must clear relative control register status if needed,
such as DMA control of each endpoint. Because the reset signal only reset the engine, it wouldn’t
clear the control register.
7.4.4 Endpoint 0 Operation
The operation of endpoint 0 (control pipe) should base on register
USB_IS
. Figure 10-2 is the
flowchart for the ISR handling endpoint 0 operations. The next section will describe how to respond
the Get Device Descriptor standard request.
Figure 10-2 USBD Controller Block Diagram