Page 1 of 1

Globally disabling DCache on F7

Posted: Wed Feb 09, 2022 12:14 pm
by dflogeras
Hi, I'm bringing up a new board based on an F7 and would like to do some basic tests with a small Chibi based firmware (test all IOs, peripherals, etc..)

This board has a couple of SRAMs and gate arrays on the memory bus, and for this level of testing I'd prefer to just disable the DCache completely so I can get deterministic bus writes/reads that I can see on a scope/logic probe. What is the cleanest/proper way to turn off DCache for a project? Would undefining (or defining to 0) __DCACHE_PRESENT in my makefile be OK? I'd like to avoid hand-editing the ST/STM32F7xx/*.h files.

Re: Globally disabling DCache on F7

Posted: Wed Feb 09, 2022 12:25 pm
by Giovanni
Hi,

You could disable it in your main using SCB_DisableDCache(). Alternatively you could use the MPU to declare RAMs as non-cacheable.

Giovanni