
Chapter 9. Slave FIFOs Page 9-9
PKTEND:
An external master asserts the PKTEND pin to commit an IN packet to USB regardless of the
packet’s length. PKTEND is usually used when the master wishes to send a “short” packet (i.e., a
packet smaller than the size specified in the EPxAUTOINLENH:L registers).
For example: Assume that EP4AUTOINLENH:L is set to the default of 512 bytes. If AUTOIN = 1,
the external master can stream data to FIFO4 continuously, and (absent any bottlenecks in the
data path) the FX2 will automatically commit a packet to USB whenever the FIFO fills with 512
bytes. If the master wants to send a stream of data whose length is not a multiple of 512, the last
packet will not be automatically committed to USB because it’s smaller than 512 bytes. To commit
that last packet, the master can do one of two things: It can pad the packet with dummy data in
order to make it exactly 512 bytes long, or it can write the short packet to the FIFO then assert the
PKTEND pin.
If the FIFO is configured to allow zero-length packets (EPxFIFOCFG.2 = 1), asserting the
PKTEND pin when the FIFO is empty will commit a zero-length packet.
By default, PKTEND is active-low; its polarity can be changed via the FIFOPINPOLAR register.
The PKTEND pin must not be asserted unless a buffer is available, even if only a zero-length
packet is being committed. The “full” flag may be used to determine whether a buffer is available.
Figure 9-9. Slave FIFO Control Pins
FLAGA
FIFOADR[1:0]
Slave FIFOs FX2 Registers Device Pins
FLAGB
FLAGC
FLAGD/SLCS#
SLOE
SLRD
SLWR
PKTEND
FD[15:0]
EP4FIFOBUF
EP6FIFOBUF
EP8FIFOBUF
EP2FIFOBUF
EP8
EP6
EP4
EP2
IFCLK
30/48MHz
5 - 48MHz
Komentarze do niniejszej Instrukcji