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.

TMS320F28386D: Difference behavior between SSI normal mode and high-speed mode

Other Parts Discussed in Thread: C2000WARE

Hi,

I set the CM CLK as 120MHz and baudrate as 20MHz for the SSI Communication.

I notice that when I used the High Speed Mode, the SSI Module would occasionally fail to decode. For example, it should be received five data but the SSI Module ( read from SSI_readData() ) only decode four. However, when I used the normal mode, it would be stable to decode and receive data.

Why does the SSI Module fail to decode when using high-speed mode?

  • Hi,

    Can you let us know what is the SPI speed you had set when you had used normal speed?

    Regards,

    Praveen

  • Hi,

    I set the CM CLK as 120MHz and baudrate as 20MHz for the SSI Communication.

    Same as using the High Speed Mode setting.

  • Hi,

    Are you using the SSI in master mode or slave mode? and with FIFO mode or non-FIFO mode?

    If you have used any reference c2000ware example, please point to it. It will be easier for us to understand the configuration used

    Regards,

    Praveen

  • Referenc example: C:\ti\c2000\C2000Ware_3_02_00_00\driverlib\f2838x\examples\cm\ssi\ssi_ex1_loopback.c

    The following setting:

    1. SSI_setConfig( SSI0_BASE, CM_CLK_FREQ, SSI_FRF_MOTO_MODE_3, SSI_MODE_MASTER, 20000000, 8 );
    2. Disable lookback mode (SSICR1.LBM = 0 )
    3. enable or disable speed mode (SSICR1.HSCLKEN = 1 or 0)
    P.S. not use DMA(Both TXDMAE and RXDMAE in register SSIDMACTL are zero)
    No more other config setting

  • Hi,

    Which of the GPIOs have you used for the SSI communication?

    Regards,

    Praveen

  • Hi,

    The FIFO depth in SSI is 8. The Receive FIFO interrupt in SSI gets triggered when FIFO is half or more full (Reference- f2838x TRM, page 5287, section 47.2.4). In the c2000ware example, we read the data from the FIFO into the receiver array (rxdata[]) within the ISR. When ISR is fired once, we read 4 data frames. If you have to read more than 4 in the ISR (like in your case), you need to read the next 4 data frames in the next ISR, NOT within this ISR.

    In the next ISR, make sure you read the data into the next 4 indices of the receiver array(rxdata[]), not the same starting 4 indices to avoid overwriting. Have a global variable for the receiver array index, instead of using the for-loop counter (i), as in the c2000 ware example.

    Hope this explains the reason for your problem.

  • Hi,

    This doesn't look like the same issue.

    Although we refer to the example ssi_ex1_loopback.c, we do not enable the ssi Rx interrupt (SSI_INT_RXFF).
    We send n bytes of TxData and use a while loop to call SSI_readDataNonBlocking() to receive n bytes of RxData.
    P.S. n<=8, and confirm that the SSIRxFIFO is empty before sending.

    However, we don't get a single byte (random) and only get n-1 bytes in total (while loop not get  SSI_readDataNonBlocking any more ).
    The above only happens when SSICR1.HSCLKEN = 1. Does not happen if SSICR1.HSCLKEN = 0.

  • Hi,

    Please do make sure that you receive the data in your receiver setup only after it has been transmitted fully from your transmitter setup. Data read at the receiver side might have started before the whole of it got transmitted from your transmitter side.

    To avoid this, reading 4 bytes at a time (FIFO half full generates a Receive FIFO interrupt) within the RX ISR is recommended, because it ensures that we are reading the 4 bytes only after they were transmitted.