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.

TMS470MF06607 MibSPI transmit problem



Hi:

I have some problem of muti-spi operation.

1.   the spi init configuration as following:

out of reset:three pin operation;   muti-buffer enable;  no delay;  no interrupt;  TG type of trigger event: always and one short = 1  enable group 0; enable MbiSPI1;

2. SPI-Transmit function as following:

void spiTransmitData(unsigned group)
{3414.spi.txt
    unsigned short transmitData[8] = {0x1100,0x1100,0x1100,0x1100,0x1100,0x1100,0x1100,0x1100};
    int i=0;
    for(i=0;i<8;i++)
    {
        Spi_registers1.ENA = 1;   /*one short = 1 so enable spi every time*/
        Spi_registers1.DAT1 = transmitData[i];                                                   -------------problem : can't write data to Spi_registers1.DAT1 
        while((Spi_registers1.BUF >> 29)& 1); /*wait TXFULL is zero*/
    }
    /*TEST TG COMPLETE*/
    while((Spi_registers1.INTFLGRDY >> group) & 1);
   
}

the details of code : please see the attachment :

5518.spi-c.txt

2656.spi-h.txt

  • Write to the SPIDAT0 register in master mode when using the 3-pin mode of operation. Use teh SPIDAT1 register for 4-pin or 5-pin modes.

    Regards, Sunil

  • TMS470MF0660X datasheet note: In Muti-buffer mode SPIDAT0 cannot be used. 

  • ww song said:

    TMS470MF0660X datasheet note: In Muti-buffer mode SPIDAT0 cannot be used. 

    That is correct: excuse me for that. In multi-buffer mode, the user must only configure the MibSPI transmit RAM with the data that he wants to transmit. The MibSPI module kernel then manages the transmission of the data one by one, as per the definition of the "transfer group". The application is not allowed to write directly to the SPIDATx registers.

    The setup of the module for using multi-buffered mode is described in section 14.8.2 on page 611 of the device TRM.

    Regards, Sunil