Keil Logo

RTX166: RESTRICTIONS USING REGISTERBANKS


Information in this article applies to:

  • RTX166 Version 3.10a

QUESTION

The RTX166 manual warns that care must be taken to avoid using register banks that are used by the RTX.

If I use the USING directive to specify a register bank for my functions, how can I determine which register banks are used by RTX166? How do I avoid using them?

ANSWER

RTX166 declares several register banks for its internal interrupt routines. If you look in the MAP file generated by the linker, you will find these defined after the SYSTEM stack. For example:

00FA00H   00FBFFH   000200H   ---   ---   ---    ---  ---  ---   * SYSTEM STACK *
00FC00H   00FC1FH   000020H   DATA  ---   BYTE   ---  ---  ---   *REG*   rtx_clk_rb
00FC20H   00FC3FH   000020H   DATA  ---   BYTE   ---  ---  ---   *REG*   ?C_MAINREGISTERS
00FC40H   00FC5FH   000020H   DATA  ---   BYTE   ---  ---  ---   *REG*   rtx_int_rb

In this example, RTX166 declares rtx_clk_rb and rtx_int_rb as register banks.

To avoid using these register banks, don't specify these names (rtx_clk_rb or rtx_int_rb) with the USING directive in your functions.

To create your own register banks, make up a name and use it with the USING directive. For example:

void my_isr (void) interrupt 0x23 using MY_REGISTER_BANK_NAME
{
}

The name is not important as long as it is unique.

Last Reviewed: Sunday, March 12, 2000


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.