The decision of which ISR category to use depends on the content of the functions it runs. According to the OSEK/OS specification, it is not allowed to call any OS API function from ISR category 1. For ISR categories 2 and 3, it is allowed to call some of the OS API functions only within the code section marked by EnterISR()/LeaveISR() calls.
The form of the generated code frame for an ISR depends on the.Structuring Language: Activity chart Implementation category and content. Some examples are shown below.
The code for an ISR category 1 or 2, named ISR0, containing Activities I01 and I02 without controller will be as follows:The code for an ISR category 3 function named ISR0, containing Activities I01 and I02 without controller will be as follows:The code for an ISR category 3 function named ISR1, containing Activities I11 and I12 and a controller named CTRL1 will be as follows:cgGlobalFlags &= ~BITSUPERSTEP_ISR1; MicroC 41