Skip to main content
Visitor II
April 15, 2025
Question

STM32H7 MDMA With QSPI

  • April 15, 2025
  • 1 reply
  • 727 views

Hi,

 

I would like to use the MDMA with the QSPI on an STM32H743 or similar.

I need to use the QSPI to interface with several multiplexed LCD displays and I want to use the QSPI in 'indirect' mode to send commands to the displays and DMA the pixel data into the QSPI to transfer to the display.

I am a bit confused about how the MDMA is supposed to work - the reference manual says that QSPI can trigger the MDMA when the QSPI data FIFO reaches a threshold.

So I think I would use MDMA in 'buffer' transfer with TRGM = 00 - so each trigger from the QSPI transfers a buffers worth of data (to fill the QPSI FIFO), then configure the MDMA channel to run in 'block repeat' mode to transfer a whole frame buffer's worth of data (about 285 kB)

Am I thinking along the right lines here? The documentation for the MDMA seems pretty terse I don't know if I've understood it correctly.

But most importantly, how do I actually set an MDMA channel to take its trigger from QSPI? There is the field TSEL in the MDMA_CxTBR register, but I can't find any documentation anywhere that explains what hardware triggers are mapped by what values of TSEL... Or am I completely misunderstanding how this works?

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    April 15, 2025

    Hello @JF999 and welcome to the community,

     

    Each MDMA channel provides an unidirectional transfer link between a source and a destination.
    Each channel can perform transfer of the following types:
    • Single block transfer: one block is transferred. At the end of the block, the MDMA channel is disabled and an end-of-channel transfer interrupt is generated.
    • Repeated block transfer: a number of blocks is transferred before disabling the channel.
    • Linked-list transfer: when the transfer of the current data block (or last block in a repeat) is completed, a new block control structure is loaded from memory and a new block transfer is started.

    For more information about different mode transfer, I recommend you to look at RM0433 precisely 14. MDMA controller (MDMA).

    For the QUADSPI transfer with MDMA, I think the AN4760 section DMA usage and QSPI_ReadWrite_DMA example can help you.

     

    Thank you.

    Kaouthar