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.

TMS320F280025C-Q1: GPIO Implementation of SPI Works, SPI Interface Doesn't Work

Part Number: TMS320F280025C-Q1

Hey!

I'm controlling a display IC by SPI with TMS320. TMS320 is master, IC is slave. There is no data coming from IC to SPI, so I only use SIMO.

I've implemented the SPI with GPIO manually with the following code, and it works without any problem;

void spi_setCs(uint16_t v)
{
    GPIO_writePin(GPIO_cs, v);
}

void spi_setSimo(uint16_t v)
{
    GPIO_writePin(GPIO_simo, v);
}

void spi_setClk(uint16_t v)
{
    GPIO_writePin(GPIO_clk, v);
}

void spi_write(uint8_t data)
{
    uint8_t i;

    spi_setCs(0);

    for (i = 0; i < 8; i++)
    {
        spi_setClk(0);
        spi_setSimo((data & 0x80) >> 7);
        data = data << 1;
        spi_setClk(1);
    }

    spi_setCs(1);
}

When I've switched to the SPI interface and it doesn't work. The code is;

void spi_write(uint8_t data)
{
    SPI_writeDataNonBlocking(SPIB_BASE, data);
    
    // I've also tried the followings
    // SPI_writeDataBlockingNonFIFO(SPIB_BASE, data);
    // SPI_writeDataBlockingFIFO(SPIB_BASE, data);
}

I've tried lots of different config from syscfg, but it doesn't work. I'm sharing one of the config;

So what can be wrong ? How can I apply exactly the same thing that I've done with GPIO manually by the SPI device ? I would like to know your experiences.

Thanks in advance!