[gta02-core] ECN0001 comments+patch on SPI

Rask Ingemann Lambertsen ccc94453 at vip.cybercity.dk
Fri Sep 4 11:51:06 CEST 2009

On Thu, Sep 03, 2009 at 07:59:16PM -0300, Werner Almesberger wrote:
> 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.

   Hardware SPI likely wasn't designed with the dual protocol accelerometers
in mind. IIRC there's a comment in arch/arm/mach-s3c2442/mach-gta02.c about
the workaround needed to keep the I2C-mode accelerometer from responding.

> - 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.

   I suppose reception could be realigned by prepending a dummy bit to the
bit stream or by removing the first 7 bits. A D-flipflop or two could do
the former I think.

   Do we know if the receive misalignment is triggered by the 12 MHz
frequency or by the clock divider to get 12 MHz from 50 MHz PCLK? Since
we'll be using 66 MHz PCLK in gta02-core, it would be nice to know.

Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year

More information about the gta02-core mailing list