mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Disable, clean and invalidate before enabling the cache.
This commit is contained in:
parent
35b4e34253
commit
af7bccbfbb
@ -68,11 +68,15 @@ void HAL_MspInit(void)
|
|||||||
/* Enable I/D cache */
|
/* Enable I/D cache */
|
||||||
#if defined(MCU_SERIES_F7) ||\
|
#if defined(MCU_SERIES_F7) ||\
|
||||||
defined(MCU_SERIES_H7)
|
defined(MCU_SERIES_H7)
|
||||||
// Invalidate CPU cache
|
/* Disable and Invalidate I-Cache */
|
||||||
|
SCB_DisableICache();
|
||||||
SCB_InvalidateICache();
|
SCB_InvalidateICache();
|
||||||
SCB_InvalidateDCache();
|
|
||||||
|
|
||||||
// Enable the CPU Cache
|
/* Disable, Clean and Invalidate D-Cache */
|
||||||
|
SCB_DisableDCache();
|
||||||
|
SCB_CleanInvalidateDCache();
|
||||||
|
|
||||||
|
// Enable the CPU Caches
|
||||||
SCB_EnableICache();
|
SCB_EnableICache();
|
||||||
SCB_EnableDCache();
|
SCB_EnableDCache();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user