mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
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:
parent
86c416d4c0
commit
ec26c6163c
@ -55,6 +55,12 @@ const uint8_t dcd_data[] = { 0x00 };
|
|||||||
|
|
||||||
void board_init(void)
|
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
|
// Init clock
|
||||||
BOARD_BootClockRUN();
|
BOARD_BootClockRUN();
|
||||||
SystemCoreClockUpdate();
|
SystemCoreClockUpdate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user