Page 1 of 1

STM32F7 Caches

Posted: Sun Jun 05, 2016 6:10 am
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?

Re: STM32F7 Caches

Posted: Sun Jun 05, 2016 7:08 am
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

Re: STM32F7 Caches

Posted: Sun Jun 05, 2016 1:30 pm
by cipher
That's good that I've asked
I'm using IAR so I guess I should enable caches right in my main()

Re: STM32F7 Caches

Posted: Sun Jun 05, 2016 6:28 pm
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