![Rabbit Rabbit 4000 User Manual Download Page 298](http://html1.mh-extra.com/html/rabbit/rabbit-4000/rabbit-4000_user-manual_3116714298.webp)
288
Rabbit 4000 Microprocessor User’s Manual
27.3.2 Mixed System/User Mode Operation
This mode is similar to the previous mode, but with some portions of the program written
for System Mode — for example, peripheral interrupts where latency is critical. By keep-
ing the System Mode code sections small, potential system crashes are still minimized.
Figure 27-2 shows an overview of this level of operation.
Figure 27-2. System/User Mode Setup for Mixed Operation
27.3.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 27.3.7 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), System Mode handlers can perform any of a number of operations: restart
the application code, signal another device, halt operation, and so on.
Return from interrupts
Critical
Interrupts
System Mode
User Mode
Application
code
User-defined
interrupts
Critical
interrupts
Time-critical
interrupts
Summary of Contents for Rabbit 4000
Page 1: ...Rabbit 4000 Microprocessor User s Manual 019 0152 070720 H...
Page 18: ...8 Rabbit 4000 Microprocessor User s Manual...
Page 40: ...30 Rabbit 4000 Microprocessor User s Manual...
Page 74: ...64 Rabbit 4000 Microprocessor User s Manual...
Page 82: ...72 Rabbit 4000 Microprocessor User s Manual...
Page 86: ...76 Rabbit 4000 Microprocessor User s Manual...
Page 96: ...86 Rabbit 4000 Microprocessor User s Manual...
Page 182: ...172 Rabbit 4000 Microprocessor User s Manual...
Page 240: ...230 Rabbit 4000 Microprocessor User s Manual...
Page 248: ...238 Rabbit 4000 Microprocessor User s Manual...
Page 256: ...246 Rabbit 4000 Microprocessor User s Manual...
Page 310: ...300 Rabbit 4000 Microprocessor User s Manual...
Page 330: ...320 Rabbit 4000 Microprocessor User s Manual...
Page 348: ...338 Rabbit 4000 Microprocessor User s Manual...