Some ISR tips from IAR

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://www.iar.com/index.php?sho...

Whilst all tips may not be applicable to all compilers, it outlines the costs of calling routines from ISRs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.