🚑️ Fix SDIO Init bootloop on STM32F1 (#24275)

This commit is contained in:
Tanguy Pruvot 2022-06-03 02:23:07 +02:00 committed by GitHub
parent 833ea4ec29
commit c9b97b8d64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -200,7 +200,8 @@ static uint32_t clock_to_divider(uint32_t clk) {
bool SDIO_Init() { bool SDIO_Init() {
HAL_StatusTypeDef sd_state = HAL_OK; HAL_StatusTypeDef sd_state = HAL_OK;
HAL_SD_DeInit(&hsd); if (hsd.Instance == SDIO)
HAL_SD_DeInit(&hsd);
/* HAL SD initialization */ /* HAL SD initialization */
hsd.Instance = SDIO; hsd.Instance = SDIO;