summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-02-13 12:01:39 +0700
committerGitHub <[email protected]>2023-02-13 12:01:39 +0700
commit002ca345b874cc0ebb3a49309ebbf405df7f573e (patch)
tree4b9215a14ec17c712376272b903fca11f61ad4cc
parent86c416d4c0fb38432460b3e11b08b9de76941bf5 (diff)
parentec26c6163c9d1cf0422537e8f167a783736aca0c (diff)
Merge pull request #1898 from ccrome/fix-imx1011
Turn data cache on
-rw-r--r--hw/bsp/imxrt/family.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/bsp/imxrt/family.c b/hw/bsp/imxrt/family.c
index fc6e9e266..ecd18bad3 100644
--- a/hw/bsp/imxrt/family.c
+++ b/hw/bsp/imxrt/family.c
@@ -55,6 +55,12 @@ const uint8_t dcd_data[] = { 0x00 };
void board_init(void)
{
+ // make sure the dcache is on.
+#if defined(__DCACHE_PRESENT) && __DCACHE_PRESENT
+ if (SCB_CCR_DC_Msk != (SCB_CCR_DC_Msk & SCB->CCR))
+ SCB_EnableDCache();
+#endif
+
// Init clock
BOARD_BootClockRUN();
SystemCoreClockUpdate();