#1567 closed defect (fixed)

SD card timeouts are wrong

Reported by: Arnout Vandecappelle Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.10
Severity: normal Keywords:
Cc: sebastian.huber@…, arnout@… Blocked By:


The timeouts in the SD card driver don't conform to the spec in http://www.sdcard.org/developers/tech/sdcard/pls/Simplified_Physical_Layer_Spec.pdf

  • The read timeout is a factor 100 too small (this caused one card to fail for me).
  • The write timeout is not implemented. It should be 2.5 times larger than the read timeout (although this isn't specified clearly for the SPI case). (This one caused my system to hang on a faulty card.)

The attached patch fixes the calculation of n_ac_max and also uses n_ac_max in sd_card_wait().

Attachments (1)

0001-c-src-libchip-i2c-spi-sd-card.c-Fixed-SD-card-timeou.patch (3.4 KB) - added by Arnout Vandecappelle on Jun 16, 2010 at 12:15:03 PM.
Fixed SD card timeouts

Download all attachments as: .zip

Change History (5)

Changed on Jun 16, 2010 at 12:15:03 PM by Arnout Vandecappelle

Fixed SD card timeouts

comment:1 Changed on Jun 21, 2010 at 3:47:21 PM by Arnout Vandecappelle

blocked: 1579

comment:2 Changed on Jun 21, 2010 at 3:55:17 PM by Arnout Vandecappelle

blocked: 1580

comment:3 Changed on Jun 22, 2010 at 7:37:49 AM by Sebastian Huber

Resolution: fixed
Status: newclosed, sebastian.huber@embedded-brains.de

Applied to CVS head.

comment:4 Changed on Oct 10, 2017 at 6:35:44 AM by Sebastian Huber

Component: miscunspecified
Note: See TracTickets for help on using tickets.