Which features can utilize DMA?

I noticed in the release notes for version 4.4.3 of the firmware, it says ‘Add DMA utils’. What features can utilize DMA at the Python level? The only ones I know of are DAC and I2C. DMA transmissions for UART and SPI would also be very useful, but it seems that even MicroPython doesn’t support them. You have DMA support for SPI in your LCD library; will that be exposed at the Python level for us to use?

The UART and I2C and SPI driver automatically use DMA if you send the data from a DMA valid memory. E.g. the frame buffer, not the MicroPython heap which can’t be accessed by the DMA controllers.

This changes depending on what MCU you are on, but, in general, DMA support is automatic if it can work.

img_ex_fb = sensor.alloc_extra_fb(160,120,sensor.RGB565)
img_fb = framebuf.FrameBuffer(bytearray(160 * 120 * 2), 160, 120, framebuf.RGB565)

while True:
    timer = millis()
    uart.write(img_fb)
    print(millis() - timer)
    time.sleep(0.1)

This is the program I used for testing, with the OpenMV4Plus. The result shows that data in both internal and external buffers are sent in a blocking manner. Is it possible to implement UART DMA functionality on the OpenMV4Plus?

That’s a MicroPython API thing. The UART driver is not implemented with DMA. We don’t have any plans to update that.

That said, you can do 7.5Mb/s with the UART on the H7 Plus. If you use the UART with a system that can handle that speed the time a transfer takes can be very short.