Renesas CPU Board M3A-HS19 Manual de usuario Pagina 12

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 35
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 11
SH7285/SH7286 USB Function Module
USB to Serial Conversion Application Note
(2) Data OUT Stage
The USB host sends an OUT token and a data packet. The USB device receives the OUT token first, then receives the
data packet, and then returns an ACK handshake. When the USB device cannot receive the data packet after it
receives the OUT token, it ignores subsequent data packets, and returns a NAK handshake. When the USB host
receives a NAK handshake, it tries to resend the OUT token and data packet.
Figure 2.9 shows the Data OUT
Transaction flowchart.
When the USB function module cannot receive data packets, when it receives the OUT token, it automatically
discards the subsequent data packet and returns a NAK handshake to the USB host. When it receives the OUT token
when it can accept data, it holds the data packet from the USB host in the EP0oFIFO and returns an ACK handshake
to the USB host. After the USB function module transmits an ACK handshake, it generates the data receive complete
interrupt using the EP0oTS bit in the USBIFR0 register. When the function module receives the IN token that
indicates the Data OUT stage is completed, it generates the IN token receive interrupt using the EP0iTR bit in the
USBIFR0 register.
The sample program identifies the type of the interrupt while it is being processed. When it is not the data receive
complete interrupt (the EP0oTS bit in the USBIFR0 register), the sample program advances to the Status stage. When
it is the data receive complete interrupt (the EP0oTS bit in the USBIFR0 register), the sample program reads data in
the EP0oFIFO, sets the EP0oFIFO read complete bit, and waits for the next interrupt to be generated.
Figure 2.10
shows an operation flowchart of Data OUT stage by the sample program.
Idle
OUT token
Idle
Token
Data
Handshake
ACK
NAK STALL
DATA0/1
NYET
Packet issued by the host
Packet issued by the device
Figure 2.9 Data OUT Transaction
REJ05B1152-0100/Rev.1.00 May 2008 Page 12 of 35
Vista de pagina 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 34 35

Comentarios a estos manuales

Sin comentarios