stm32/main: Don't unconditionally enable GPIO A,B,C,D clocks.

Rely on them being enabled only when needed.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2021-09-02 13:03:47 +10:00
parent 05cd17e36f
commit 9792c9105f
1 changed files with 0 additions and 8 deletions

View File

@ -369,14 +369,6 @@ void stm32_main(uint32_t reset_mode) {
// set the system clock to be HSE
SystemClock_Config();
// enable GPIO clocks
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
#if defined(GPIOD)
__HAL_RCC_GPIOD_CLK_ENABLE();
#endif
#if defined(STM32F4) || defined(STM32F7)
#if defined(__HAL_RCC_DTCMRAMEN_CLK_ENABLE)
// The STM32F746 doesn't really have CCM memory, but it does have DTCM,