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:

  1. define SD_COMMAND_TIMEOUT 5000

The question is: can any SD action atemtp x 5000 times take over 3 min?

Question relating to: