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.

TMS320F28388D: Make SPI chip select SW-Controlled wth driver lib

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hello everyone,

I would like to use the SPI-Interface in high-speed mode.
I want to talk to two different Devices. So I need two ChipSelects.

I can control those via GPIOs before the SPI-Data-Transfer.
I read in that thread:

that it's possible to set the SPI into 3Wire-Mode and to deactivate the standard CS.
I can't find a way to do that with the driverlib. I am only able to aktivate the 3-Wire-Mode.
But as I understand correctly 3Wire-Mode in C2000 controllers omits the MISO and not the CS.

How do I setup the SPI correctly to make the CS fully Software-Controlled while only using CLK/MISO/MOSI.

Thanks and regards,

Marcel Kummer.

  • Hi Marcel Kummer,

    If you do not configure the pin as SPI STE pins, it will act as normal GPIO pin

    GPIO_setPinConfig(GPIO_11_SPIA_STE); -> SPI will drive the pin

    Instead of this, you can have

    GPIO_setPinConfig(GPIO_11_GPIO11); -> pin is software controlled using GPIO registers

    C2000ware has a SPI EEPROM example where STE pin is controlled using GPIO registers. <C2000Ware>\driverlib\f2838x\examples\c28x\spi\spi_ex6_eeprom

    Regards,

    Veena

  • Hello Veena,

    we are doing the pinmuxing with the output generated by your PinMux tool.
    In the tool I unselected the STE Pin from the SPI communication.

    So I don't need to make the GPIO_pinConfig anymore, because the Tool-Code is doing that for me?

    Regards,

    Marcel.

  • Hi Marcel,

    Right. This is the driverlib code used for pinmuxing. It is same as disabling the STE pin in Pinmux tool.

    Regards,

    Veena