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.
This commit is contained in:
caleb crome 2023-02-12 11:24:21 -08:00
parent 86c416d4c0
commit ec26c6163c

View File

@ -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();