Globally disabling DCache on F7

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

Moderators: RoccoMarco, barthess

dflogeras
Posts: 212
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 7 times
Been thanked: 19 times

Globally disabling DCache on F7

Postby dflogeras » Wed Feb 09, 2022 12:14 pm

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: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Globally disabling DCache on F7

Postby Giovanni » Wed Feb 09, 2022 12:25 pm

Hi,

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

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 19 guests