Skip to content

Commit b2b277b

Browse files
tpruvotLCh-77
authored andcommitted
🚑️ Fix SDIO Init bootloop on STM32F1 (MarlinFirmware#24275)
1 parent b9d3d44 commit b2b277b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Marlin/src/HAL/STM32/sdio.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ static uint32_t clock_to_divider(uint32_t clk) {
200200

201201
bool SDIO_Init() {
202202
HAL_StatusTypeDef sd_state = HAL_OK;
203-
HAL_SD_DeInit(&hsd);
203+
if (hsd.Instance == SDIO)
204+
HAL_SD_DeInit(&hsd);
204205

205206
/* HAL SD initialization */
206207
hsd.Instance = SDIO;

0 commit comments

Comments
 (0)