Example: Start DMA Channel Thread - Example: Start DMA Channel Thread - 1.15 English - UG585

Zynq 7000 SoC Technical Reference Manual (UG585)

Document_ID
UG585
Release_Date
2026-02-06
Version
1.15 English

The following example shows the steps required to start a DMA channel thread using the debug instruction registers.

  1. Create a program for the DMA channel.
  2. Store the program in a region of system memory.

    Use one of the APB interfaces on the DMAC to program a DMAGO instruction as follows:

  3. Poll the dmac.DBGSTATUS register to ensure that debug is idle, that is, the dbgstatus bit is 0 . Refer to the Debug Status register in Register Details.
  4. Write to the dmac.DBGINST0 register and enter the:
    1. Instruction byte 0 encoding for DMAGO.
    2. Instruction byte 1 encoding for DMAGO.
    3. Debug thread bit to 0. This selects the DMA manager. Refer to the Debug Instruction-0 register in Register Details.
  5. Write to the dmac.DBGINST1 register with the DMAGO instruction byte [5:2] data, refer to the Debug Instruction-1 register in Register Details. These four bytes must be set to the address of the first instruction in the program that was written to system memory in Step 2.

    Instruct the DMAC to execute the instruction that the debug instruction registers contain:

  6. Write a 0 to the dmac.DBGCMD register. The DMAC starts the DMA channel thread and sets the dbgstatus bit to 1 . Refer to the Debug Command register in Register Details. After the DMAC completes execution of the instruction, it clears the dbgstatus bit to 0.