
V DMA BLOCK: HSDMA
Operation of HSDMA
An HSDMA channel starts data transfer by the selected trigger factor.
Make sure that transfer conditions and a trigger factor are set and the HSDMA channel is enabled before starting a DMA transfer.
Operation in
In
HSDMA has three transfer modes, in each of which data transfer operates differently. The following describes the operation of HSDMA in each transfer mode.
Single transfer mode
The channel for which DxMOD in control information is set to "00" operates in single transfer mode. In this mode, a transfer operation invoked by one trigger is completed after transferring one data unit of the size set by DATSIZEx. If a data transfer needs to be performed a number of times as set by the transfer counter, an equal number of triggers are required.
The operation of HSDMA in single transfer mode is shown by the flow chart in Figure 2.3.
START |
|
| |
|
|
|
|
Clear trigger flag HSx_TF |
|
| |
to accept next trigger |
|
| |
|
|
|
|
Data read | from source |
|
|
(1 byte or 1 half word) |
|
| |
|
|
|
|
Data write to destination |
|
| |
(1 byte or 1 half word) |
|
| |
|
| ∗ : according to SxIN/DxIN | |
Increment/decrement | |||
address ∗ | settings | ||
|
|
|
|
Transfer counter - 1 |
|
| |
|
|
|
|
Transfer | N | ||
counter = 0 |
|
| |
| Y |
|
|
|
|
|
|
Clear HSDMA enable bit |
|
| |
HSx_EN |
|
| |
|
|
|
|
Set interrupt | factor flag |
|
|
FHDMx |
|
| |
|
|
|
|
END |
|
|
Figure 2.3 Operation Flow in Single Transfer Mode
(1)When a trigger is accepted, the trigger flag HSx_TF is cleared and then data of the size set in the control information is read from the source address.
(2)The read data is written to the destination address.
(3)The addresses are incremented or decremented according to the SxIN/DxIN settings.
(4)The transfer counter is decremented.
(5)The HSDMA enable bit HSx_EN is cleared and HSDMA interrupt factor flag in ITC is set when the transfer counter reaches 0 (when DINTENx = "1").
S1C33210 FUNCTION PART | EPSON |