Cypress Semiconductor FX2LP Informazioni Techniche Pagina 182

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 460
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 181
EZ-USB FX2 Technical Reference Manual
Page 9-26 EZ-USB FX2 Technical Reference Manual v2.1
Figure 9-35. TD_Poll Example, AUTOOUT=0, Source
If an uncommitted packet is in an OUT endpoint buffer when the FX2 is reset, that packet is
not
automatically committed to the master. To ensure that no uncommitted packets are in the endpoint
buffers after a reset, the FX2 firmware’s “endpoint initialization” routine should skip 2, 3, or 4 pack-
ets (depending on the buffering depth selected for the FIFO) by writing OUTPKTEND with
SKIP=1. See Figure 9-36
.
TD_Poll():
… … … … …
if( EP24FIFOFLGS & 0x02 )
{
SYNCDELAY; //
FIFORESET = 0x80; // nak all OUT pkts. from host
SYNCDELAY; //
FIFORESET = 0x02; // advance all EP2 buffers to cpu domain
SYNCDELAY; //
EP2FIFOBUF[0] = 0xAA; // create newly sourced pkt. data
SYNCDELAY; //
EP2BCH = 0x00;
SYNCDELAY; //
EP2BCL = 0x01; // commit newly sourced pkt. to interface fifo
// beware of "left over" uncommitted buffers
SYNCDELAY; //
OUTPKTEND = 0x82; // skip uncommitted pkt. (second pkt.)
// note: core will not allow pkts. to get out of sequence
SYNCDELAY; //
FIFORESET = 0x00; // release "nak all"
}
… … … … …
Vedere la pagina 181
1 2 ... 177 178 179 180 181 182 183 184 185 186 187 ... 459 460

Commenti su questo manuale

Nessun commento