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.

Interrupt Service Routines and Background Tasks

Hello,

Can anybody let me know how to separately set interrupt service routines (ISR) and background tasks under tic2000? Also how to set priority for different ISRs? Does only speed decide priority for ISR?

Thanks,

Hao

  • Generally, each controller type has its own documentation for the specific programmable interrupt expansion controller configuration on that chip.

    For example, consult sprugl8a.pdf TMS320F2803x Piccolo System Control and Interrupts for that chip or the appropriate manual for other chips.

    The PIE lets you assign various peripherals to different priority levels.

    The typical design pattern for smaller systems would be:

    • The main routine, after initialization, executes a main polling loop that checks flags for background work that needs to get done.
    • The ISR code handles the real time requirements and sets the flags for any necessary background processing.
    • If a CLA is used, it's tasks handle CLA interrupts and provide interrupts back to the main processor.

    You will generally choose priorities so as to complete all real time tasks in the time allotted by your design requirements. You need to consider latency which includes the time necessary to recognize the interrupt and switch the context (save registers etc.). The higher priority tasks will interrupt lower priority tasks which can delay the amount of time they have to complete their necessary work.

    The example code illustrates the basics for most devices.