
IX PERIPHERAL MODULES 7 (USB): USB FUNCTION CONTROLLER (USB)
IX-1-6
EPSON
S1C33E07 TECHNICAL MANUAL
Setting the address increment/decrement conditions
The source and/or destination addresses can be incremented or decremented when one data transfer is
completed. S1IN[1:0] (D[13:12]0x301136) for source address and D1IN[1:0] (D[13:12]/0x30113A) for
destination address are used to set this condition.
S1IN/D1IN = 00: address fixed (default)
The address is not changed by a data transfer performed. Even when transferring multiple data, the transfer
data is always read/write from/to the same address.
S1IN/D1IN = 01: address decremented
The address is decremented by an amount equal to the data size set by DATSIZE1 when one data transfer is
completed. The address that has been decremented during transfer does not return to the initial value.
S1IN/D1IN = 10 or 11: address incremented
The address is incremented by an amount equal to the data size set by DATSIZE1 when one data transfer is
completed. The address that has been incremented during transfer does not return to the initial value.
In the single transfer mode, 10 and 11 set the same condition.
Selecting the DMA trigger factor
The HSDMA trigger factor for the USB function controller is port 9 input (FPT9). HSD1S[3:0] (D[7:4]/
0x300289) must be set to 1101.
By selecting a cause of interrupt with the HSDMA trigger set-up register, the HSDMA channel is invoked
when the selected cause of interrupt occurs. The interrupt control bits (cause-of-interrupt flag, interrupt enable
register, IDMA request register, interrupt priority register) do not affect this invocation. The cause of interrupt
that invokes HSDMA sets the cause-of-interrupt flag and HSDMA does not reset the flag. Consequently, when
the DMA transfer is completed (even if the transfer counter is not 0), an interrupt request to the CPU will be
generated if the interrupt has been enabled. To generate an interrupt only when the transfer counter reaches 0,
disable the interrupt by the cause of interrupt that invokes HSDMA and use the HSDMA transfer completion
interrupt.
When the selected trigger factor occurs, the trigger flag is set to 1 to invoke the HSDMA channel.
The HSDMA starts a DMA transfer if it has been enabled and the trigger flag is cleared by the hardware at the
same time. This makes it possible to queue the HSDMA triggers that have been generated. The trigger flag can
be read and cleared using HS3_TF (D0/0x30113E). By writing 1 to this bit, the set trigger flag can be cleared if
the DMA transfer has not been started. When this bit is read, 1 indicates that the flag is set and 0 indicates that
the flag is cleared.
Enabling/Disabling DMA transfer
The HSDMA transfer is enabled by writing 1 to HS1_EN (D0/0x30113C). However, the control information
must always be set correctly before enabling a DMA transfer. Note that the control information cannot be set
when HS1_EN = 1. When HS1_EN is set to 0, HSDMA requests are no longer accepted. When a DMA transfer
is completed (transfer counter = 0), HS1_EN is reset to 0 to disable the following trigger inputs.