2017-06-29 02:40 AM
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: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
Solved! Go to Solution.
2017-06-29 11:38 PM
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 cs2017-06-29 02:41 AM
Yvin.Erwan
erwan.leray@st.com
simon.scullion
https://community.st.com/community/automotive-mcus-community/spc5-automotive-mcus
https://community.st.com/community/automotive-mcus-community
2017-06-29 11:38 PM
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 cs2017-06-30 01:41 AM
everything is successful�