SD/MMC vs. GPS: drive strength ?

Werner Almesberger werner at
Sun Jul 20 04:06:03 CEST 2008

Brief summary for the list: so far, we have two major approaches for
trying to improve the GPS time to first fix (TTFF): 1) by adding a
10pF capacitor to SD_CLK, and 2) by disabling SD_CLK when the SD/MMC
interface is idle.

Tests in Taipei have shown that 1) dramatically improves the TTFF,
but we're still not sure why exactly. The main theory is that the
rising or falling edges of SD_CLK have a high-frequency component that
interferes with the GPS signal, and adding a small capacitor slows the
edges sufficiently to either remove this component or to just move it
to a different frequency.

Approach 2) yielded more mixed results. So far, we did a small number
of tests in Openmoko, both in Taipei and elsewhere, and they have not
shown an improvement when simply turning off the clock. However, some
users have reported results that look as good as the capacitor rework.
So there's no conclusive result there.

So far the present status.

When thinking about the edge theory, I remembered that the Glamo lets
us tweak with the drive strength for some signals. And sure enough,
the MMC interface is among them.

Andy, I think we never tried tweaking that parameter, did we ?

Changing the drive strength changes how much current flows in and out
the I/O pins, and thus changes how quickly the capacitance of the
signal line gets charged or discharged. Even without adding a
capacitor, as in approach 1), there is some capacitance from the chip,
the traces, etc.

By default, we set the drive strength to the maximum. I've written a
little program to change that. It's in

If invoked without arguments, it prints the current setting of the
"MMC Basic" register and decodes the drive strength:

root at om-gta02:~# ./mmcds    
MMC_BASIC = 0x08ce
  MCGIODrv = 3 (max)

If given an argument (min, low, high, max, or a number from 0 to 3),
it changes the drive strength:

root at om-gta02:~# ./mmcds min
root at om-gta02:~# ./mmcds 
MMC_BASIC = 0x080e
  MCGIODrv = 0 (min)

This is what SD_CLK looks like when I vary the drive strength:

The important part here is that the rise and fall time of the signal
change. Please don't read too much into the little waves that ride on
top of the curve. They're just ambient RF pollution.

If someone could test this, I would appreciate feedback on whether
reducing the drive strength helps reducing the time to obtain the
first fix, and also how low we can set the drive strength before
communication with the SD card fails. (The SD/MMC interface in my
GTA02v5 is broken, so I can't test this myself.)

If communication breaks down after setting the drive strength too
low, lowering the SD/MMC clock might help:

- Werner

More information about the openmoko-kernel mailing list