1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 13:55:18 +03:00

Move enabling of caches for F7

Moves cache enabling from SystemInit() to init() as it is not recommended to enable caches before entering main function.
This commit is contained in:
Hans Christian Olaussen 2019-03-10 20:11:26 +01:00
parent 52c4e96c88
commit 3597e899c9
2 changed files with 16 additions and 14 deletions

View file

@ -249,6 +249,22 @@ void init(void)
HAL_Init();
#endif
#if defined(STM32F7)
/* Enable I-Cache */
if (INSTRUCTION_CACHE_ENABLE) {
SCB_EnableICache();
}
/* Enable D-Cache */
if (DATA_CACHE_ENABLE) {
SCB_EnableDCache();
}
if (PREFETCH_ENABLE) {
LL_FLASH_EnablePrefetch();
}
#endif
printfSupportInit();
systemInit();