Skip to main content
arnold_w
Senior II
August 9, 2018
Question

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

  • August 9, 2018
  • 2 replies
  • 590 views

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
    August 9, 2018

    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
    August 10, 2018

    Thank you, now it works great.