Skip to main content
ExtSol
Associate II
Dec 23, 2018 3:12 PM UTC
Solved

Why can't I use all SRAMs?

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.
    Andreas Bolsch
    Andreas BolschBest answer
    Lead III
    Dec 23, 2018 3:54 PM UTC

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

    4 replies

    ExtSol
    ExtSolAuthor
    Associate II
    Dec 23, 2018 3:16 PM UTC

    ..

    Andreas Bolsch
    Andreas BolschBest answer
    Lead III
    Dec 23, 2018 3:54 PM UTC

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

    ExtSol
    ExtSolAuthor
    Associate II
    Dec 23, 2018 4:25 PM UTC

    So, what happend when i switch on IRAM2?

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

    Tesla DeLorean
    Guru
    Dec 23, 2018 5:17 PM UTC

    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..