Cypress Semiconductor FX2LP Información técnica Pagina 154

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 460
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 153
EZ-USB FX2 Technical Reference Manual
Page 8-18 EZ-USB FX2 Technical Reference Manual v2.1
The Setup Data Pointer automates this process of returning IN data over EP0, simplifying the firm-
ware.
For the Setup Data Pointer to work properly, EP0’s MaxPacketSize
must
be set to 64.
Table 8-8 lists the registers which configure the Setup Data Pointer.
To send a block of data, the block’s starting address is loaded into SUDPTRH:L. The block length
must previously have been set; the method for accomplishing this depends on the state of the
SDPAUTO bit:
SDPAUTO = 0 (Manual Mode): Used for general-purpose block transfers. Firmware
writes the block length to EP0BCH:L.
SDPAUTO = 1 (Auto Mode): Used for sending Device, Configuration, String, Device
Qualifier, and Other Speed Configuration descriptors only. The block length is automati-
cally read from the “length” field of the descriptor itself; no explicit loading of EP0BCH:L is
necessary.
Writing to SUDPTRL starts the transfer; the FX2 automatically sends the entire block, packetizing
as necessary.
For example, to answer a
Get Descriptor - Device
request, firmware sets SDPAUTO = 1, then
loads the address of the device descriptor into SUDPTRH:L. The FX2 then automatically loads the
EP0 data buffer with the required number of packets and transfers them to the host.
To command the FX2 to ACK the status (handshake) packet, the firmware clears the HSNAK bit
(by writing 1 to it) before starting the Setup Data Pointer transfer.
If the firmware needs to know when the transaction is complete (i.e., sent and acknowledged), it
can enable the EP0ACK interrupt before starting the Setup Data Pointer transfer.
When SDPAUTO = 0, writing to EP0BCH:L only sets the block length; it does not arm the transfer
(the transfer is armed by writing to SUDPTRL). Therefore, before performing an EP0 transfer
which does
not
use the Setup Data Pointer (i.e., one which is meant to be armed by writing to
EP0BCL), SDPAUTO
must
be set to 1.
Table 8-8. Registers used to control the Setup Data Pointer
Address Register Name Function
0xE6B3 SUDPTRH High address
0xE6B4 SUDPTRL Low address
0xE6B5 SUDPTRCTL SDPAUTO bit
Vista de pagina 153
1 2 ... 149 150 151 152 153 154 155 156 157 158 159 ... 459 460

Comentarios a estos manuales

Sin comentarios