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:
parent
52c4e96c88
commit
3597e899c9
|
@ -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();
|
||||
|
|
|
@ -345,20 +345,6 @@ void SystemInit(void)
|
|||
}
|
||||
SCB->VTOR = vtorOffset;
|
||||
|
||||
/* Enable I-Cache */
|
||||
if (INSTRUCTION_CACHE_ENABLE) {
|
||||
SCB_EnableICache();
|
||||
}
|
||||
|
||||
/* Enable D-Cache */
|
||||
if (DATA_CACHE_ENABLE) {
|
||||
SCB_EnableDCache();
|
||||
}
|
||||
|
||||
if (PREFETCH_ENABLE) {
|
||||
LL_FLASH_EnablePrefetch();
|
||||
}
|
||||
|
||||
/* Configure the system clock to specified frequency */
|
||||
SystemClock_Config();
|
||||
|
||||
|
|
Loading…
Reference in New Issue