Skip to content

Commit

Permalink
mimxrt1050: check if D-cache is enabled before enabling it.
Browse files Browse the repository at this point in the history
An issue has been confirmed in CMSIS core header file in
SCB_EnableDCache when stack is in cacheable memory.

Issue report: ARM-software/CMSIS_5#331

To workaround this issue by checking if Dcache's been enabled before
trying to enable it.

Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
  • Loading branch information
jhqian authored and MaureenHelm committed Jun 4, 2018
1 parent 5757b44 commit 5c6a399
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/arm/soc/nxp_imx/rt/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ static int imxrt_init(struct device *arg)
}

SCB_EnableICache();
SCB_EnableDCache();
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
SCB_EnableDCache();
}

_ClearFaults();

Expand Down

0 comments on commit 5c6a399

Please sign in to comment.