Author Topic: SD Card Timeout  (Read 7840 times)

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
SD Card Timeout
« on: May 10, 2011, 07:51:05 AM »
Hi Mark,
   We have about 100 units out in the field and working fine, but we have had a couple that has had TIMEOUT messages when accessing the SD card. They have been working fine for a few weeks then suddenly got the TIMEOUT Message. We have designed a multilayer board, and the SD is about 2 inches away from the processor, so no interference is produced.

I have not upgraded to the latest version of utasker yet, I have the one before.

Regards
Neil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: SD Card Timeout
« Reply #1 on: May 10, 2011, 10:43:11 AM »
Hi Neil

Does this happen consistently with the particular boards? Does the problem go when a different SD card is inserted?

The timeout is controlled by CommandTimeout = 5000. This is an empirically chosen value which allows the SD card to be polled a number of times (the polling time depends also on the transfer rate and so is slower with lower transfer speeds) - when set too low there tends to be a timeout during reformatting a card rather than in normal operation.

The timeout occurs when the SD card is not ready for an operation after the timeout period has been waited. Therefore it suggests that the SD cards in question have maybe become slower with use(?). If you increase the delay value you may find that it then stops failing after a certain value - the question is what value is optimal? - it shouldn't be too short to result in a timeout during normal circustances but also not too long that it waits for unnecessarily long times for a card which really has a problem.

Regards

Mark