cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure DMA when STM32F469 uses 16 bit SDRM?

ac.2
Associate II

Hi:​

Let me ask you a question.

When use 32 bits of SDRAM in STM469 official routines, DMA is configured as follows:

 /* Configure common DMA parameters */
    dma_handle.Init.Channel             = SDRAM_DMAx_CHANNEL;
    dma_handle.Init.Direction           = DMA_MEMORY_TO_MEMORY;
    dma_handle.Init.PeriphInc           = DMA_PINC_ENABLE;
    dma_handle.Init.MemInc              = DMA_MINC_ENABLE;
    
 
    dma_handle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
    dma_handle.Init.MemDataAlignment    = DMA_MDATAALIGN_WORD;
 
    
    dma_handle.Init.Mode                = DMA_NORMAL;
    dma_handle.Init.Priority            = DMA_PRIORITY_HIGH;
    dma_handle.Init.FIFOMode            = DMA_FIFOMODE_DISABLE;
    dma_handle.Init.FIFOThreshold       = DMA_FIFO_THRESHOLD_FULL;
    dma_handle.Init.MemBurst            = DMA_MBURST_SINGLE;
    dma_handle.Init.PeriphBurst         = DMA_PBURST_SINGLE;
 
    dma_handle.Instance = SDRAM_DMAx_STREAM;
 
    /* Associate the DMA handle */
    __HAL_LINKDMA(hsdram, hdma, dma_handle);
 
    /* Deinitialize the stream for new transfer */
    HAL_DMA_DeInit(&dma_handle);
 
    /* Configure the DMA stream */
    HAL_DMA_Init(&dma_handle);

Now I change SDRAM to 16 bit data width. Should DMA also be modified accordingly? If so, how should it be modified in the configuration?

Thank you very much.

3 REPLIES 3

Why would the DMA width need to change?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ac.2
Associate II

Because the data width of my product SDRAM is 16 bits. So I wonder if I want to change the data width of SDRAM dam to 16 bits.

Because the data width of my product SDRAM is 16 bits. So I wonder if I want to change the data width of SDRAM dam to 16 bits.