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.

TMS570LS0714: MibSPI in multibuffered mode

Part Number: TMS570LS0714
Other Parts Discussed in Thread: HALCOGEN

Hello All,

My customer uses MibSPI  both for connections with another TMS570LS0714 and connections with 3p MCU at 20MHz.

TMS570LS0714- TMS570LS0714 connection: Oscillogram shows a pause between 16-bit packages. Everything is OK.

When the customer tries to connect TMS570LS0714 with 3p MCU then there is on pause between 16-bit packages, the customer does not see any solution how to setup the pause.  And in case of connection faster than 3MHz  the connection crashes completely. If connection speed is lower than 3MHz then in RX register of MibSPI all words are marked by overflow bit RXOVR, but data is correct. 

  • Hi Dimitrius,

     You can lengthen the delay (the amount of idle time) between transmission by using the WDELAY. Please check the WDELAY field in the SPIFMTx register. This field configures the amount of delay. Once the WDELAY is configured then you can individually enable the delay by setting the WDEL bit field in the Multi-buffer RAM Transmit Data Register.

     In HalCoGen you can configure the WDELAY as shown in the below screenshot. I use 5 as an example to configure the WDELAY. This will give a total of 5 * VCLK + 2 * VCLK of delays.

    In the below screenshot I enable the WDELAY.

    Try to play with the WDELAY to see if it makes a difference.

     If you are getting an RXOVR then it means that the received is not read in time before the RXBUF is overwritten with new data again. 

  • Thanks, Charles.

    Maybe you have clear guidelining how to setup connection below:

    - package 128 bytes, duplex. TMS570's SPI to send 64 frames*16 bits

    - connection speed: 20 to 25MHz

     - Master: Freescale T1040.  Slave: TMS570LS

    Best regards,

    Dmitry

  • Dimitry,
    Have you tried with the WDELAY? What is the result after you apply the WDLAY? Do you still have the RXOVR error?
  • Hi, Charles!
    Setting WDELAY works only when Hercules is configured as a master. Exchange controls SPI master, and it is not configured WDELAY. This setting is not provided from the master (T1040).
    The question is whether the TMS570 take no errors continuous sequence of 32 bits at a speed of 20-25 MHz?
  • Hi Jan,
    First of all the Hercules SPI can only support up to 16-bit of data word length per frame. You just mentioned operating at 32 bits at a speed of 20-25MHz. Can you elaborate your setup? At the end of of an 16-bit transfer, the data is moved to the MibSPI RXRAM. If your external SPI master continues to shift in the second half of the 16-bit then it will overwrite the one that is just stored in the RXRAM.
  • Hi Charles!
    And so it happens. Data damaged and bit set RXOVR. The question was this: it is normal or has settings that can correct the situation. Thank you.
  • Hi Jan,
    Sorry, I missed your reply.

    I don't know the SPI capability in T1040. Can you configure T1040 to operate in 16-bit data length? In your earlier post, you mention the payload as follows.

    "package 128 bytes, duplex. TMS570's SPI to send 64 frames*16 bits"

    If this is the case, you want to configure the MibSPI transfer group with 64 buffers so upon receiving 64 frames of 16 bits data it will generate an interrupt to the CPU to process these data. You want to configure your external master (i.e. the T1040) to transmit 64 frames of 16 bits data. If your external SPI can only transmit 32-bit per frame then you need to configure it to transfer 32 frames of 32 bits data instead. If your external SPI will transfer more than 128 bytes of data then the