As shown in Figure 2.8, data is written in longword units from the work RAM area (6000000H).
Figure 2.8 Example of data writing
6000000H┏━━━━━━━━━━┓ ┐ ┃ 20H ┃ │ ← (Number of bytes transferred) ┠──────────┨ │ ┃ 5C00000H ┃ │(a)←(Transfer source address) ┠──────────┨ │ ┃ 4000000H ┃ │ ←(Forwarding address) 600000CH┣━━━━━━━━━━┫ ┘ ┃ 10H ┃ │ ┠──────────┨ │ ┃ 6080000H ┃ │(b) ┠──────────┨ │ ┃ 5E00000H ┃ │ 6000018H┣━━━━━━━━━━┫ ┘ ┃ 15H ┃ │ ┠──────────┨ │ ┃ 6081000H ┃ │(c) ┠──────────┨ │ ┃ DA00000H ┃ │ ←8000000H+5A00000H 6000024H┣━━━━━━━━━━┫ ┘ (End code) (Forwarding address) ┃ ┃
Write the DMA parameter source address (6000000H) to the write address register (D0W).
Write the address addition value (101H) to the address addition value register D0AD.
(Load the address addition value from the CPU to address 25FE000CH. Details of the address addition value are described in this section in Address addition value. In normal DMA, specify 101H as the address addition value.)
Set the DMA mode to 1, set the address update bit and DMA activation factor as necessary, and write to the mode/address update/DMA activation factor register D0MD. For example, if address update is set to hold mode and V-Blank-IN is used as the activation factor, write 1000000H to D0MD.
(Loads 1000000H from the CPU to address 25FE0014H.)
When the DMA enable bit is set to 1 and the activation factor set in (4) occurs, DMA is activated and DMA transfers (a) to (c) are executed in order until the DMA end code is detected. The DMA end code is a DMA indirect mode end notification code that exists only in the work RAM area, and DMA transfer will continue unless this bit is detected as "1".
6000000H┏━━━━━━━━━━┓ ┃ 20H ┃ ┠──────────┨ ┃ 5C00000H ┃ ┠──────────┨ ┃ 4000000H ┃ 600000CH┣━━━━━━━━━━┫ ┃ 10H ┃ ┠──────────┨ ┃ 6080000H ┃ ┠──────────┨ ┃ 5E00000H ┃ 6000018H┣━━━━━━━━━━┫ ┃ 15H ┃ ┠──────────┨ ┃ 6081000H ┃ ┠──────────┨ ┃ DA00000H ┃ 6000024H┣━━━━━━━━━━┫ ┐ ┃ 30H ┃ │ ┠──────────┨ │ ┃ 6090000H ┃ │(d) ┠──────────┨ │ ┃ 5000000H ┃ │ 6000030H┣━━━━━━━━━━┫ ┘ ┃ 25H ┃ │ ┠──────────┨ │ ┃ 60A0000H ┃ │(e) ┠──────────┨ │ ┃ D100000H ┃ │ ←8000000H+5100000H 600003CH┣━━━━━━━━━━┫ ┘ (End code) (Forwarding address) ┃ ┃
Figure 2.10 Example of DMA transfer execution by setting address addition value