RTX51: Bank Switch Mode 1 causes sporadic Runtime-Errors
Information in this article applies to:
An application that is using code banking in banking mode 1 or banking mode 4 might cause sporadic problems with RTX51 Full when the system interrupt is triggered within the bank switching code.
The RTXCONF.A51 file contains a restore bank function that compares the current bank with the new bank. Since the bank switching code of banking mode 1 and mode 4 no longer disables the interrupt system, a potential run-time error might cause crashes of the application.
This occurs when the RTX51 system interrupt is called exactly on the update of the B_CURRENTBANK value, but before external hardware I/O lines are updated.
Change the code for ?RTX_SWITCHBANK in the file RTXCONF.A51 to:
The problem only exists in combination with L51_BANK.A51 configuration file version 2 and will be solved in future RTX51 revisions.
If you are using the L51_BANK.A51 Version 1.4 (which was part of the C51 Version 5) the run-time error does not occur, since this code disables the interrupt system during bank switching.
Last Reviewed: Thursday, February 25, 2021
of your data.