Question
STM32CubeMX FATFS SD card re-insert
Posted on May 11, 2016 at 10:39
Does anybody know how to solve the
re-
inserting the
SD card ?
I have a project
generated by STM32CubeMX. I have used it for re-inserting the SD cardthis function
: if (CD_CARD == b_cd) { if (CD_NO_CARD == b_cd_last) { /* insert */ res = f_mount(&SDFatFs, (TCHAR const*)SD_Path, 0); if (res == FR_OK) { App_Clear_Error(ERR_SD_INIT); } else { App_Set_Error(ERR_SD_INIT); } } } else { if (CD_CARD == b_cd_last) { /* eject */ res = f_mount(NULL, (TCHAR const*)SD_Path, 0); App_Set_Error(ERR_SD_INIT); } } b_cd_last = b_cd;Card operations as f_open after re-inserting the sd card
do not work.
#stm32cubemx-fatfs-sd-re-insert