Wiki
Clone wikiCafeOBJ / OSEK / contents / index-e / backup / 14_Interrupt_Processing
Interrupt processing
The functions for processing an interrupt (Interrupt Service Routine: ISR) are subdivided into two ISR categories:
- ISR category 1
- ISR category 2
#!python module ISR1 { imports { ex(ISR) } signature { [ ISR1 < ISR ] } }
#!python module ISR2 { imports { ex(ISR) } signature { [ ISR2 < ISR ] } }
The OSEK operating system provides an ISR-frame to prepare a run-time environment for a dedicated user routine. During system generation the user routine is assigned to the interrupt.
Inside the ISR
no rescheduling will take place. Rescheduling takes place on termination of the ISR category 2 if a preemptable task has been interrupted and if no other interrupt is active.
The implementation ensures that tasks are executed according to the OSEK scheduling points. To achieve this the implementation may prescribe restrictions concerning interrupt priority levels for ISRs of all categories and/or perform checks at configuration time.
The maximum number of interrupt priorities depends on the controller used as well as on the implementation. The scheduling of interrupts is hardware dependent and not specified in OSEK.
Updated