cancel
Showing results for 
Search instead for 
Did you mean: 

i have a problem of DSPI

guo qiang
Senior
Posted on June 29, 2017 at 11:40

I use SPC5604B54L5 DSPI module, LTC6804 (Battery voltage acquisition chip) and the microcontroller through the SPI communication, the mode is CPOL = 1, CPHA = 1, but the communication is error.

Before I used STM32 and LTC6804 to communicate, it was successful.

So I connected a logic analyzer:0690X00000607VVQAY.png0690X00000607YJQAY.png

I found that each time the SPC5604 sends a byte, MOSI will pull high .    in other words, when the SPI is in the idle state, MOSI is high by default.What can I do to make MOSI in the default state is low?

I am very very  puzzled why the logic analyzer can analyze the data sent by the SPC5604, but the LTC6804 does not have any data to return. This indicates that the SPC5604 rules for sending data are compliant with the SPI rules. Please note that STM32 and 6804 can communicate normally

i am  using SPI0

PA13-------MOSI

PA15-------CS(soft ware control)

PA12-------MISO

PA14-------SCK

I received all the data are 0

1 ACCEPTED SOLUTION

Accepted Solutions
guo qiang
Senior
Posted on June 30, 2017 at 08:38

SIU.PCR[13].R = 0x0604; //set pa13 to sout

SIU.PCR[12].R = 0x0103; //set pa12 to sin

SIU.PCR[14].R = 0x0604; //set pa14 to sclk

SIU.PCR[15].R = 0x0223; //set pa15 to cs

View solution in original post

3 REPLIES 3
guo qiang
Senior
Posted on June 30, 2017 at 08:38

SIU.PCR[13].R = 0x0604; //set pa13 to sout

SIU.PCR[12].R = 0x0103; //set pa12 to sin

SIU.PCR[14].R = 0x0604; //set pa14 to sclk

SIU.PCR[15].R = 0x0223; //set pa15 to cs
Posted on June 30, 2017 at 08:41

everything is successful�