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.

TMS320F28377S: SPI FIFO Interrupts are not triggered

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE

Hello,

i have a problem using the SPI with FIFOs. I configured the SPI (Master, 500kbit, 16bit size), i can send data out of the FIFO and see that i get response from SPI slave drv5383 on my Logic Analyzer.

The RXFIFO seems to fill up and the Interrupt Flag RXFFINT is set. But my Interrupt routine is not triggered. 

As from the Technical Reference Guide the SPIINTENA Enable is 0 for FIFO operation, is this right?

The rxFIFO Interrupt routine is mapped to INT_SPIA_RX.

I'am writing the Data to the txFIFO not in the interrupt routine, can this cause a problem?

Thank you!

Florian

  • Hi Florian,

    Your SPI configuration looks ok. I believe the issue may be with the PIE configuration. Can you share more details on that part of the code setup? For reference, there is an SPI FIFO w/ interrupts example in C2000ware (check the example in <c2000ware_install>\device_support\f2837xd\examples\cpu1\spi_loopback_interrupts\cpu01)

  • Hi,

    i used as example for my application this "C:\ti\c2000\C2000Ware_3_04_00_00\driverlib\f2837xs\examples\cpu1\spi\spi_ex3_external_loopback_fifo_interrupts.c" 

    Now i added in the initialisation:

    IER |= M_INT6;

    This enables the PIE Interrupt.

    Now the ISR routines are called. But in the example there is no line which activates the PIE interrupt. 

    Is there another function form the driverlib which activates the PIE interrupt?

    Thank you!

    Florian

  • Hi Florian,

    Is there another function form the driverlib which activates the PIE interrupt?

    Actually, in that example you referenced there are several lines used to enable the interrupts.

        //
        // Initialize PIE and clear PIE registers. Disables CPU interrupts.
        //
        Interrupt_initModule();
    
        //
        // Initialize the PIE vector table with pointers to the shell Interrupt
        // Service Routines (ISR).
        //
        Interrupt_initVectorTable();
    
        //
        // Interrupts that are used in this example are re-mapped to ISR functions
        // found within this file.
        //
        Interrupt_register(INT_SPIB_TX, &spibTxFIFOISR);
        Interrupt_register(INT_SPIA_RX, &spiaRxFIFOISR);
        
    ....
    
        //
        // Enable interrupts required for this example
        //
        Interrupt_enable(INT_SPIA_RX);
        Interrupt_enable(INT_SPIB_TX);
        
    ....
    
        //
        // Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
        //
        EINT;
        ERTM;

    Now the ISR routines are called. But in the example there is no line which activates the PIE interrupt. 

    Is your code entering the ISR?

  • Hi,

    yes the the code is now entering the ISR. I had a look into the functions "Interrupt_enable(INT_SPIA_RX);" should enable the IER bit, but i don't know why this is not happen and i have to do it manually. 

    Thank you!