cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 DMA Limitation ?

vishal patel
Associate II
Posted on March 08, 2017 at 06:34

Application Scenario: We have used DMA, FSMC, and DCMI module of the  STM32. DMA is configured

to read the data from the DCMI out output  register DR, and write it it to external SRAM. Likely DCMI is

configured  as an Peripheral and SRAM is configured as a memory port of the DMA.  Data transfer width

is configured as an word in case of peripheral port  and half-word in case of memory port. SRAM is configured

on address  0x64000000.  Problem: The whole system works fine as long as we configure DCMI to take JPEG

image up to 262KByte, but when we configured it to take picture of the higher  quality, DMA is not able to store

the data in SRAM, above the address  3ffff, so we get only 262143 bytes maximum. after that we receive only 0xFF. 

What we have verified so far: 1) FSMC part is configured fine 2) SRAM is  written and read back by using internal memory, it works fine. 3) I  believe there is no point of having doubts on DCMI module, If It is not  configured good then It should not be working for the images under 262K.

#dcmi #stm32 #dma #fsmc
2 REPLIES 2
Posted on March 08, 2017 at 23:59

The maximum number of transfers of DMA is 65535 (counted on peripheral side which you've set to word per transfer, i.e. the max is 4x65535 bytes). Read the DMA chapter of RM: NDTR is 16-bits wide.

For more, enable a transfer-complete interrupt for the given DMA Stream, and in the interrupt handler, reconfigure the DMA to continue where left and restart.

JW

Posted on March 09, 2017 at 05:35

Hi,

Thanks. Understood.