This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C5515 SPI CS Synchronization Problem

Other Parts Discussed in Thread: ADS1298

Hi all,

I am trying to communicate with an SPI periheral but there is a problem about CS signal. My WLEN is 24 and FLEN is 9. I expect CS to behave like below:

But when I build my code and run, I observe the below behavior. CS signal lags behind the data conversion (first SPI read operation) which ruins my SPI communication. I try to take CS high and back to low (CSpolarity is active low) before SPI_read but problem is not solved. I also try to ground the CS pin of the peripheral which also do not work, due to pin configuration I do not have the chance to control CS with GPIO (Also I do not believe that this will solve my problem)

Any idea or recommendation?

Regards.

  • Hi,
    Take a look at the SPI registers: SPISTAT1 and SPISTAT2. They should be 0 before transmission or reception of new frames. I had a similar issue between the DSP and the ADS1298. I found in the configuration step of the ADS, a snippet of code which sent a frame beyond that expected.

    The Figure shows comunication between DSP and ADS. Note that CS is kept low during the reception of the whole frame. WLEN =24, FLEN = 9

    subtitle:

    D7= DRDYB, D6 = DOUT, D5= DIN,  D3 = CS, D2 = SCLK

    Best regards,

    Leandro

  • Hi Leandro,

    You are right, my character count starts from 6 and to correct this I added some dummy read cycles to the end of initialization. Although my signals seem to be consistent I cannot take data from all chest channels and leads. I can only collect two channel data which are D1 and D2.

    Below are my signals:

    Thank you for your help,

    Regards.