Usb Isochronous Transfer; Usb Interrupt Transfer; Usb Interrupts; Usb Function Interrupt - Renesas M16C Series User Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30240 Group

3.2.5 USB Isochronous Transfer

Endpoints 1-4 can be used for isochronous transfers. The ISO bit of the USB Endpoint x (x=1-4) IN
Control and Status register (INxCSR) and the ISO bit of the USB endpoint x (x=1-4) OUT control/status
register (OUTxCSR) should both be set to "1" (the endpoint initialization for isochronous transfer). If
ISO_UPDATE (USBISOC) is "1" after the IN_PKT_RDY bit is set, there is a delay until it is synchronized
with the next SOF signal. When the ISO (INxCSR) bit, ISO_UPDATE bit, and the AUTO_FLUSH bit are
"1," and the IN_PKY_RDY bit is set to "1" when the SOF is received, the oldest data in the IN FIFO is
automatically flushed.

3.2.6 USB Interrupt Transfer

Endpoints 1-4 can be used for interrupt transfers. There is no need for any special settings when a
standard interrupt transfer occurs because the interrupt transaction is the same as a bulk transfer. If the
IN endpoint is used as a rate feedback interrupt transfer, the INTPT bit should be set to "1". By setting
INTPT to "1", the data toggle switches with the transmission to the host of each data packet without
regard to the existence or lack of existence of a handshake packet and without regard to the type of the
handshake. When an IN endpoint is used as a rate feedback interrupt transfer, the following steps
should be taken:
1.) Set a size that is larger than one half that of the FIFO size of the USB endpoint x as the value for the
USB endpoint x IN maximum packet size register (single buffer mode).
2.) Set INTPT to "1."
3.) Flush the old data in the FIFO.
4.) Write the transmission data to the FIFO and set the IN_PKT_RDY bit to "1."
5.) Repeat 3 and 4.
When an endpoint is used as a rate feedback interrupt transfer, there is always data to transmit to the
host. However, the device will not return a NAK in response to an IN token from the host. The device
always sends data from within the FIFO in response to the IN token, regardless of the IN_PKT_RDY bit.

3.2.7 USB Interrupts

The USB related interrupts are:
• USB Function,
• USB Reset,
• USB Resume,
• USB SOF,
• USB Suspend.
If any of these interrupts are used, the interrupt enable flag (I), interrupt priority level selection bit of the
appropriate interrupt control register, and process interrupt level (IPL) should be set.

3.2.7.1 USB Function Interrupt

The USB Function Interrupt is the primary interrupt used when reading/writing to the various end-
points, and controlling USB data flow. When the USB interrupt is used, the bits that correspond to the
USB interrupt enable register 1 (USBIE1) and the USB interrupt enable register 2 (USBIE2) should be
set to "1."
Rev.1.00 Sep 24, 2003 Page 311 of 360
Universal Serial Bus

Advertisement

Table of Contents
loading

Table of Contents