Keil Logo

RTX51 TINY: Disabling Round-Robin Pushes and Pops


Information in this article applies to:

  • RTX51 Tiny Version 2.00

QUESTION

While debugging my RTX51 Tiny application, I have found a code area that is never executed.

?RTX_TASKSWITCHING:
                PUSH    ACC
                PUSH    PSW
                PUSH    B
                PUSH    DPH
                PUSH    DPL
                PUSH    AR0
                PUSH    AR1
                PUSH    AR2
                PUSH    AR3
                PUSH    AR4
                PUSH    AR5
                PUSH    AR6
                PUSH    AR7

This code appears to save all registers before a task switch. The corresponding POP instructions are not called either.

Why is this code included but never called?

ANSWER

The code is used to perform Round-Robin code banking. However, your application does not appear to switch tasks using round-robin. So, you are probably using the os_wait function to perform a task switch. If this is the case and if you do not require round-robin task switch, you should disable it. The unused code will not be included in your application.

To disable round-robin task switching, you must modify the CONF_TNY.A51 file as shown below:

TIMESHARING     EQU     0       ; default is 5 Hardware-Timer ticks.
;                               ; 0 disables Round-Robin Task Switching

MORE INFORMATION


Last Reviewed: Thursday, February 25, 2021


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.