AnsweredAssumed Answered

uSD card + board power off + prevent data loss

Question asked by Reddy.Harinadha on Jul 23, 2014
Latest reply on Jul 25, 2014 by Clive One
I'm using STM32F4-Discovery for data/debug logging on uSD card. I have found samples in STM32Cube package:
..\STM32Cube_FW_F4_V1.3.0\Projects\STM324xG_EVAL\Applications\FatFs\FatFs_uSD

I ported this sample to my project which also works on the F4 Discovery board.  I'm writing GPS data & many debug messages to this uSD card whenever they are available in my app.
The problems I'm trying to solve are
1. If the card is removed while the application is running, how can we preserve the data which is already written to the .txt file on the uSD card.
2. If the card is re-inserted again, how to start logging into the same .txt file to which we were writing before.
3. In case of unexpected power off, how can we preserve the data which is already written to .txt file.

I'm using the OpenLog ( avaiable at sparkfun) for data logging, it works fine even if there is unexpected power is off, data will not be lost.
Here is the link to firmware.

Outcomes