Problem with SPI in DSP 56F807.

Started by Iker Canales Goizueta May 26, 2005
Hi, everyone!.

First of all I've gotta say that this is my first post in this interesting
Motorola DSP Group, so I hope you will understand and forgive me whether
I'm asking a big nonsense.

My problem is the following: I am trying to implement a SPI communication
between a DSP 56F807 and a ColdFire MFC5272, configured as slave and master
respectively (there is no more option for ColdFire) and with CPHA=CPOL=1,
and this implementation is not only becoming a hard task but an impossible
one because sometimes it seems like if data sent by slave DSP suffer from a
kind of bit-shifting or something like that, even using maximum delays for
SCLK signal both since falling edge of /SS signal and between words. Can
anyone lend me a hand, please?.

Thanks in advance.
Best regards.

Iker Canales Goizueta
ROBOTIKER ENERG, TECNALIA
Parque Tecnolico. Edificio 202. E-48170 Zamudio (Bizkaia) (SPAIN).
Tel: +34 94 600 22 66. Fax: +34 94 600 22 99.
iker@iker..., www.robotiker.com

********AVISO LEGAL / DISCLAIMER / LEGEZKO OHARRA********
Este mensaje puede contener informaci confidencial, en propiedad o
legalmente protegida. Si usted no es el destinatario, le rogamos lo
comunique al remitente y proceda a borrarlo, sin reenviarlo ni conservarlo,
ya que su uso no autorizado estprohibido legalmente. / This message may
contain confidential, proprietary or legally privileged information. If you
are not the intended recipient of this message, please notify it to the
sender and delete without resending or backing it, as it is legally
prohibited. / Mezu honek informazio konfidentziala, jabetzakoa edo legez
babestuta eduki dezake. Hartzailea ez bazina, ezagutarazi iezaiozu
bidaltzaileari eta ezabatu ezazu mezua birbidali edo gorde barik, ez
baimendutako erabilera legez babestuta baitago.
****************************************************



Hi Iker

Yes, I saw the same thing. I don't recall what exactly, really, fixed it,
but I thrashed around for ages. I did not use the SDK.

I used the Rx Full IRQ for both Receive and Transmit.

I had no success (understatement) trying to set it up to use CPHA=1
(the simpler mode where you can just ground /SS and ignore MODFEN).

When I went over to using /SS (CPHA=0), I got it to work.

Be sure to use short, clean cables and avoid static/ESD damage to your
chips!

Be very sure that your ISRs are fast enough to avoid overrun - I think I
found a speed where data was corrupted and yet the overrun flag was not set
(I seem to recall calling it "underrun" to myself, but that was years ago).

As I recall, loopback worked fine on a 56803, months before I could send
reliably to a 5272.

Some of the old emails in this list documented the solution better than my
memory has! If you search for "SPI", SPIbus", 56803, 803, and "Rick Corey,
you will find many puzzled comments and a few useful suggestions.

Check out 8/5/2003, 9:09am, and 8/28/2003 10:58am, from me.
Check 8/6/2003 11:37am from "cnnrgrdgnr" [cnnrgrdnr@cnnr...].
Stefan Schfele had things to say on 8/28/2003.
Look at 9/1 and 9/2 2003: ArchIO.Spi1.DataRxReg
10/9/2003 from kj831ca

The most important thing is to check the date codes on your 56807, and the
errata sheets! SPIbus had a ton of silicon errors in early versions, and
many eval boards were shipped with known-bad-SPIbus peripherals, believe it
or not.

I'll try to remember or look up some hints, but I'm too busy right at the
moment - sorry!

I think that Moto sent me a working 56805-to-56805 (?) project. If I'm
right, and I find it, I'll forward it.

Good luck!

Rick Corey

-----Original Message-----
From: motoroladsp@moto... [mailto:motoroladsp@moto...]On
Behalf Of Iker Canales Goizueta
Sent: Thursday, May 26, 2005 9:44 AM
To: motoroladsp@moto...
Subject: [motoroladsp] Problem with SPI in DSP 56F807. Hi, everyone!.

First of all I've gotta say that this is my first post in this interesting
Motorola DSP Group, so I hope you will understand and forgive me whether
I'm asking a big nonsense.

My problem is the following: I am trying to implement a SPI communication
between a DSP 56F807 and a ColdFire MFC5272, configured as slave and master
respectively (there is no more option for ColdFire) and with CPHA=CPOL=1,
and this implementation is not only becoming a hard task but an impossible
one because sometimes it seems like if data sent by slave DSP suffer from a
kind of bit-shifting or something like that, even using maximum delays for
SCLK signal both since falling edge of /SS signal and between words. Can
anyone lend me a hand, please?.

Thanks in advance.
Best regards.

Iker Canales Goizueta
ROBOTIKER ENERG, TECNALIA
Parque Tecnolico. Edificio 202. E-48170 Zamudio (Bizkaia) (SPAIN).
Tel: +34 94 600 22 66. Fax: +34 94 600 22 99.
iker@iker..., www.robotiker.com

********AVISO LEGAL / DISCLAIMER / LEGEZKO OHARRA********
Este mensaje puede contener informaci confidencial, en propiedad o
legalmente protegida. Si usted no es el destinatario, le rogamos lo
comunique al remitente y proceda a borrarlo, sin reenviarlo ni conservarlo,
ya que su uso no autorizado estprohibido legalmente. / This message may
contain confidential, proprietary or legally privileged information. If you
are not the intended recipient of this message, please notify it to the
sender and delete without resending or backing it, as it is legally
prohibited. / Mezu honek informazio konfidentziala, jabetzakoa edo legez
babestuta eduki dezake. Hartzailea ez bazina, ezagutarazi iezaiozu
bidaltzaileari eta ezabatu ezazu mezua birbidali edo gorde barik, ez
baimendutako erabilera legez babestuta baitago.
****************************************************