Cypress Semiconductor FX2LP Información técnica Pagina 186

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 460
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 185
EZ-USB FX2 Technical Reference Manual
Page 9-30 EZ-USB FX2 Technical Reference Manual v2.1
9.3.8 Access to IN Packets, AUTOIN=0
In some systems, it may be desirable to allow the FX2’s CPU to participate in every data-transfer
between the external master and the host. To configure a FIFO for this “Manual-In” mode, the
AUTOIN bit in the appropriate EPxFIFOCFG register must be cleared to 0.
In Manual-In mode, FX2 firmware can commit, skip, or edit packets sent by the external master,
and it may also source packets directly. To commit a packet, firmware writes the endpoint number
(with SKIP=0) to the INPKTEND register. To skip a packet, firmware writes the endpoint number
with SKIP=1 to the INPKTEND register. To edit or source a packet, firmware writes to the FIFO
buffer, then writes the packet length to EPxBCH and EPxBCl (in that order).
Figure 9-41. TD_Poll Example, AUTOIN=0, Committing a Packet via INPKTEND
Figure 9-42. TD_Poll Example, AUTOIN=0, Skipping a Packet via INPKTEND
TD_Poll():
… … … … …
if( master_finished_longxfr( ) )
{ // master currently points to EP8, pins FIFOADR[1:0]=11
if( !( EP68FIFOFLGS & 0x10 ) )
{ // EP8FF=0 when buffer available
INPKTEND = 0x08; // firmware commits EP8 packet
// by writing 8 to INPKTEND
release_master( EP8 );
}
}
… … … … …
TD_Poll():
… … … … …
if( master_finished_longxfr( ) )
{ // master currently points to EP8, pins FIFOADR[1:0]=11
if( !( EP68FIFOFLGS & 0x10 ) )
{ // EP8FF=0 when buffer available
INPKTEND = 0x88; // firmware skips EP8 packet
// by writing 0x88 to INPKTEND
release_master( EP8 );
}
}
… … … … …
Vista de pagina 185
1 2 ... 181 182 183 184 185 186 187 188 189 190 191 ... 459 460

Comentarios a estos manuales

Sin comentarios