Hi,
Quick description: i can't connect (mount, open, read, write or get information) from the SD card after waking up from low power deep sleep. before entering the LPDS mode, the SD works fine and i can interact with it.
What i'm doing:
In my project, i'm collecting data and saving them in SD card, and to do that i'm:
1- Initialization:
+ mounting the SD card
+ creating/opening few files
2- Device read data from sensor it will store it by writing in file
3- Device enter low power deep sleep
4- Wake up after few minutes to repeat from step 2 (read data from sensor)
in step 4, i can't write in SD card, i even tried to mount again the SD card but i get error code 13 ("there is no valid fat volume")
all file system function (read, write, get info, etc) won't work and the device will stop there (i even have a watch dog activated but the device won't restart, it just stopped in that function and doesn't response to any interruption (click button)), if delete the LPDS functionality from the device, and replace it by just waiting for couple minutes, the device works fine. i tried to unmout the SD card before i go to LPDS and closed all files, again, i face the same issue, the device will not be able to use the SD card and it will stop (freeze) in f_stat (i'm using that function to get information from SD card about the file i'm writing into).
I think i'm missing something i should do before i go to sleep, but i can't figure it out, some i hope someone can help me with this
Thank you
Habib