stm32/main: Enable D2 SRAM1/2/3 clocks on H7 MCUs.
@@ -442,8 +442,14 @@ int main(void) {
// enable the CCM RAM
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
#endif
+ #elif defined(STM32H7)
+ // Enable D2 SRAM1/2/3 clocks.
+ __HAL_RCC_D2SRAM1_CLK_ENABLE();
+ __HAL_RCC_D2SRAM2_CLK_ENABLE();
+ __HAL_RCC_D2SRAM3_CLK_ENABLE();
#endif
+
#if defined(MICROPY_BOARD_EARLY_INIT)
MICROPY_BOARD_EARLY_INIT();
#endif
