Cypress Semiconductor FX2LP Información técnica Pagina 235

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 460
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 234
Chapter 10. General Programmable Interface (GPIF) Page 10-45
Figure 10-27. GPIFTool Setup for the Waveform of Figur e10-26
Typically, when performing a FIFO Read, only one “Activate” is needed in the waveform, since
each execution of “Activate” increments the internal FIFO pointer (and EPxBCH:L) automatically.
To perform a FIFO-Read Transaction:
1. In the GPIFTRIG register, set the RW bit to 1 and load EP1:0 with the appropriate value for the
FIFO which is to receive the data.
2. Program the FX2 to detect completion of the transaction. As with all GPIF Transactions, bit 7
of the GPIFTRIG register (the DONE bit) signals when the Transaction is complete.
3. Program the FX2 to commit (“pass-on”) the data from the FIFO to the endpoint. The data can
be transferred from the FIFO to the endpoint by either of the following methods:
AUTOIN=1: CPU is not in the data path; the FX2 automatically commits data from the
FIFO Data bus to the USB.
AUTOIN=0: Firmware must manually commit data to the USB by writing either EPxBCL or
INPKTEND (with SKIP=0).
The following C program fragments (Figures 10-28 through 10-31) illustrate how to perform a
FIFO-Read transaction in 8-bit mode (WORDWIDE = 0) with AUTOIN = 0:
State 01234567
AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val
DataMode No Data No Data
Activate NO Data NO Data NO Data NO Data
NextData SameData SameData SameData SameData SameData SameData SameData
Int Trig No Int No Int No Int No Int No Int No Int No Int
IF/Wait Wait 4
Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 Wait 1
Term A
LFUNC
Term B
Branch1
Branch0
Re-execute
CTL0
1 1 0 1 1111
CTL1 11111111
CTL2 11111111
CTL3 11111111
CLT4 11111111
CTL5 11111111
Vista de pagina 234
1 2 ... 230 231 232 233 234 235 236 237 238 239 240 ... 459 460

Comentarios a estos manuales

Sin comentarios