Author Topic: TIMEOUT!!! error in sdcard due to memory  (Read 6158 times)

Offline Manish

  • Newbie
  • *
  • Posts: 23
    • View Profile
TIMEOUT!!! error in sdcard due to memory
« on: November 12, 2010, 10:04:29 AM »
Thanks Mark for giving a reply,
        Actually we are working on Two project , out of two one have lower version (1U RTU )and anther have Higher version (3U RTU ), out of then Sdcard works properly in lower version which is consume less memory compare to 3U RTU.   and in 3U RTU doesn't work means it initialize proper but at opening file or creating directory it create TIMEOUT !!! error continually so I am sending .map of my 3 U RTU's and also sending file for app_hw_lpc23xx.h  ,CONFIG.H ,DEBUG.C ,LPC23XX.C , LPC23XX.H ,Lpc23xx_keil.s , TaskConfig.h so can please so map file and tell me how much memory should be need for Sdcard?. you can also find no of task from Taskconfig.h file. And if you need any help them write me on this mail ID.
Thank you
Manish Dabhi
Sr. Embedded Software Engg.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: TIMEOUT!!! error in sdcard due to memory
« Reply #1 on: November 12, 2010, 02:06:10 PM »
Hi Manish

I don't understand what 1U RTU and 3U RTU mean; is this to do with the LPC chip or the SD card?

In any case I don't think that the size of memory changes in any way.

The message TIMEOUT!!! occurs when the SD card doesn't answer to an command after a certain amount of repeated attempts. There is a setting which defines the amount of repetitions - CommandTimeout - 5000 in my version of mass_storage.c.
Since the communication is generally via SPI and each command has a certain transmission time this value of CommandTimeout  multiplied by the individual transmission time accurately controls the timeout. The value can also be modified (eg if a certain command is found to require longer) but was simply set so that no timeouts occur in normal use. If the value is too low it tends to be noticed when writing (not when reading) and in particular when formatting/re-formatting the card.

Does this help in any way? Maybe you need to increase the value in one case (although I don't understand the difference at the moment).