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 serial interface Interrupts SSIIntRegister( ) ????



When using interrupts for such things as timers, I used to simply declare the function and enter the function name into the vector table all in the  tm4c1294.._startup_css.c file. The specific interrupt and global interrupts would need to be enable and all will function properly.

For the SPI or rather SSI interface, we actually have to register the function manually via the SSIIntRegister() function. I have no idea why this additional complication is needed. If anyone could explain why the interrupt process setup for the SSI module in different than that of the timer ... I would be obliged.

Thanks for your help.   Andreas

  • Hello Andreas,

    The SSI Interrupt can as well be specified in the startup_ccs.c file. The SSIIntRegister will in fact map the interrupt vector table to SRAM and then put the function entry pointer in the table in SRAM

    Regards

    Amit

  • Hi Amit,

    thanks for your fast reply. I did a little more reading on this and now realize that there are two valid ways to configure the interrupt functions: Statically (compile time) in the startup_css.c file and dynamically (run time) using the various IntRegister() functions provided by TivaWare for each peripheral. TivaWare also allows me to Unregister the interrupt service routine and I suppose reregister a different service routine to respond to the same interrupt in a new way.

    However, I don't understand why this requires copying the vector table to SRAM. Why not just leave it in FLASH and update the ISR addresses at runtime to vector table in FLASH ???? What is so special about using SRAM for this purpose?

    Thanks again for your help .... Andreas

  • Hello Andreas,

    The flash address vector table is programmed at run time. You cannot erase just one location in flash and re-write it. If you do erase the location, it will erase the entire vector and on the next power up, the application may just stop working. So the best way around it is to maintain the same in SRAM if it has to be done again at run time

    Regards

    Amit