User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 303
www.energymicro.com
• The last OUT data packet written to the receive FIFO is a short packet (0 < packet size < maximum
packet size).
8. When the DMA pops this entry (OUT Data Transfer Completed), a Transfer Completed interrupt is
generated for the endpoint or the endpoint enable is cleared.
9. OUT data packets received with Bad Data CRC or any packet error are flushed from the receive FIFO
automatically.
• In these two cases, the packet count and transfer size registers are not decremented because no
data is written to the receive FIFO.
Figure 15.24. Isochronous OUT Core Internal Flow for Periodic Transfer Interrupt Feature
If (USB_DOEPx_CTL.CNAK = 0b1) & &
(USB_DOEPx_CTL.EPENA = 0b1) & &
(DCTL.IGNRFRMNUM = 0b1) & &
NOTE
1 . Core will w rite dat a t o only DW ORD Aligned addresses
2 . Core will not ta g Periodic OUT Packet s w ith ( m icro) fram e num be r and PID
3 . Any Short Packet (SP ) Rece ived will generat e Xfe rCom plet e Int errupt
including zero lengt h packet
4 . Packet Drop due to unAvailabilit y of Space in RxFifo will generat e
XferComplete Imme diat ely.
5 . PktDrop due to EndPoint being disa bled will gene rat e XferCom plet e at
End of periodic Frame inte rval.
START
OUT Token From Host
Check RXFifo Space
Available
ret urn
Receive Pkt and Store in RXFifo
PktCnt = PktCnt -1
DMA Pop RxFifo
XferSize = XferSize - MaxPktSize
PKt Size = = M axPkt Size
NO
Received Short Packet
PktCnt = Pkt Cnt - 1
NO
If PktCnt = = 0 & &
XferSize = = 0
USB_DOEPx_INT.XFERCOMPL = 1
DMA Pop RxFifo
XferSize = XferSize - ActPktSize
YES
YES
If End Of PerFrInt &&
ISOC Out Pa cket Nake d
Disable endpoint
YES
NO
YES
YES
ANO NO
A
YES
Disable endpoint
NO
15.4.4.2.2.12 Incomplete Isochronous OUT Data Transfers in DMA and Slave Modes
To initialize the core after power-on reset, the application must follow the sequence in Overview:
Programming the Core (p. 248) . Before it can communicate with the host, it must initialize an endpoint
as described in Endpoint Initialization (p. 283) . See Packet Read from FIFO in Slave Mode (p. 292) .
This section describes the application programming sequence when isochronous OUT data packets are
dropped inside the core.
Internal Data Flow
1. For isochronous OUT endpoints, the USB_DOEPx_INT.XFERCOMPL interrupt possibly is not always
asserted. If the core drops isochronous OUT data packets, the application could fail to detect the
USB_DOEPx_INT.XFERCOMPL interrupt under the following circumstances.
• When the receive FIFO cannot accommodate the complete ISO OUT data packet, the core drops
the received ISO OUT data.
• When the isochronous OUT data packet is received with CRC errors
• When the isochronous OUT token received by the core is corrupted
• When the application is very slow in reading the data from the receive FIFO