Skip to content

Commit f6d6cdf

Browse files
committed
giga: fix QSPI initialization
1 parent a41dabe commit f6d6cdf

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_GIGA/system_clock_override.c

+17
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,23 @@ void SetSysClock(void)
7676
}
7777
}
7878
}
79+
80+
// Set seemingly unrelated pins that prevent QSPI from working
81+
GPIO_InitTypeDef GPIO_InitStruct;
82+
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
83+
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
84+
GPIO_InitStruct.Pull = GPIO_NOPULL;
85+
GPIO_InitStruct.Alternate = 0;
86+
87+
GPIO_InitStruct.Pin = GPIO_PIN_13;
88+
__HAL_RCC_GPIOD_CLK_ENABLE();
89+
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
90+
__HAL_RCC_GPIOD_CLK_DISABLE();
91+
92+
GPIO_InitStruct.Pin = GPIO_PIN_7;
93+
__HAL_RCC_GPIOF_CLK_ENABLE();
94+
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
95+
__HAL_RCC_GPIOF_CLK_DISABLE();
7996
}
8097

8198
#if ( ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) || ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) )

0 commit comments

Comments
 (0)