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?
Solved! Go to Solution.
Oups...
I have my answer ^^
My signal aren't routed on the right pins (SPI1 on PP0/1 OR on PH0/1)...
I'm Working on the Demoboard....
See ya .
Oups...
I have my answer ^^
My signal aren't routed on the right pins (SPI1 on PP0/1 OR on PH0/1)...
I'm Working on the Demoboard....
See ya .