Globally disabling DCache on F7

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

Globally disabling DCache on F7

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Globally disabling DCache on F7

Post 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
Post Reply