Skip to main content
muhammad
Associate II
July 11, 2012
Question

DMA use SRAM???????

  • July 11, 2012
  • 3 replies
  • 915 views
Posted on July 11, 2012 at 14:52

hi all

i need to know that is DMA uses the SRAM as the DMA buffer??????

if yes then my MCUstm32F407 got 112Kb and 16Kb of SRAM.

and DMA max buffer size is 64kb, in the case DMA is using half of my SRAM,

is there a possibility that i can  have shortage of memory in SRAM.

if yes then how can i avoid this type of situation........??

any help will appreciated a lot....:)  
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    July 11, 2012
    Posted on July 11, 2012 at 15:03

    if yes then how can i avoid this type of situation........??

    Use less of it.

    The 407 also has 64KB of CCM SRAM at 0x10000000, you can use that too, but not for DMA.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    muhammad
    muhammadAuthor
    Associate II
    July 12, 2012
    Posted on July 12, 2012 at 12:57

    thank you clive1 for your help

    just tell, how can i ensure the allocation of my statically declared variables and buffer arrays in C programming, how can i differentiate the memory allocation for DMA and my other uses for variables, while handling crush of data.

    thank you....:)

    Tesla DeLorean
    Guru
    July 12, 2012
    Posted on July 12, 2012 at 17:52

    Depends on the platform.

    If you don't tell the compiler/linker you could floor plan the space manually.

    Other than that you'd need to specify the memory spaces in a linker script, scatter file, or GUI settings, and then direct the compiler to place specific variables/structures into specific sections. You'd do that with a #pragma, or directive on the allocation, refer to your compiler documentation.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..