Ticket #10512 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

XO-1, XO-1.5 and XO-1.75 A1 external SD card slot does not discharge supply

Reported by: Quozl Owned by: Quozl
Priority: normal Milestone: Future Release
Component: ofw - open firmware Version: 1.5/1.0 Software Build os852 aka 10.1.2
Keywords: Cc:
Action Needed: no action Verified: no
Deployments affected: Blocked By:
Blocking:

Description (last modified by Quozl) (diff)

Reproducer:

  • place an OLPC OS on an SD card, 32G class 10 SanDisk, or 8G class 4 SanDisk, or others not yet identified,
  • insert the card into the external slot,
  • attempt to boot, the result is that the external card is ignored, the internal card is used, or an error appears,
  • or issue OpenFirmware command "dir ext:\security", the result is that an error appears:
SDHCI: Error: ISR = 8000 EST = 10 Data Timeout,
Stopping
Can't open directory

Single access to directory ext:\ works fine, it is only access to a subdirectory or a multiple access as done by boot that triggers the symptom.

Analysis: the external SD card is not being properly reset, because the supply voltage has not achieved the minimum 0.5V for 1ms required by the Physical Layer Simplified Specification Version 3.01, because there is no discharge clamp for the card supply voltage.

The external SD card voltage is controlled by the main CPU. The internal SD card voltage is controlled by the embedded controller (EC). Therefore the symptom does not affect the internal SD card. It only occurs if there is an SD card in the external slot.

The symptom does not occur for all SD cards, only recently manufactured cards have shown the symptom. This suggests that the recent cards draw less power.

The required power off time for an 8G SD class 4 card has been measured to vary between 37ms and 68ms, depending on the temperature of the laptop (colder requires longer), and which laptop (of a batch of 5) is tested.


Level 1 fix: allow for more time for the card voltage to collapse before re-powering the card. The time allowed in q3a61 and lower was 20ms. Install OpenFirmware -r2065 or later (q3a61c for XO-1.5), which increases this time to 40ms, and if the problem persists increase the power off time still further, for example:

dev /sd d# 60 to power-off-time

Level 2 fix: add discharge clamp to external SD card slot voltage. Completed for XO-1.75 A2 schematics.

Change History

Changed 3 years ago by mikus

I have an assortment of two-year-old class 6 SD cards, which I use as the "permanent" SD card in each of my XOs. On more than one XO-1 system with q2e45, I have seen the "SDHCI: Error: ISR = 8000 EST = 10 Data Timeout" message from OFW when trying to reboot. It occurs when OFW is trying to read /security/develop.sig on the "permanent" SD card. I've ignored that message, since OFW goes on to (correctly) read /security/develop.sig from jffs2. [And subsequently, when my /etc/rc.d/init.d script mounts that SD card, that card has NOT given me any trouble - whether or not there was that OFW timeout error message when first accessing that card.]

Changed 3 years ago by Quozl

  • summary changed from XO-1.5 and XO-1.75 A1 external SD card slot does not discharge supply to XO-1, XO-1.5 and XO-1.75 A1 external SD card slot does not discharge supply

XO-1 schematics reviewed, it may also be affected, though to a different extent. There is only 4.8uF of capacitance on VCC_SD compared to 15.7uF on XO-1.5. The clock and data interfaces are entirely different.

Tested three cards on XO-1 (q3a61c) and XO-1.5 (q2e45q -r2065), evaluating the time taken to display a directory, given various power off times. Graph of results at http://dev.laptop.org/~quozl/10512/ ... summary:

ncardmodel
95 msADATA 4G microSD class 2XO-1
60 msSanDisk 4G microSD class 2XO-1
60 msSanDisk 8G microSD class 2XO-1
160 msADATA 4G microSD class 2XO-1.5
45 msSanDisk 4G microSD class 2XO-1.5
45 msSanDisk 8G microSD class 2XO-1.5
  • below time n, the card has not turned off or reset, and access is rapid (XO-1), or fails utterly (XO-1.5),
  • at time n, the card may require a repowering (the four second delay, XO-1), or fail utterly (XO-1.5 SanDisk),
  • beyond time n, the card has reset and requires an additional 500ms to start up,
  • n is lower for XO-1 than XO-1.5, presumably due to lower capacitance,
  • n correlates across the two SanDisk samples,
  • n is always below 200ms.

Changed 3 years ago by Quozl

Tested SanDisk 4G microSD class 2 in XO-1.5 with oscilloscope attached to VCC_SD. Measured minimum voltage after certain off times:

power-off-timevoltage
40ms1.2V
60ms0.8V
80ms0.6V
  • this particular card does not require the specified less than 0.5V for 1ms, but seems happy with less than 1.2V for 1ms,
  • there's a reduction of the rate of discharge, at around 1.2V, which is presumably when the card shuts down,
  • the 45ms mark in the previous test correlates to the inflection point in the curve.

Testing further, we need about 200ms to meet the specification of less than 0.5V for 1ms with this particular card, but the result will be different over card type and operating temperature.

We have a choice:

  • increase the delay, and wear the startup or testing performance hit that will result, or;
  • turn the card on and do not turn it off until control is passed to an operating system kernel, and wear the risk of unintended consequences.

Changed 3 years ago by Quozl

  • description modified (diff)

(fix ticket description, change "d# 60 power-off-time" to "d# 60 to power-off-time".)

Changed 3 years ago by martin.langhoff

Is a software (OFW) workaround possible on XO-1.5?

Changed 3 years ago by Quozl

Yes.

Changed 3 years ago by Quozl

  • next_action changed from code to review

Tested SanDisk 32G SD class 10 in XO-1.5 with oscilloscope attached to VCC_SD. Measured voltage after certain off times, compared against previous card:

timeSanDisk 4G microSD class 2SanDisk 32G SD class 10
50ms1.9V1.1V
100ms0.9V0.9V
150ms0.6V0.7V
200ms0.55V0.51V
250ms 0.5V

Time required to achieve 0.5V was around 250ms.

Unlike the previous card, this card's discharge curve had several changes of gradient, which can be summarised as:

  • at power off, voltage declined from 3.3V to 2.4V over 20ms, (45V/s),
  • then voltage declined more rapidly from 2.4V to 1.4V over 10ms, (100V/s),
  • then voltage declined less rapidly from 1.4V to 0.5 over 220ms, (4V/s).

The 20ms delay used by q3a61 is right on the first change of gradient, which is perhaps why this card misbehaved for Quanta.

Changed delay for external SD power off to 250ms. -r2076.

Changed 3 years ago by wad

This was fixed on XO-1.75, starting with the A2 motherboard.

The software workaround for the XO-1.5 hardware was included in Q3A62.

There may be models of SD cards which still show this problem, even with the software workaround. Known ones should be listed as part of this ticket.

Changed 3 years ago by Quozl

  • status changed from new to closed
  • next_action changed from review to no action
  • resolution set to fixed

XO-1.75 A2 A3 firmware fix made to remove delay, as the discharge switches are present in those laptops. svn 2251.

Note: See TracTickets for help on using tickets.