Hello,
I'm currently working on a project that requires data to be stored to an microSD. I'm using a custom board with the nRF52832 chipset and a Molex micro SD card holder. I can successfully initialize the SD card via FATFS once the firmware boots up, but only if the SD card is inserted before power is turned on. If I have the SD card inserted when I power on, I can successfully write and read from the SD card, no issues there. The issue is if I attempt to insert the SD card after the device has turned on, for the life of me I can't initialize it.
The idea is that if the user doesn't have the card inserted at startup it will fail initialization (that's fine), if the user inserts the card afterwards and attempts to record data, the firmware will attempt to initialize FATFS again (via disk_initialize(0)). This always fails. Is there a way to to initialize FATFS after an initialization has already failed?
Thanks,
Daniel