Hi all
I have some difficult with the SPI...
I havealready made some on colfire or HCS08 without problem...
// Configuration // Bus clock = 48MHZ. // We want SPI: 4MHz, Master mode, without drive of SS. SPI1CR1 = 0b01010000 ; SPI1CR2 = 0b00001000 ; SPI1BR = 0b01010000 ;
//Function Send
U8 mcubind_Spi_8_bits_Send(U8 data)
{
debug_spi_data = data ;
while(SPI1SR_SPTEF==0)
{
}
spi_msg_count ++ ;
SPI1DRL = data ;
while(SPI1SR_SPIF==0)
{
}
return SPI1DRL ;
}
For the test, I made an infinit while() where i send 0x55.
(normaly, I'll have 4MHz div by 2).
But i have nothing. 
I can see my counteur change, but i have nothing on MOSI1 or SCK1...
In addition, SPI1DRL always egal 0xff...
Do you have any ideas?
已解决! 转到解答。