STM32F7 Caches

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

Moderator: RoccoMarco

Post Reply
cipher
Posts: 24
Joined: Tue May 31, 2016 10:05 pm
Has thanked: 2 times
Been thanked: 2 times

STM32F7 Caches

Post by cipher »

Really quick question
I was looking through ChibiOs code trying to learn and understand it more, and as i understood from forum posts both Instruction cache and data cache should be enabled by default, however i couldn't find where they are getting enabled in the code. SCB_EnableDCache and SCB_EnableDICache are declared in core_cm7.h but never being called anywhere
Any hints?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F7 Caches

Post by Giovanni »

Hi,

GCC startup files do that internally, other compilers either do that in their runtime libraries or it is up to the application to enable it.

Giovanni
cipher
Posts: 24
Joined: Tue May 31, 2016 10:05 pm
Has thanked: 2 times
Been thanked: 2 times

Re: STM32F7 Caches

Post by cipher »

That's good that I've asked
I'm using IAR so I guess I should enable caches right in my main()
cipher
Posts: 24
Joined: Tue May 31, 2016 10:05 pm
Has thanked: 2 times
Been thanked: 2 times

Re: STM32F7 Caches

Post by cipher »

Just to confirm, in my case, both instruction and data caches were disabled, i checked the SCB registers, i put the appropriate calls in my main to enable them both
Post Reply