Cypress Semiconductor FX2LP Informations techniques Page 145

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 460
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 144
Chapter 8. Access to Endpoint Buffers Page 8-9
STALL
Firmware sets STALL=1 to instruct the FX2 to return the STALL PID (instead of ACK or NAK) in
response to an EP1OUT transfer. The FX2 will continue to respond to EP1OUT transfers with the
STALL PID until the firmware clears this bit.
8.6.1.6 EP1OUTBC
Firmware may read this 7-bit register to determine the number of bytes (0-64) in EP1OUTBUF.
Firmware writes any value to EP1OUTBC to arm an EP1OUT transfer.
8.6.1.7 EP1INCS
This register is used to coordinate BULK or INTERRUPT transfers over EP1IN. The EP1INCS reg-
ister contains two bits, BUSY and STALL.
BUSY
This bit indicates when the firmware can load data into the Endpoint 1 IN buffer. BUSY=1 means
that the SIE “owns” the buffer, so firmware should not write (or read) the buffer. BUSY=0 means
that the firmware may write data into (or read from) the buffer. A 1-to-0 BUSY transition asserts the
EP1IN interrupt request, signaling that the EP1IN buffer is free and ready to be loaded with new
data.
The firmware schedules an IN transfer by loading up to 64 bytes of data into EP1INBUF, then writ-
ing the byte count register EP1INBC with the number of bytes loaded (0-64). Writing the byte count
register automatically sets BUSY=1, indicating that the transfer over USB is pending. After the FX2
subsequently receives an IN token, sends the data, and successfully receives an ACK from the
host, BUSY is automatically cleared to 0 to indicate that the buffer is ready to accept more data.
This generates the EP1IN interrupt request, which signals that the buffer is again available.
At power-on, or whenever a 0-to-1 transition occurs on the RESET pin, the BUSY bit is set to 0,
meaning that the FX2 will NAK all EP1IN transfers until the firmware arms the endpoint by writing
the number of bytes to transfer into the EP1INBC register.
STALL
Firmware sets STALL=1 to instruct the FX2 to return the STALL PID (instead of ACK or NAK) in
response to an EP1IN transfer. The FX2 will continue to respond to EP1IN transfers with the
STALL PID until the firmware clears this bit.
8.6.1.8 EP1INBC
Firmware arms an IN transfer by loading this 7-bit register with the number of bytes (0-64) it has
previously loaded into EP1INBUF.
Vue de la page 144
1 2 ... 140 141 142 143 144 145 146 147 148 149 150 ... 459 460

Commentaires sur ces manuels

Pas de commentaire