Skip to content

Commit ec26c61

Browse files
committed
Turn data cache on
This fixes hathach#1894. I'm not really sure if this is the correct way to fix it, and I have not tested on all the rest of the family members, however, this lets the i.MX1010 work again. The problem: the latest SDK update does not enable the data cache by default This causes an assert in board_init() when attemping to control clock gating. I haven't investigated further as to *why* it's a problem, but it is a problem.
1 parent 86c416d commit ec26c61

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hw/bsp/imxrt/family.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ const uint8_t dcd_data[] = { 0x00 };
5555

5656
void board_init(void)
5757
{
58+
// make sure the dcache is on.
59+
#if defined(__DCACHE_PRESENT) && __DCACHE_PRESENT
60+
if (SCB_CCR_DC_Msk != (SCB_CCR_DC_Msk & SCB->CCR))
61+
SCB_EnableDCache();
62+
#endif
63+
5864
// Init clock
5965
BOARD_BootClockRUN();
6066
SystemCoreClockUpdate();

0 commit comments

Comments
 (0)