cancel
Showing results for 
Search instead for 
Did you mean: 

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

arnold_w
Senior

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?

2 REPLIES 2

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

Thank you, now it works great.