ARM Technical Support Knowledge Articles

DISABLING ROUND-ROBIN PUSHES AND POPS

Applies to: RTX51 Tiny Real-time Kernel

Answer


Information in this article applies to:


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, you 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

Article last edited on: 2005-07-17 10:53:43

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential