
Chapter 15. Registers Page 15-39
15.6.5.1 IN Endpoints
For IN endpoints, the Trigger registers can apply to either the full FIFO, comprising multiple pack-
ets, or only to the current packet being filled. The PKTSTAT bit controls this choice:
Table 15-14. Interpretation of PF for IN Endpoints
Example 1:
The following is an example of how you might use the first case.
Assume a Bulk IN transfer over Endpoint 2. For Bulk transfers, the FX2 packet buffer size is 512
bytes. Assume you have reported a MaxPacketSize value of 100 bytes per packet, and you have
configured the endpoint for triple-buffering. This means that whenever 100 bytes are loaded into a
packet buffer, the FX2 logic commits that packet buffer to the USB interface, essentially adding
100 bytes to the “USB-side” FIFO.
You want to notify the external logic that is filling the endpoint FIFO under two conditions:
• Two of the three packet buffers are full (committed to sending over USB, but not yet sent).
• The current packet buffer is half-full.
In other words, all available IN endpoint buffer space is almost full. You accomplish this by setting:
EP2FIFOPFH = 0001 0000
• b6: PKTSTAT=0 to include packets plus bytes
• b5b4b3=2: two packets…
EP2FIFOPFL = 0011 0010
•…plus 50 bytes in the currently filling packet
PKTSTAT PF applies to: EPxFIFOPFH:L format
0 PKTS + Current packet bytes PKTS[ ] PBC[ ]
1 Current packet bytes only PBC[ ]
Komentarze do niniejszej Instrukcji