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.
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
