diff --git a/src/omv/main.c b/src/omv/main.c index 5653053e2..dc5182573 100644 --- a/src/omv/main.c +++ b/src/omv/main.c @@ -415,6 +415,10 @@ int main(void) #endif bool first_soft_reset = true; + #if defined(MICROPY_BOARD_EARLY_INIT) + MICROPY_BOARD_EARLY_INIT(); + #endif + // Uncomment to disable write buffer to get precise faults. // NOTE: Cache should be disabled on M7. //SCnSCB->ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk; @@ -426,10 +430,6 @@ int main(void) // NOTE: The bootloader enables the CCM/DTCM memory. HAL_Init(); - #if defined(MICROPY_BOARD_EARLY_INIT) - MICROPY_BOARD_EARLY_INIT(); - #endif - #if MICROPY_HW_SDRAM_SIZE sdram_ok = sdram_init(); #if MICROPY_HW_SDRAM_STARTUP_TEST