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 in compatibility mode

Other Parts Discussed in Thread: TMS570LS20216, HALCOGEN, TMS570LS3137

Hello,

I am getting started with SPI1 of the TMS570LS20216 device. Not all features are required at the moment. I wish to use compatibility mode. My example SPI project is attached.

5722.SPI1.zip

Data is sent in polling mode. SPI1ENA is configured as GIO input with pull-up and is not used for SPI1 communication. SPICS [0] is configured as GIO output. SPICS [0] output is used to select external slave chip.

In general, the project is working correctly. But I have several questions:

1) Where is it possible to select compatibility mode in HalCoGen? HalCoGen configures multi-buffer mode. Then I clear MSPIENA bit in the MIBSPIE register to select compatibility mode. This is done in the spiInit by commenting line

spiREG1->MIBSPIE = (spiREG1->MIBSPIE & 0xFFFFFFFEU) | 1U;

2) Is CS [0] output drived correctly? RXEMPTY flag is used to check whether transmission is completed. CS [0] should remain low during transmission of all bytes. The picture below shows CLK and CS[0] waveforms. 3 bytes are sent.

Best regards,

Vitalij

  • Hello Vitalij,

    I have forwarded your post to one of our experts on this.  They will be responding soon.

  • Hi Vitalji,

    Sorry for the dealy, Do you still need assistance with this request.

    I would encourage you to look at HALCoGen for TMS570LS3137 Device, where MIBSPI and SPI are split. MibSPI1 can be configured in MIBSPI mode or compatibility mode by choosing them in Driver Enable Tab. spi.c has all SPI drivers and mibspi.c has mibspi drivers.

    Regards
    Prathap