Fujitsu MB91319 Series Hardware Manual page 441

Fr60 32-bit microcontroller
Table of Contents

Advertisement

17.3.2.1
DMA Operation
This section describes the DMA operation by the USB function. The DMA transfer by
the USB function is available in two modes: single transfer and block transfer.
One of the DMA transfer modes (single transfer or block transfer) can be selected using
the DMAMODE bit of the CONT10 register (control register).
DMA transfer can be applied to BULK IN transfer and BULK OUT transfer.
Data other than 0-byte data can be transferred by DMA transfer.
■ DMA IN Transfer
For DMA IN transfer, data is written to an FIFO buffer for IN transfer, then the BFOK bit of the
control register corresponding to the FIFO buffer is automatically set to enable transfer. The USB
function macro program has a counter function to count the total number of send bytes. Using
this counter function enables automatic transmission of the last packet.
❍ Total send byte counter (16 bits)
The total send byte counter counts the total number of bytes of the data to be transmitted. The
counter counts down each time data is written to the FIFO buffer. For the counter, a total send
byte count is set in the TTSIZE register by the system. The counter cannot be used for control
transfer or interrupt transfer.
❍ Data transmission
Data transmission is started automatically when the relevant FIFO buffer (64 bytes) becomes full
or writing of the last packet ends.
Transmission of the last packet is explained below.
❍ Transmission of the last packet
Transmission is done according to the packet size of the last packet* as follows:
Maximum-size packet
Packet transmission is started automatically when the amount of data indicated by the total
send byte count in the TTSIZE register has been written. A null packet is sent automatically
after packet transmission ends. Automatic transmission of a null packet can be disabled by
using the NULLSET bit of the control register.
Even-byte short packet
Packet transmission is started automatically when the amount of data indicated by the total
send byte count in the TTSIZE register has been written.
CHAPTER 17 USB FUNCTION
419

Advertisement

Table of Contents
loading

Table of Contents