Jump to content

STM32F4 128k vs 192k RAM


Sauraen
 Share

Recommended Posts

So I noticed that despite the STM32F4 having 192k of RAM, I could only have application code (plus MIOS32 of course) allocate up to about 128k. I found this by increasing the heap size until the app wouldn't link, and then checked the size of the larger arrays used in MIOS32 and my application. Since my application uses dynamic memory allocation, having the heap be as big as possible is critical.

I found that the stack position is defined in STM32F407VG.ld, explicitly as _estack = 0x20020000, with a comment saying this is the end of the 128k RAM on the AHB bus. What does this mean? Why can't we use the remaining 64k of RAM? I tried changing this to 0x20030000, and (predictably) the application refused to start. So how would it be possible to get access to the remaining RAM?

Edit: I found the other 64k of RAM, evidently it's in a separate section at 0x10000000, and I think it can't be accessed by DMA (which significantly limits its usefulness for many applications). I thought switching from LPC17 to STM32F4 would get rid of the memory segmentation issues, but I guess not. In any case, how do I get static/global variables allocated in that segment?

Edited by Sauraen
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...