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.

SPI transmit problem in F28069

1.

I am using TMDSCNCD28069MISO controlCARD.

I have to transmit packets total 88 bits to my slave device once.

But F28069 only transmit maximum 64 bits when SPISTE is low. Right???

How can I let F28069 transmit 88 bits when SPISTE is low.

2.

If I transmit 24 bits when SPISTE is low.

But my slave receive 32 bits (0x0243 and 0x0010).

How can I modify my code. Let my slave can receive 24 bits.

Below is my problem2 master SPI code:

SpiaRegs.SPITXBUF = 0x0243;
SpiaRegs.SPITXBUF = 0x10;

while(SpiaRegs.SPIFFRX.bit.RXFFST != 2)
{
check = 1;
}

rdata = SpiaRegs.SPIRXBUF;
rdata2 = SpiaRegs.SPIRXBUF;

Please help. Thanks a lot.

  • Huang,

    1. Yes - its a 4 level fifo hence 4x16=64bits. But the character length is configurable. Ex: you can do the transmit of 88 bits in 2 steps: (4x11)x2 by configuring char length to 11 bits. You can do it in several different ways.

    2. Are you using multiple slaves? is SPISTE connected to the slave?

    -Bharathi
  • Hi Bharathi,

    I use 4 level fifo and set character length 11 bits.
    When I transmit of 44 bits(4*11), then receive data by SPIRXBUF.
    But receive data cause SPISTE become high.
    After receive data by SPIRXBUF, then transmit of next 44 bits(4*11) and receive data.

                   start     first 44 bits      end       start       next 44 bits      end
    SPISTE   low           low             high       low                low          high



    How can I let SPISTE always low in all process?(i.e. After finish to sent 88 bits, SPISTE become high)

    Thanks

  • Hi Huang,

    Each transaction is independent, configuration to make SPISTE high after 2 transactions is not possible.
    But - is that causing any issue in your system? What is the issue of SPISTE going high in the middle?
    One option is to bypass SPISTE, though I would not recommend, and tie it low.

    By the above config, you are able to receive 88bits - then what exactly is the problem?

    -Bharathi.
  • Hi Bharathi,

    I solve my problem.

    Thanks your reply.
  • That's great! good luck.