pb with spi

Started by Pascal May 4, 2005
Hello,

I use 9s12A64. I want to use the SPI. I configure it like this SPI0BR=5;
SPI0CR2 = BIDIROE|SPISWAI;
SPI0CR1 = SPE|MSTR|CPOL|CPHA;

I write data like that :
BYTE WriteSPI0Byte(BYTE abyte)
{
//Caractere dans le BufCardMem SPI
SPI0DR = abyte;
//Attend le transfert des donns
while((SPI0SR & SPIF) == 0) ;
//retourne la valeur renvoy par l'esclave
return(SPI0DR);
}

My problem is that i have nothing on MOSI and SCK!!!

If i download my software on a 9s12DP256 it works good!!!!!

I don't understand the problem on A64

Thank you

Regards


Hi again;

I precise that the A64 is a 80PIN and i must use PM. On the DP256 it is the 120 PIN ant i use PS.

But i don't understand why on A64 i have nothing on the SPI bus!!!

Regards
----- Original Message -----
From: Pascal
To: 68HC12@68HC...
Sent: Wednesday, May 04, 2005 5:47 PM
Subject: [68HC12] pb with spi Hello,

I use 9s12A64. I want to use the SPI. I configure it like this SPI0BR=5;
SPI0CR2 = BIDIROE|SPISWAI;
SPI0CR1 = SPE|MSTR|CPOL|CPHA;

I write data like that :
BYTE WriteSPI0Byte(BYTE abyte)
{
//Caractere dans le BufCardMem SPI
SPI0DR = abyte;
//Attend le transfert des donns
while((SPI0SR & SPIF) == 0) ;
//retourne la valeur renvoy par l'esclave
return(SPI0DR);
}

My problem is that i have nothing on MOSI and SCK!!!

If i download my software on a 9s12DP256 it works good!!!!!

I don't understand the problem on A64

Thank you

Regards
------
Yahoo! Groups Links

a.. To