Skip to main content
arnold_w
Senior II
Aug 9, 2018 4:16 PM UTC
Question

How do I write to RAM, beyond the RAM-range specified in the linker script, when caching is enabled?

I am working with the STM32F760I-EVAL board. In the linker script I have specified that the RAM is only 500 x 1024 bytes, even though it really is 512 * 1024 bytes. By doing this I can place variables in the last 12 x 1024 bytes of the RAM that survives a software reset. The problem, as soon as I enable caching using SCB_EnableICache() and SCB_EnableDCache() this trick stops working. It doesn't matter how many volatile modifiers I throw into the code that does the writing into RAM, it just won't work anymore. Can someone please help me?

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    Aug 9, 2018 4:57 PM UTC

    Configure the memory region's cachability in the MPU.

    Or use SCB_CleanDCache() to flush to memory.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    arnold_w
    arnold_wAuthor
    Senior II
    Aug 10, 2018 6:58 AM UTC

    Thank you, now it works great.