English
Language : 

EFM32WG Datasheet, PDF (270/834 Pages) List of Unclassifed Manufacturers – The EFM32WG Wonder Gecko is the ideal choice for demanding 8-, 16-, and 32-bit energy sensitive applications.
...the world's most energy friendly microcontrollers
5. As soon as the IN packet is received and written to the receive FIFO, the host generates an RXFLVL
interrupt.
6. In response to the RXFLVL interrupt, read the received packet status to determine the number of bytes
received, then read the receive FIFO accordingly. The application must mask the RXFLVL interrupt
before reading the receive FIFO, and unmask after reading the entire packet.
7. The core generates the RXFLVL interrupt for the transfer completion status entry in the receive FIFO.
The application must read and ignore the receive packet status when the receive packet status is not
an IN data packet (USB_GRXSTSR.PKTSTS != 0b0010).
8. The core generates an XFERCOMPL interrupt as soon as the receive packet status is read.
9. In response to the XFERCOMPL interrupt, read the USB_HC2_TSIZ.PKTCNT field. If
USB_HC2_TSIZ.PKTCNT != 0, disable the channel (as explained in Halting a Channel (p. 253)
) before re-initializing the channel for the next transfer, if any). If USB_HC2_TSIZ.PKTCNT ==
0, reinitialize the channel for the next transfer. This time, the application must reset the
USB_HC2_CHAR.ODDFRM bit.
15.4.3.6.10.2 Handling Interrupts
The channel-specific interrupt service routine for an interrupt IN transaction in Slave mode is a follows.
Interrupt IN
Unmask (NAK/XACTERR/XFERCOMPL/BBLERR/STALL/FRMOVRUN/DATATGLERR)
if (XFERCOMPL)
{
Reset Error Count
Mask ACK
if (USB_HCx_TSIZ.PKTCNT == 0)
{
De-allocate Channel
}
else
{
Transfer Done = 1
Unmask CHHLTD
Disable Channel
}
}
else if (STALL or FRMOVRUN or NAK or DATATGLERR or BBLERR)
{
Mask ACK
Unmask CHHLTD
Disable Channel
if (STALL or BBLERR)
{
Reset Error Count
Transfer Done = 1
}
else if (!FRMOVRUN)
{
Reset Error Count
}
}
else if (XACTERR)
{
Increment Error Count
Unmask ACK
Unmask CHHLTD
Disable Channel
}
else if (CHHLTD)
{
Mask CHHLTD
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
270
www.energymicro.com