From 34c3cb5c01f018ff81beb1e2720917f75789de57 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 13 Oct 2018 12:18:13 -0400 Subject: [PATCH] sam4e8e: Enable SAM4 cache at startup Signed-off-by: Kevin O'Connor --- src/sam4e8e/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sam4e8e/main.c b/src/sam4e8e/main.c index ef3e2391..9e02a5d0 100644 --- a/src/sam4e8e/main.c +++ b/src/sam4e8e/main.c @@ -43,6 +43,12 @@ int main(void) { SystemInit(); + + // Enable Cache + if (!(CMCC->CMCC_SR & CMCC_SR_CSTS)) + CMCC->CMCC_CTRL = CMCC_CTRL_CEN; + + // Start main loop sched_main(); return 0; }