diff options
| author | caleb crome <[email protected]> | 2023-02-12 11:24:21 -0800 |
|---|---|---|
| committer | caleb crome <[email protected]> | 2023-02-12 11:24:21 -0800 |
| commit | ec26c6163c9d1cf0422537e8f167a783736aca0c (patch) | |
| tree | 4b9215a14ec17c712376272b903fca11f61ad4cc | |
| parent | 86c416d4c0fb38432460b3e11b08b9de76941bf5 (diff) | |
Turn data cache on
This fixes https://github.com/hathach/tinyusb/issues/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.
| -rw-r--r-- | hw/bsp/imxrt/family.c | 6 |
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(); |
