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

Registerbanks in interrupts

Can you tell me :
If an interrupt routine using (say) registerbank 2 calls a subroutine, does the subroutine have to be specified as using registerbank 2 as well?

If so, what is the best way of specifying a routine that may be called from both the foreground and an interrupt?

Parents
  • Yes, if the registerbank is different your data will almost definately get corrupted at some point.

    The method i have used is to declare #pragma registerbank ( ? ) at the start of a file that then only contaians the functions for that registerbank ( including the interrupt ).

Reply
  • Yes, if the registerbank is different your data will almost definately get corrupted at some point.

    The method i have used is to declare #pragma registerbank ( ? ) at the start of a file that then only contaians the functions for that registerbank ( including the interrupt ).

Children
No data