Cypress Semiconductor FX2LP Informations techniques Page 153

  • 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 152
Chapter 8. Access to Endpoint Buffers Page 8-17
After a configuration changes (i.e., after the host issues a
Set Configuration
request).
After an interface’s alternate setting changes (i.e., after the host issues a Set Interface
request).
After the host sends a
Clear Feature - Endpoint Stall
request to an endpoint.
For the first two, the firmware must clear the data toggle bits for all endpoints contained in the
affected interfaces. For the third, only one endpoint’s data toggle bit is cleared.
The TOGCTL register contains bits to set or clear an endpoint data toggle bit, as well as to read
the current state of a toggle bit.
At this writing, there is no known reason for firmware to set an endpoint toggle to “1”. Also, since
the FX2 handles all data toggle management, normally there is no reason to know the state of a
data toggle. These capabilities are included in the TOGCTL register for completeness and debug
purposes.
A two-step process is employed to clear an endpoint data toggle bit to 0. First, writes the TOGCTL
register with an endpoint address (EP3:EP0) plus a direction bit (IO). Then, keeping the endpoint
and direction bits the same, write a “1” to the R (reset) bit. For example, to clear the data toggle for
EP6 configured as an “IN” endpoint, write the following values sequentially to TOGCTL:
00010110
00110110
8.7 The Setup Data Pointer
The USB host sends device requests using CONTROL transfers over endpoint 0. Some requests
require the FX2 to return data over EP0. During enumeration, for example, the host issues
Get
Descriptor requests that ask for the device’s capabilities and requirements. The returned data can
span many packets, so it must be partitioned into packet-sized blocks, then the blocks must be
sent at the appropriate times (i.e., when the EP0 buffer becomes ready).
TOGCTL Data Toggle Control E683
b7 b6 b5 b4 b3 b2 b1 b0
Q S R IO EP3 EP2 EP1 EP0
R R/W R/W R/W R/W R/W R/W R/W
x x x x x x x x
Vue de la page 152
1 2 ... 148 149 150 151 152 153 154 155 156 157 158 ... 459 460

Commentaires sur ces manuels

Pas de commentaire