326
Rabbit 3000 Microprocessor
C.4.3 Complete Operating System
This section describes a “full” use of the System/User mode—separating all common
functions into a System mode “operating system” while letting the application-specific
code run in the User mode.By default, the System mode handles all peripherals and inter-
rupts, as well as high-level interfaces such as a flash file system. However, the processor
will be running the application code in the User mode most of the time.
The application code can request direct access to a peripheral and/or interrupt from the
System mode. If allowed, the System mode can create an interrupt vector as described in
Section C.3 that will execute the user code interrupt handler.
When the application code wants to perform an action that is controlled by the System
mode, it can request the particular action by loading the appropriate value into HL and
executing
SYSCALL
. This requires generating a list of all the actions that the application
code would want to do, assigning values to each action, and implementing a
SYSCALL
handler in the System mode that parses the value passed to it and calls the appropriate
function.
Write protection should be enabled (User mode only) for all blocks containing system
code and data as well as any critical memory regions.
If any critical interrupts occur (stack limit violation, system mode violation, write protec-
tion violation), the System mode handlers can perform any of a number of operations:
restart the application code, signal another device, halt operation, and so on.
An overview of this level of operation is shown in Figure C-4.
Figure C-4. System/User Mode Setup for Operating System
Return from interrupts
Interrupts,
SYSCALL, RST
System Mode
User Mode
Application
code
User-defined
interrupts
Interrupt
handlers
Flash file
system
SYSCALL
handler
Summary of Contents for Rabbit 2000
Page 2: ...Rabbit 3000 Microprocessor User s Manual 019 0108 040731 O ...
Page 9: ...Rabbit 3000 Microprocessor ...
Page 29: ...20 Rabbit 3000 Microprocessor ...
Page 64: ...User s Manual 55 5 PIN ASSIGNMENTS AND FUNCTIONS ...
Page 79: ...70 Rabbit 3000 Microprocessor ...
Page 80: ...User s Manual 71 6 RABBIT INTERNAL I O REGISTERS ...
Page 123: ...114 Rabbit 3000 Microprocessor ...
Page 137: ...128 Rabbit 3000 Microprocessor ...
Page 157: ...148 Rabbit 3000 Microprocessor ...
Page 207: ...198 Rabbit 3000 Microprocessor ...
Page 249: ...240 Rabbit 3000 Microprocessor ...
Page 255: ...246 Rabbit 3000 Microprocessor ...
Page 277: ...268 Rabbit 3000 Microprocessor ...
Page 343: ...334 Rabbit 3000 Microprocessor ...
Page 345: ......