Cypress Semiconductor FX2LP Informações Técnicas Página 155

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 460
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 154
Chapter 8. Access to Endpoint Buffers Page 8-19
8.7.1 Transfer Length
When the host makes any EP0IN request, the FX2 respects the following two length fields:
the requested number of bytes (from the last two bytes of the SETUP packet received
from the host)
the available number of bytes, supplied either as a length field in the actual descriptor
(SDPAUTO=1)
or
in EP0BCH:L (SDPAUTO=0)
In accordance with the USB Specification, the FX2 sends the smaller of these two length fields.
8.7.2 Accessible Memory Spaces
The Setup Data Pointer can access data in either of two RAM spaces:
On-chip Main RAM (8 KB at 0x0000-0x1FFF)
On-chip Scratch RAM (512 bytes at 0xE000-0xE1FF)
The Setup Data Pointer cannot be used to access off-chip memory at any address.
8.8 Autopointers
Endpoint data is available to the CPU in RAM buffers (see Table 8-3). In some cases, it is faster for
the firmware to access endpoint data as though it were in a FIFO register. The FX2 provides two
special data pointers, called “Autopointers”, that automatically increment after each byte transfer.
Using the Autopointers, firmware can access contiguous blocks of on- or off-chip data memory as
a FIFO.
Each Autopointer is controlled by a 16-bit address register (AUTOPTRnH:L), a data register (XAU-
TODATn), and a control bit (APTRnINC). An additional control bit, APTREN, enables both Auto-
pointers.
A read from (or write to) an Autopointer data register
actually
accesses the address pointed to by
the corresponding Autopointer address register, which increments on every data-register access.
To read or write a contiguous block of memory (for example, an endpoint buffer) using an Auto-
pointer, load the Autopointer’s address register with the starting address of the block, then repeat-
edly read or write the Autopointer’s data register.
The AUTOPTRnH:L registers may be written or read at any time to determine the current Auto-
pointer address.
Vista de página 154
1 2 ... 150 151 152 153 154 155 156 157 158 159 160 ... 459 460

Comentários a estes Manuais

Sem comentários