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.

TMS320F28069: Sending more than 4 words with SPI Communication

Part Number: TMS320F28069

void spi_fifo_init()
{
// Initialize SPI FIFO registers
   SpiaRegs.SPICCR.bit.SPISWRESET=0; // Reset SPI

   SpiaRegs.SPICCR.all=0x001F;       //16-bit character, Loopback mode
   SpiaRegs.SPICTL.all=0x0017;       //Interrupt enabled, Master/Slave XMIT enabled
   SpiaRegs.SPISTS.all=0x0000;
   SpiaRegs.SPIBRR=0x0063;           // Baud rate
//   SpiaRegs.SPIFFTX.all=0xC022;      // Enable FIFO's, set TX FIFO level to 4
   SpiaRegs.SPIFFTX.all=0xC021;      // Enable FIFO's, set TX FIFO level to 1
//   SpiaRegs.SPIFFRX.all=0x0022;      // Set RX FIFO level to 4
   SpiaRegs.SPIFFRX.all=0x4021;      // Set RX FIFO level to 1
   SpiaRegs.SPIFFCT.all=0x00;
   SpiaRegs.SPIPRI.all=0x0010;

   SpiaRegs.SPICCR.bit.SPISWRESET=1;  // Enable SPI

   SpiaRegs.SPIFFTX.bit.TXFIFO=1;
   SpiaRegs.SPIFFRX.bit.RXFIFORESET=1;
}

Void NVM_TX_HWI()
{
    Uint16 i;

    SpiaRegs.SPITXBUF = 0x06;               // Set write enable latch (WREN)
    SpiaRegs.SPITXBUF = 0x02;               // Write memory data (WRITE)
    SpiaRegs.SPITXBUF = 0x00;               // Memory address of write location (MSB)
    SpiaRegs.SPITXBUF = 0x00;               // Memory address of write location
//    SpiaRegs.SPITXBUF = 0x00;               // Memory address of write location (LSB)
    SpiaRegs.SPITXBUF = rdata_point++;                // Data to Write

    DELAY_US(1000000L);

    SpiaRegs.SPIFFTX.bit.TXFFINTCLR=1;  // Clear Interrupt flag
    PieCtrlRegs.PIEACK.all|=0x20;       // Issue PIE ACK
}

Void NVM_RX_HWI()
{
    Uint16 i;

    rdata[rcount++]=SpiaRegs.SPIRXBUF;     // Read data
    if(rcount>=4) rcount=0;

    SpiaRegs.SPIFFRX.bit.RXFFOVFCLR=1;  // Clear Overflow flag
    SpiaRegs.SPIFFRX.bit.RXFFINTCLR=1;  // Clear Interrupt flag
    PieCtrlRegs.PIEACK.all|=0x20;       // Issue PIE ack
}

I am trying to test the SPI code that I leveraged from the SPI loopback example. I am trying to send and receive more than 4 words but I can not figure out how to do so. I have attached my configuration ( spi_fifo_init() ) and the transmit and receive interrupts that handle the sending and receiving of the messages with BIOS Hardware Interrupts. What can I do to send and receive more than 4 words?