RuntimeError: DMA channel not started on ultra96

Hi everyone,

This is my first time using PYNQ. I’m getting this raise RuntimeError(“DMA channel not started”) error pointing to the line dma_recv.transfer(output_buffer) when calling my python script onto the bitstream.

I’m guessing this is an issue with either the HLS or the vivado IP? I’m following a tutorial so I’m not sure what causes this issue.

The python script:

from pynq import Overlay, allocate
import numpy as np

overlay = Overlay("/home/xilinx/IP/IP.bit")

# DMA objects
dma = overlay.axi_dma_0
dma_send = dma.sendchannel
dma_recv = dma.recvchannel

# Allocate input and output buffers
datasize = 784
input_buffer = allocate(shape=(datasize,), dtype=np.uint32)
output_buffer = allocate(shape=(1,), dtype=np.uint32)

# Send data from input_buffer using DMA send
dma_send.transfer(input_buffer)
# Receive data into output_buffer using DMA receive (memory-to-memory transfer)
dma_recv.transfer(output_buffer)
# Wait for the DMA operations to complete
dma_send.wait()
dma_recv.wait()
# Check buffers and print result
print("Input Buffer (Sent Data):", input_buffer)
print("Output Buffer (Received Data):", output_buffer)

Hi @Leo,

Welcome to the PYNQ community.

I wrote an extensive tutorial about debugging this. You can find it here Debugging Common DMA Issues [Part 3]

Mario