cancel
Showing results for 
Search instead for 
Did you mean: 

Have I run out of Memory, RAM Overflow

uli stone
Associate II

Hi,

I'm having trouble, because I got when I defined a second array which I need for processing a image with the STM32F429ZI Microcontroller a message that I have a RAM overflow.

When I now define a smaller array, like uint8_t image[240][320] my whole application is not running on the Microcontroller. But when I comment the initialization n of the image array out, everything is working fine.

How can I see how much memory I have used and how could I rearrange other memory on the Microcontroller?

Thank you

21 REPLIES 21

Whether 312x240 or 320x240, it's always roughly 75k, so if it's bytes, it's 75kbytes. You have 192kbytes of continguous memory so you can fit two such arrays of bytes, or one array of halfwords there. That leaves you some space for the rest of the program to live. That's it, fullstop.

Now you may be inventive and learn some way how to use the remaining non-continuous 64kB (CCMRAM) to store some of that data (as it won't fit even an array of bytes of yours), making for some very awkward programming; you may rethink your requirements e.g. you may learn to process data in place, overlapping the 8-byte and 16-byte array, or process only a portion of the data - this is entirely upon you as you did not even hint what your application is; or you can change hardware, use a mcu with bigger built-in RAM or add external RAM.

JW

Hi Clive,

I think the best Idea is to use the SDRAM of the STM32F429 Disco Board to save the images there. But since I never worked with the SDRAM, how can I use it?