
Chapter 8. Access to Endpoint Buffers Page 8-5
For example, if EP2 is configured for triple-buffered 1024-byte operation, the firmware should
access EP2 only at 0xF000-0xF3FF. The firmware should not access the EP4 or EP6 buffers in
this configuration, since they don’t exist (the RAM space which they would normally occupy is used
to implement the EP2 triple-buffering).
8.6 CPU Control of FX2 Endpoints
From the CPU’s point of view, the “small” and “large” endpoints operate slightly differently, due to
the multiple-packet buffering scheme used by the large endpoints.
The CPU uses internal registers to control the flow of endpoint data. Since the small endpoints
EP0 and EP1 are programmed differently than the large endpoints EP2, EP4, EP6, and EP8,
these registers fall into three categories:
• Registers that apply to the small endpoints (EP0, EP1IN, and EP1OUT)
• Registers that apply to the large endpoints (EP2, EP4, EP6, and EP8)
• Registers that apply to both sets of endpoints
8.6.1 Registers That Control EP0, EP1IN, and EP1OUT
8.6.1.1 EP0CS
Firmware uses this register to coordinate CONTROL transfers over endpoint 0. The EP0CS regis-
ter contains three bits: HSNAK, BUSY and STALL.
Table 8-4. Registers that control EP0 and EP1
Address Name Function
0xE6A0 EP0CS EP0 HSNAK, Busy, Stall
0xE68A
0xE68B
EP0BCH
EP0BCL
EP0 Byte Count (MSB)
EP0 Byte Count (LSB)
0xE65C
0xE65D
USBIE
USBIRQ
EP0 Interrupt Enables
EP0 Interrupt Requests
SFR 0xBA
EP01STAT
Endpoint 0 and 1 Status
0xE6A1 EP1OUTCS EP1OUT Busy, Stall
0xE68D
EP1OUTBC
EP1OUT Byte Count
0xE6A2 EP1INCS EP1IN Busy, Stall
0xE68F
EP1INBC
EP1IN Byte Count
Komentáře k této Příručce