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.

TMDX570LC43HDK: SPI Master to SPI Slave for TMS570LC4357 MCU

Part Number: TMDX570LC43HDK
Other Parts Discussed in Thread: TMS570LC4357, TMS570LS1227, HALCOGEN

HI Team,

I need a support for SPI configuration for Master and Slave with the same MCU TMS570LC4357 and TMS570LS1227 .

If you have any SPI code please share it.

MBI SPI also if possible ?

Thanks

  • Hi Santhosh,

    The HALCOGen contains a SPI-master-Slave example:

  • Hi Wang,

    Can you help me to SPI Configuration in HalCoGen of TMS570LC43xx HDK.

    Thank you.

  • Hi Wang,

     VIm Channel 0-31

    Enable SPI2 Level 0 and Level 1 channels.

    MIBSPI2 - High and MIBSPI2 - Low 

    This both need to enable for interrupt 

    /* Initiate SPI2 Transmit and Receive through Interrupt Mode */
    spiSendAndGetData(spiREG2, &dataconfig1_t, 16, TX_Data_Slave, RX_Data_Slave);

    What is the configuration in PINMUX for SPI configuration?

    * - SPI2 Global SubTAB
    * - Uncheck Master Mode
    * - Uncheck Internal Clock

    * - SPI2 Port SubTAB
    * - Uncheck DIR for CS 0

    please confirm the SPI configuration ?

  • The SPI module can be used as SPI standard mode (SPI) or multi-buffered mode (MibSPI). In HALCoGen "Enable Driver" panel, select two SPI for master and slave test:

    In Pinmux panel: select MibSPI1 and MibSPI2 (share the same pins as SPI1 and SPI2). Only four or five pins are used for your test: SOMI, SIMO, CLK, CS, or ENA. 

    In VIM panel: enable the interrupt channel for MibSPI1 and MibSPI2 (same channel used for SPI1 and SPI2)

    In SPI1 and SPI2 configuration panel: please select one as master, and one as slave 

    Please use the example code listed in HALCOGen example folder.

  • Hi Wang,

    In Pinmux panel:

    selected MibSPI3 (share the same pins as SPI3).

    Only four or five pins are used for your test: SOMI, SIMO, CLK, CS, or ENA. 

    CS_0 or CS_1 , CS_2 and CS_3 

    because in my case CS_0 and ENA are in J5 [TMS570LC43xx_LaunchPad] but not connect. 

    So Can we use  CS_1 or CS_2 or CS_3 ?

    Please confirm.

  • The SPI/MibSPI modules support multiple SPICS pins. You can use CS0 or CS1, or CS2...

    The SPICS pins are used when communicating with multiple slave devices. If only one slave device is attached to the master, three pin mode (SPICLK, SPISOMI, SPISIMO) can also be used. Please read the section of "Physical Interface" in SPI/MibPI chapter of TRM.

  • Hi Wang,

    Then it is not necessary to use CS chip select for only one SPI slave mode is connected to the master is it correct ?

    Thanks and Regards,

    Santhosh.