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.

SPI FIFO help

Other Parts Discussed in Thread: TMS320F28335

I have just a few questions about SPI FIFO operation. I'm working with the F28M35H52C1.


If I want to transmit a certain number of words, then complete the transmission (i.e. have SPISTE go low), then continue with another distinct transmission, how do I do that? Do I wait until the FIFO status bits TXFFST are equal to the FIFO length?

If I want to transmit more words than the size of the FIFO, how do I do that? Can I just wait until some space is available, as indicated by TXFFST, then add more words to the FIFO with SpiaRegs.SPITXBUF = newData?

  • Hello,


    I apologize for bumping this, but I'm hoping to get some help with this question. I've searched through the TRM and forums but have not been able to find the answer to this.

    Mike

  • I still can't figure out how to control the start and stop of a transmission with the FIFOs. In other words, how to use the SPI FIFO to create separate transmissions as defined by SPISTE.


    I tried checking TXFFST, which is what the manual seems to say:

    if (SpiaRegs.SPIFFTX.bit.TXFFST == 0x0)
        {
            SpiaRegs.SPITXBUF = 0xAA;
        }

    However, this produces a single long transmission, that seems arbitrarily apportioned with SPISTE going low. I am not doing anything else, so I am not controlling SPISTE, so I don't understand how the SPI peripheral chooses when to continue within a transmission or when to raise then lower SPISTE and start a new one.

    Any help?

  • Hi

    I'm working with the TMS320F28335 and I had the same Problem.

    For nor I'm doing it like:

    for(i=0 ; i < 255 ; i++){
    
    ValToWrite = *buffer;
    
    FLASH_SPI_WRITE_BUFFER( ValToWrite << 8 );
    
    *buffer++;
    
    while(SpiaRegs.SPIFFRX.bit.RXFFST != 1){ ; }
    
    // CLEAR THE PREVIOUS RECEIVED REGISTERS
    
    SpiaRegs.SPIFFRX.bit.RXFIFORESET = 0;
    
    SpiaRegs.SPIFFRX.bit.RXFIFORESET = 1;
    
    }
    
    //#define FLASH_SPI_WRITE_BUFFER(data) SpiaRegs.SPITXBUF = data //Write byte to SPI bus
    

    Hope this is "state of the art" and if it helps anybody  -  perfect

  • Hi Christian,

    Thanks for posting your solution.

    Michael,

    Does this work for you?
  • Hi Devin,


    I actually found help in a different thread, linked here:

    Thanks for you and christian for your help though!

    Mike