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 Reply Children
  • It wouldn't be a proper Keil forum thread unless either Hans or Erik have gone out of their way to add an unnecessary comment that doesn't add anything to the conversation but still allows them to post.

    It's usually just bait to get people to respond so they can pretend to be the victims of an attack and then leverage it put other people down and make them feel better about themselves. Happens all the time around here.

  • You missed Mr Indeed man who really (and I do mean really) likes to feel smug with frequent RTFMs.

  • 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.

  • #ifdef ISR_GROUP_1
    extern U8 Variable_for_group_1
    #endif

  • That's what I meant with that sentence:
    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.

    But that's really just doing the overlaying for the compiler. I think I'll actually implement this. I already have a script that generates my overlaying instructions and updates the .uvproj. I'll extend it to do this for me.