
EZ-USB FX2 Technical Reference Manual
Page 10-56 EZ-USB FX2 Technical Reference Manual v2.1
10.4.8 Firmware access to OUT packets, (AUTOOUT=1)
To achieve the maximum USB 2.0 bandwidth, the host and master are directly connected when
AOUTOOUT=1; the CPU is bypassed and the OUT FIFO is automatically committed to the host:
Figure 10-45. CPU not in data path, AUTOOUT=1
Figure 10-46. TD_Init Example: Configuring AUTOOUT = 1
Figure 10-47. FIFO-Write Transaction Code, AUTOOUT = 1
TD_Init():
… … … … …
REVCTL = 0x03; // MUST set REVCTL.0 and REVCTL.1 to 1
SYNCDELAY;
EP2CFG = 0xA2; // EP2 is DIR=OUT, TYPE=BULK, SIZE=512, BUF=2x
SYNCDELAY;
FIFORESET = 0x80; // Reset the FIFO
SYNCDELAY;
FIFORESET = 0x02;
SYNCDELAY;
FIFORESET = 0x00;
SYNCDELAY;
EP2FIFOCFG = 0x10; // EP2 is AUTOOUT=1, AUTOIN=0, ZEROLEN=0, WORDWIDE=0
SYNCDELAY;
OUTPKTEND = 0x82; // Arm both EP2 buffers to “prime the pump”
SYNCDELAY;
OUTPKTEND = 0x82;
… … … … …
TD_Poll():
… … … … …
// no code necessary to xfr data from host to master!
// AUTOOUT=1 and SIZE=0 auto commits packets,
// in 512 byte chunks.
… … … … …
Data Path
8051
USB
Host Peripheral
AUTOOUT=1, Long Transfer Mode
Slave GPIF
Kommentare zu diesen Handbüchern