
iiBusModuLes:high-sPeeddMa(hsdMa)
s1C33L17teChniCaLManuaL
ePson
ii-1-15
II
HSDMA
ii.1.5triggersource
A HSDMA trigger source for each channel can be selected from among 15 types using HSDxS[3:0] (D[7:0]/
0x300298, D[7:0]/0x300299). This function is supported by the interrupt controller.
hsd0s[3:0]:Ch.0TriggerSet-UpBitsintheHSDMACh.0–1TriggerSet-UpRegister(D[3:0]/0x300298)
hsd1s[3:0]:Ch.1TriggerSet-UpBitsintheHSDMACh.0–1TriggerSet-UpRegister(D[7:4]/0x300298)
hsd2s[3:0]:Ch.2TriggerSet-UpBitsintheHSDMACh.2–3TriggerSet-UpRegister(D[3:0]/0x300299)
hsd3s[3:0]:Ch.3TriggerSet-UpBitsintheHSDMACh.2–3TriggerSet-UpRegister(D[7:4]/0x300299)
Table II.1.5.1 shows the setting value and the corresponding trigger source.
TableII.1.5.1HSDMATriggerSource
Value
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
Ch.0triggersource
Softwaretrigger
#DMAREQ0input(fallingedge)
#DMAREQ0input(risingedge)
Port0input
Port4input
(reserved)
16-bittimer0compareB
16-bittimer0compareA
(reserved)
I2SOutputCh.HSDMALeft
SerialI/FCh.0Rxbufferfull
SerialI/FCh.0Txbufferempty
A/Dconversioncompletion
Port8input(SPIinterrupt)
Port12input
Ch.1triggersource
Softwaretrigger
#DMAREQ1input(fallingedge)
#DMAREQ1input(risingedge)
Port1input
Port5input
(reserved)
16-bittimer1compareB
16-bittimer1compareA
(reserved)
I2SOutputCh.HSDMARight
SerialI/FCh.1Rxbufferfull
SerialI/FCh.1Txbufferempty
A/Dconversioncompletion
Port9input(USBPDREQ)
Port13input
Ch.2triggersource
Softwaretrigger
#DMAREQ2input(fallingedge)
#DMAREQ2input(risingedge)
Port2input
Port6input
(reserved)
16-bittimer2compareB
16-bittimer2compareA
I2SInputCh.HSDMALeft
SPItransmitDMArequest
SerialI/FCh.2Rxbufferfull
SerialI/FCh.2Txbufferempty
A/Dconversioncompletion
Port10input(USBinterrupt)
Port14input
Ch.3triggersource
Softwaretrigger
#DMAREQ3input(fallingedge)
#DMAREQ3input(risingedge)
Port3input
Port7input
(reserved)
16-bittimer3compareB
16-bittimer3compareA
I2SInputCh.HSDMARight
SPIreceiveDMArequest
(reserved)
A/Dconversioncompletion
Port11input
Port15input
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 trans-
fer is completed (even if the transfer counter is not 0), an interrupt request to the CPU will be generated if the inter-
rupt 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 software trigger is selected, the HSDMA channel can be invoked by writing 1 to HSTx (Dx/0x30029A).
hstx:Ch.xSoftwareTriggerBitintheHSDMASoftwareTriggerRegister(Dx/0x30029A)
When the selected trigger 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 HSx_TF (D0/0x30112E + 0x10x).
hsx_tF:Ch.xTriggerFlagStatus/ClearBitintheHSDMACh.xTriggerFlagRegister(D0/0x30112E+0x10x)
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.
note: The following shows the priority order of channels when DMA triggers with the same interrupt
leveloccurintwoormoreHSDMAandIDMAchannels.
Priority
Channel
High
←
→Low
HSDMACh.0>Ch.1>Ch.2>Ch.3>IDMAsoftwaretrigger>IDMAhardwaretrigger