This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Grouping ISRs by priority for overlaying

Just out of curiosity. Is there a way to tell the linker that ISRs have the same priority and thus cannot interrupt each other and can safely be overlayed?

P.S.: And what is the correct passive form of 'to overlay'?

Parents
  • Too bad, because there exist valid reasons for using local in ISRs. So I still think this actually has some merit. I also think I could gain a little performance here and there by using locals instead of operating entirely on globals and SFRs.

    E.g. the 3 bits I won, are from the four ISRs backing up RMAP (an SFR paging bit on the XC800), before they reset it. I could use a global bit manually, but well ... it's just bad style so I wouldn't do this unless I actually ran out of bits.

    The most compelling example is a result register of the AD-converter. It won't start the next conversion in its queue until it has been read. However I have to store the result somewhere a generic pointer points to. As we all know generic pointers are awfully slow, and it might (and often does) point to XDATA.
    So the first thing I do is copy the result register into a local variable, so the next AD conversion can start.

Reply
  • Too bad, because there exist valid reasons for using local in ISRs. So I still think this actually has some merit. I also think I could gain a little performance here and there by using locals instead of operating entirely on globals and SFRs.

    E.g. the 3 bits I won, are from the four ISRs backing up RMAP (an SFR paging bit on the XC800), before they reset it. I could use a global bit manually, but well ... it's just bad style so I wouldn't do this unless I actually ran out of bits.

    The most compelling example is a result register of the AD-converter. It won't start the next conversion in its queue until it has been read. However I have to store the result somewhere a generic pointer points to. As we all know generic pointers are awfully slow, and it might (and often does) point to XDATA.
    So the first thing I do is copy the result register into a local variable, so the next AD conversion can start.

Children