cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4S7ZIT: Can FMC be used with DMA?

JSmit.11
Associate II

HI All,

I plan to use STM32L4S7ZITx cpu. I need to work with LCD screen which has parallel interface and connected to FMC. It works fine on demo board but i would like to offload the CPU. But i am not sure if FMC can work with DMA.

I checked the following:

The RM0432 (i guess it is the right reference manual for this cpu).

On page 397 there is a table Tab54 which lists all multiplexer inputs to resources. There is no FMC listed there. So i guess FMC is not supported by DMA.

An so it is not possible to offload the CPU from writing long memory chunks to LCD screen or to any memory connected to it.

Am I correct?

1 ACCEPTED SOLUTION

Accepted Solutions

> On page 397 there is a table Tab54 which lists all multiplexer inputs to resources.

Those are signals which serve as request (trigger) to DMA (through DMAMUX). For example, when a byte arrives to UART, an uart_rx signal can be used to trigger a DMA transfer from UART's Rx data register to memory.

What you intend to do is memory-to-memory transfer, those are not triggered by hardware signals, but by software, by setting the MEM2MEM bit in respective DMA_CCRx register and enabling that DMA channel. Read the DMA chapter in RM.

JW

View solution in original post

5 REPLIES 5

> On page 397 there is a table Tab54 which lists all multiplexer inputs to resources.

Those are signals which serve as request (trigger) to DMA (through DMAMUX). For example, when a byte arrives to UART, an uart_rx signal can be used to trigger a DMA transfer from UART's Rx data register to memory.

What you intend to do is memory-to-memory transfer, those are not triggered by hardware signals, but by software, by setting the MEM2MEM bit in respective DMA_CCRx register and enabling that DMA channel. Read the DMA chapter in RM.

JW

JSmit.11
Associate II

Hello, Jan

Thanks for reply!!!

I have managed to configure DMA as memory to memory transfer and now I can write data to LCD screen.

There is one moment unclear to me. How DMA data speed is defined?

I see that the write strobe on FMS has 500kHz frequency. And each strobe writes 16 bits of data.

I guess DMA controller doesn't know the speed of peripheral. I mean there is no feedback between FMS and DMA controller. Or maybe there is?

I am not sure. From picture on page 89 in RM0432 i see that FMC is connected to BusMatrix-S. So no AHB and APB are involved.

So what affects DMA speed when data goes through BusMatrix-S?

Thanks

Hm,

I have found that in my FMC configuration i have too big Data setup time in HCLK clock cycles. When i decrease it the frequency of write strobe increase.

So dma transfer speed depends on peripheral settings (FMC). But how do DMA controller knows that the peripheral is not available to accept data at that moment? Is there any feedback between peripheral and DMA?

> Is there any feedback between peripheral and DMA?

There is a "feedback" (a Wait signal) between all bus-masters and bus-slaves.

JW

JSmit.11
Associate II

Thanks for help Jan,