[gta02-core] ECN0001 comments+patch on SPI

Werner Almesberger werner at openmoko.org
Fri Sep 4 00:59:16 CEST 2009


Rask Ingemann Lambertsen wrote:
> We've always just bitbanged them, so we can't fully screw it up. Of course
> we should try to get the hardware SPI going for efficiency reasons.

I think the background story is that Andy experienced problems with
hardware SPI, so he switched to bit-banging. The snags he hit may be
one of the niceties I later discovered when working on WLAN SPI:

- the receive FIFO is off by one byte. It seems that just the chip
  revision we're using is blessed with this feature. Someone with
  exactly the same chip confirmed the problem on linux-arm while
  someone with a slightly different 2442 reported no problems.

- if you go above 12 MHz, reception is off by one bit, even though
  the signals look perfectly clean. I never figured out how to work
  around that one. The usual suspects, like changing the SPI mode,
  didn't yield any improvements.

Here's my evil patch that makes SPI work quite reliably up to 12 MHz:

http://svn.openmoko.org/developers/werner/wlan-spi/patches/s3c-spi-fix-int-mode.patch

- Werner



More information about the gta02-core mailing list