Whilst all tips may not be applicable to all compilers, it outlines the costs of calling routines from ISRs.
That's a good point, Kartman. One nice feature of GCC and IAR is their support for inline functions so you can still use a function in the ISR without the overhead of pushing all of the scratch registers for that compiler. Assuming 12 scratch registers, pushing and popping at 2 cycles each, that's a 48 cycle overhead for calling even a one-line (but not inlined) function within the ISR.
© 2022 Microchip Technology Inc.