sam4e8e: Enable SAM4 cache at startup

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-10-13 12:18:13 -04:00 committed by KevinOConnor
parent 7fac0de1f8
commit 34c3cb5c01
1 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,12 @@ int
main(void) main(void)
{ {
SystemInit(); SystemInit();
// Enable Cache
if (!(CMCC->CMCC_SR & CMCC_SR_CSTS))
CMCC->CMCC_CTRL = CMCC_CTRL_CEN;
// Start main loop
sched_main(); sched_main();
return 0; return 0;
} }