Keil RTX51 Manual page 22

Table of Contents

Advertisement

22
;
Note:
;
;-----------------------------------------
;
;
'RTX51 tiny' Stack Space
;
=========================
;
;
The following EQU statements defines the size of the internal RAM used
;
for stack area and the minimum free space on the stack.
;
the code executed when the stack space is exhausted.
;
;
RAMTOP
;
FREE_STACK
;
STACK_ERROR
3
;
;-----------------------------------------
This configuration file defines a number of constants that may be modified to suit the re-
quirements of your particular application. These are described in the following table.
Variable
INT_REGBANK
INT_CLOCK
TIMESHARING
RAMTOP
FREE_STACK
STACK_ERROR
Round-Robin Task Switching can be disabled by using '0' as
value for the TIMESHARING equate.
; define the highest RAM address used for CPU stack
EQU
0FFH
; default is address (256 - 1)
EQU
20
; default is 20 bytes free space on stack
MACRO
CLR
EA
; disable interrupts
SJMP
$
; endless loop if stack space is exhausted
ENDM
Description
indicates which register bank is to be used by RTX51 Tiny for the system
interrupt.
defines the interval for the system clock. The system clock generates an
interrupt using this interval. The defined number specifies the number of
CPU cycles per interrupt.
defines the time-out for the round-robin task switching.
indicates the number of timer tick interrupts that must elapse before
RTX51 Tiny will switch to another task. If this value is 0, round-robin
multitasking is disabled.
indicates the highest memory location in the internal memory of the 8051
derivative. For the 8051, this value would be 7Fh. For the 8052, this value
would be 0FFh.
specifies the size of the free stack area in bytes. When switching tasks,
RTX51 Tiny verifies that the specified number of bytes is available in the
stack. If the stack is too small, RTX51 Tiny invokes the STACK_ERROR
macro. The default value for FREE_STACK is 20. Values 0 .. 0FFH are
allowed.
is the macro that is executed when RTX51 Tiny detects a stack problem.
You may change this macro to perform whatever operations are necessary
for your application.
Creating RTX51 Tiny Applications
A macro defines
The value

Advertisement

Table of Contents
loading

Table of Contents