cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I use all SRAMs?

ExtSol
Associate II

STM32F407VGT6 -> this controller have 192kb of sram, I create a big byte array have 131832 byte and i got an error in Keil.

Any idea why?

1 ACCEPTED SOLUTION

Accepted Solutions
Andreas Bolsch
Lead II

Datasheet "Figure 18. STM32F40x memory map": The SRAM consists of three blocks, non-contiguos ...

View solution in original post

4 REPLIES 4
ExtSol
Associate II
 
Andreas Bolsch
Lead II

Datasheet "Figure 18. STM32F40x memory map": The SRAM consists of three blocks, non-contiguos ...

So, what happend when i switch on IRAM2?

If IRAM2 is off, i cant use all of 128k sram.

You're allocating more than 128KB, and you also have the stack, heap and other variables fighting for the same space.

You should perhaps be using a Scatter File, and defining what goes into the 0x10000000 [64KB] CCM region, like the heap, stack, etc.

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