Skip to main content
ExtSol
Associate II
December 23, 2018
Solved

Why can't I use all SRAMs?

  • December 23, 2018
  • 4 replies
  • 1919 views

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?

    This topic has been closed for replies.
    Best answer by Andreas Bolsch

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

    4 replies

    ExtSol
    ExtSolAuthor
    Associate II
    December 23, 2018

    ..

    Andreas Bolsch
    Andreas BolschBest answer
    Lead III
    December 23, 2018

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

    ExtSol
    ExtSolAuthor
    Associate II
    December 23, 2018

    So, what happend when i switch on IRAM2?

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

    Tesla DeLorean
    Guru
    December 23, 2018

    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..