Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 9 months ago. This question has been closed. Reason: Duplicate question
maximum SD timeout
My system crashes. Ie it halts for over 3 mins and then WDT forces reboot. After tons of pain I realised that it halts whithin this code:
FILE *fp = fopen(filename.c_str(), "a"); if(!(fp == NULL)) { fprintf(fp, msg.c_str()); } fclose(fp);
Not every time this code is executed, it may run for a few hours writing to SD every second but when it halts - it does it here. The msg length is never over 100 bytes. I was looking thru the SDFileSystem code and I found this:
- define SD_COMMAND_TIMEOUT 5000
The question is: can any SD action atemtp x 5000 times take over 3 min?
solution found: http://developer.mbed.org/forum/bugs-suggestions/topic/3447/
posted by Andrey Yakub 21 Feb 2015