![Keil RTX51 Скачать руководство пользователя страница 22](http://html1.mh-extra.com/html/keil/rtx51/rtx51_manual_3913946022.webp)
22
Creating RTX51 Tiny Applications
3
; Note: Round-Robin Task Switching can be disabled by using '0' as
; value for the TIMESHARING equate.
;-----------------------------------------
;
; '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. A macro defines
; the code executed when the stack space is exhausted.
;
;
; define the highest RAM address used for CPU stack
RAMTOP
EQU
0FFH
; default is address (256 - 1)
;
FREE_STACK
EQU
20
; default is 20 bytes free space on stack
;
STACK_ERROR
MACRO
CLR
EA
; disable interrupts
SJMP
$
; endless loop if stack space is exhausted
ENDM
;
;-----------------------------------------
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
Description
INT_REGBANK
indicates which register bank is to be used by RTX51 Tiny for the system
interrupt.
INT_CLOCK
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.
TIMESHARING
defines the time-out for the round-robin task switching. The value
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.
RAMTOP
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.
FREE_STACK
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.
STACK_ERROR
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.
Содержание RTX51
Страница 4: ......
Страница 6: ......
Страница 20: ......
Страница 24: ......
Страница 39: ...RTX Tiny 39 4...
Страница 40: ......
Страница 44: ...44 RTX51 Tiny Specifications 5...
Страница 68: ...RTX51 TINY REAL TIME OPERATING SYSTEM User s Guide 2 95...