Skip to main content
guo qiang
Senior
June 29, 2017
Solved

i have a problem of DSPI

  • June 29, 2017
  • 2 replies
  • 1130 views
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

    This topic has been closed for replies.
    Best answer by guo qiang
    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

    2 replies

    guo qiang
    guo qiangAuthor
    Senior
    June 29, 2017
    guo qiang
    guo qiangAuthorBest answer
    Senior
    June 30, 2017
    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
    guo qiang
    guo qiangAuthor
    Senior
    June 30, 2017
    Posted on June 30, 2017 at 08:41

    everything is successful�