Browse Source

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

Tanguy Pruvot 2 years ago
parent
commit
c9b97b8d64
No account linked to committer's email address
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      Marlin/src/HAL/STM32/sdio.cpp

+ 2
- 1
Marlin/src/HAL/STM32/sdio.cpp View File

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

Loading…
Cancel
Save